Megha Parmar Megha Parmar - 1 month ago 26
iOS Question

Compile PJSIP 2.5 Library for all architectures

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

Answer

Steps to compile for all devices.

  1. compile for all devices separately
  2. merge with lipo

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 simulator

to 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