Version 22 (modified by ming, 14 years ago) (diff) |
---|
Getting Started: Building for Apple iPhone, iPad and iPod Touch
TracNav
Getting Started- Moved to: https://docs.pjsip.org/en/latest/index.html#get-started
Preparation
Build for Desktop
Build for Mobile
- iOS: Apple iPhone, iPad, and iPod Touch
- Android
- BlackBerry 10 (BB10)
- Windows Mobile
- Windows Phone 8.x and UWP
Symbian...
- Build for Other
Next: Using the libraries
See Also
- Features
- Requirements
- Build Preparation
- Building PJSIP
- Simulator
- Common problems
- Other iPhone Projects
Apple iPhone target is supported by PJSIP version 1.7 and later.
Features
Some of the features of the iPhone port:
- it has a native CoreAudio based audio device, which supports the following features:
- the built-in/device's echo canceller
- output volume setting
- change input route to bluetooth input
- change output route
- input latency setting
- output latency setting
- supports for the built-in iLBC codec
Requirements
You'll need an iPhone SDK. We tested mainly with version 3.x SDK/devices, but SDK version 2.x would build fine too. Apple iPad is supported starting with iPhone SDK 3.2.
Build Preparation
- Get the source code, if you haven't already.
- Set your config_site.h to the following:
#define PJ_CONFIG_IPHONE 1 #include <pj/config_site_sample.h>
This will activate iPhone specific settings in the config_site_sample.h.
Building PJSIP
Just run:
$ cd /path/to/your/pjsip/dir $ ./configure-iphone $ make dep && make clean && make
Notes:
- the ./configure-iphone is a wrapper that calls the standard ./configure script with settings suitable for iPhone target.
- the latest iPhone SDK version will be selected by default. You may change this by setting IPHONESDK environment variable to the desired SDK path.
- you may pass standard ./configure options to this script too.
- for more info, run ./configure-iphone --help
- other customizations are similar to what is explained in Building with GNU page.
Simulator
To configure the build system for the iPhone simulator:
$ export DEVPATH=/Developer/Platforms/iPhoneSimulator.platform/Developer $ export CC=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.0 $ ./configure-iphone $ make dep && make clean && make
Note that the exact paths may vary according to your SDK version.
Common problems
Compilation error using iPhoneSimulator SDK version 3.2
If you get this error during compilation:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/usr/include/available.h:111:6: error: #error __MAC_OS_X_VERSION_MAX_ALLOWED must be >= __MAC_OS_X_VERSION_MIN_REQUIRED
Add this in your config_site.h:
#undef __MAC_OS_X_VERSION_MIN_REQUIRED #undef __MAC_OS_X_VERSION_MAX_ALLOWED #define __MAC_OS_X_VERSION_MIN_REQUIRED __MAC_OS_X_VERSION_10_4 #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_OS_X_VERSION_10_5
Sound not working in the simulator
Go to System Preferences > Sound > Sound Effects and then uncheck and recheck "Play user interface sound effects". If it still doesn't work, you can try some other suggestions here.
Other iPhone Projects
Also have a look at these PJSIP iPhone ports by pjsip users:
- Siphon Project by Samuel Vinson
- iPhone Audio Driver by Voalté
- TabikPhone, an adaptation of Sipphone code from V-Net Corp
Attachments (1)
-
XCodeCommandLineToolsInstalled.png
(75.5 KB) -
added by ismangil 12 years ago.
Xcode Command Line Tools
Download all attachments as: .zip