To compile PJSIP library for iPhone device, I am using this code
make distclean && make clean
ARCH='-arch arm64' ./configure-iphone --enable-opus-codec
make dep
make
This code allows me to install my app for single architecture only. To compile pjsip for all the architectures (armv7, armv7s, arm64, i386, x86_64), Which command or tool I can use
I am using this script to build pjsip for my archs.
I am running it in the pjsip root folder, it creates a uni folder containing the resulting libraries which I then link/add into my project.
We wrote a cocoapod that will create a static library that you can include in your project. For the moment you can only use it in an Objective C cocoapod environment. We are working on a version that will create a dynamic library so it can be used with Swift.
Please check it out on:
https://github.com/VoIPGRID/Vialer-pjsip-iOS
We've made an open source wrapper that makes integrating PJSIP in your iOS project a lot easier:
https://github.com/VoIPGRID/VialerSIPLib
the merge like this as posted
lipo -create /My\ Project/pjsip-universal/x86_64/libgsmcodec-x86_64-apple-darwin_ios.a /My\ Project/pjsip-universal/i386/libgsmcodec-i386-apple-darwin_ios.a /My\ Project/pjsip-universal/armv7s/libgsmcodec-armv7s-apple-darwin_ios.a /My\ Project/pjsip-universal/armv7/libgsmcodec-armv7-apple-darwin_ios.a /My\ Project/pjsip-universal/arm64/libgsmcodec-arm64-apple-darwin_ios.a -output /My\ Project/pjsip-universal/universal/libgsmcodec-universal-apple-darwin_ios.a
finally test it
lipo -info /My\ Project/pjsip-universal/libgsmcodec-universal-apple-darwin_ios.a
output: Architectures in the fat file: /My Project/pjsip-universal/libgsmcodec-universal-apple-darwin_ios.a are: i386 armv7s armv7 x86_64 arm64
Once you generate the universal architecture:
Follow this link to add in you project from this line in link
Adding the header files into the project
how to add in project
Hope this will help you.
Steps to compile for all devices.
eg.
-create /libsrtp-arm64-apple-darwin_ios.a /libsrtp-i386-apple-darwin_ios.a -output output_file_name
then use
output_file_name.a
as a universal library for all device and simulatorto check supported architecture :
output_file_name.a
lipo -info name_of_static_lib
output : /libsrtp-universal-apple-darwin_ios.a are: armv7 armv7s i386 x86_64 arm64
Compile PJSIP 2.5 Library for all archietectures
Thanks
You can check this project on GitHub, its author did a great job of building pjsip for all architectures, he even provided podspec for easy CocoaPods integration.