Build or Compile Linphone from Source for iPhone and iPad

By Jessica Chiang

This entry documents how to build Linphone from source for iPhone and iPad

Updated for Mac Maverick(v10.9.5 v10.9.3), Version 6.1 (6A1052d) XCode6 Beta3, iOS 8.1 7.1, and the latest Linphone source (as of 01/17/15 7/29/14 ). Tested deploying to iPhone5, iPhone5s, iPhone6, and iPhone6 Plus simulators.

To build Linphone for iPhone and iPad

Step 1: Install XCode

Install XCode

Step 2: Install MacPort

Install MacPort
If you’ve already have macport installed, then proceed to update and upgrade the outdated modules
To update

port selfupdate

To upgrade

port upgrade outdated

Step 3: Install or Update Git

Install git. I followed the instruction on this great github article. To update an existing git install (if you got an git version error in the later steps)

git clone git://github.com/gitster/git.git

Step 4: Obtain linphone source code

Download linphone source from this git tree page

git clone git://git.linphone.org/linphone-iphone.git --recursive

Step 5: Install JDK Some submodules require JDK. You can download JDK from Oracle site. I used JDK7 (http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html) After installation, verify JDK by opening a terminal and type

      #java -version

Step 5: Follow README.macos.md

The README.macos.md file is located in submodules/linphone/README.macos.md

Step 6: Follow instruction in README.md

he README.md is located in

Step 7: Update iOS SDK Version

 

IMPORTANT!!! Update SDK_VERSION in submodules/build/iphone-config.site if appropriate

To check for iOS SDK, at the commandline

   #ls /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs

My result is:

       iPhoneOS7.0.sdk

Therefore I changed my iphone-config.site to:

   ...
   SDK_VERSION_MAJOR=7
   SDK_VERSION=7.0
   ...

Step 8: Build LinPhone SDK

Build SDK

cd submodules/build

make veryclean

make all

The build can take a long while, so grab yourself a good book or go make yourself a good cup of instant noodle.

Step 8: Build LinPhone in XCode

Since XCode 5.1, arm64 has become among the standard architectures to build for, but linphone project does not build for arm64. To force XCode later than 5.1 to skip arm64 (x86_64), so that iPhone5s and up would work,  take the following steps:

Open the linphone.xcodeproj file with XCode

Select the linphone project, then click the “Build Settings” link. The default architectures should include armv7 and arm64.

Change Architectures and Valid Architectures to remove arm64. Leave armv7 and armv7s.

After the architecture change, try compiling against iPhone5s, iPhone6, and iPhone6 Plus simulators.

For more info, please refer to

  • http://lists.nongnu.org/archive/html/linphone-developers/2014-12/msg00076.html
  • http://stackoverflow.com/questions/22323039/arm64-architecture-in-xcode-5-1

Step 9: Install LinPhone to iPhone/iPad without Apple Developer License

I was able to follow this great tutorial to get Linphone on my jailbroken phone
Using Xcode Without Provisioning Proile 
Note: This tutorial only works up to iOS 6.0.

 

Troubleshooting

Error: Unable to determine simulator device to boot

Solution: You may have multiple simulators. Close all of them and try again. Also, I ran into this problem when I have both XCode5 and XCode6 Beta 3 open, including their simulators.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章