How to compile PJSIP for iPhone OS ---------------------------------- First, download iPhone SDK from http://developer.apple.com/login (requires login). In the example below, we are using version 3.1.2. Next, follow these steps: 1. Apply the patch configure-diff.txt 2. Create pjlib/include/pj/config_site.h /* Disable floating point support */ #undef PJ_HAS_FLOATING_POINT #define PJ_HAS_FLOATING_POINT 0 /* Select codecs to disable */ #define PJMEDIA_HAS_ILBC_CODEC 0 #define PJMEDIA_HAS_SPEEX_CODEC 0 /* For CPU reason, disable speex AEC. */ #define PJMEDIA_HAS_SPEEX_AEC 0 #define PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO 0 #define COREAUDIO_MAC 0 3. Define environment variables export DEV=/Developer/Platforms/iPhoneOS.platform/Developer export SDK=${DEV}/SDKs/iPhoneOS3.1.2.sdk export PATH=${DEV}/usr/bin:${PATH} export CFLAGS="-O2 -arch armv6 -isysroot ${SDK}" export LDFLAGS="-O2 -arch armv6 -isysroot ${SDK}" export CPP="${DEV}/usr/bin/cpp" 4. Create symbolic links to arm compiler cd ${DEV}/usr/bin ln -s arm-apple-darwin9-gcc-4.0.1 arm-apple-darwin9-gcc ln -s arm-apple-darwin9-g++-4.0.1 arm-apple-darwin9-g++ ln -s ranlib arm-apple-darwin9-ranlib 5. autoconf aconfigure.ac > aconfigure 6. ./aconfigure --host=arm-apple-darwin9 7. Create user.mak export LDFLAGS += -framework AudioToolbox -framework Foundation 8. make dep and make ============================================================= How to develop iPhone apps -------------------------- 1. Go to iPhone Provisioning Portal http://developer.apple.com/iphone/my/overview/index.action 2. Follow the steps and how-tos to create a provisioning profile (i.e. Certificates, Devices, App IDs, Provisioning). 3. Open XCode, change XCode-Preferences-Indentation-Tab Width 8. 4. Open an iPhone app (ipjsystest or ipjsua) located in pjsip-apps/src using XCode. 5. Change Base SDKs for All Configurations in Project-Edit Project Settings (according to the iPhone's OS version). 6. Edit Resources-Info.plist-Bundle identifier, change it according to your provisioning profile. 7. Connect the iPhone via USB, then click Build and Run.