'How to build PJSIP for Mac Catalyst?
I’ve builded for different architectures but have no luck with catalyst.
## Mac OS X ##
# x86_64
CFLAGS="-arch x86_64" LDFLAGS="-arch x86_64" ./configure --host=x86_64-apple-darwin
make dep && make clean && make
# arm64
CFLAGS="-arch arm64" LDFLAGS="-arch arm64" ./configure --host=arm-apple-darwin
make dep && make clean && make
## Simulators ##
# Create build for Intel Simulator
export DEVPATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
ARCH="-arch x86_64" CFLAGS="-O2 -m64 -mios-simulator-version-min=11" LDFLAGS="-O2 -m64 -mios-simulator-version-min=11" ./configure-iphone
make dep && make clean && make
# Create build for Apple Silicon Simulator
IPHONESDK="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk" DEVPATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer" ARCH="-arch arm64" MIN_IOS="-mios-simulator-version-min=11" ./configure-iphone
make dep && make clean && make
## Build all the remaining architectures ##
export ARCH="-arch arm64"
./configure-iphone make dep && make clean && make
export ARCH="-arch armv7"
./configure-iphone make dep && make clean && make
export ARCH="-arch armv7s"
./configure-iphone make dep && make clean && make
## Final steps ##
- Lipo libs and combine to xcframework via xcodebuild
#######
Pjsip works fine for all architectures except Mac Catalyst. I got this kind of errors while build in XCode for Mac Catalyst:
Showing All Messages [Path to pjsip inside my project directory]/pjsip/lib/libpjsip-ua-apple-darwin_ios.xcframework:1:1: While building for Mac Catalyst, no library for this platform was found in [Path to pjsip inside my project directory]/pjsip/lib/libpjsip-ua-apple-darwin_ios.xcframework'.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
