faithfracture / Apple-Boost-BuildScript

Script for building Boost for Apple platforms (iOS, iOS Simulator, tvOS, tvOS Simulator, OS X)
279 stars 111 forks source link

Add iOS and tvOS simulator support on arm64 based macs #62

Closed paynerc closed 3 years ago

paynerc commented 3 years ago

This PR adds the ability to generate arm64 slices for both the iphonesimulator and appletvsimulator sdks. It also fixes an issue that currently exists with the .xcframework implementation.

.xcframeworks expect to have one folder/slice for each platform it supports, so one slice for iphoneos, one for iphonesimulator, and so on. The current implementation will break if you attempt to build for iOS with a minimum iOS version of 9.0:

% ./boost.sh -ios --min-ios-version 9.0

..... Building building building ..... 

Both ios-x86_64-simulator and ios-1386-simulator represent two equivalent library definitions.

... more failures because the xcframework was not built.

Done
================================================
Completed successfully
%

The solution is to lipo all of the architectures for a given platform and then use that fat library with the xcodebuild -create-framework command.

guillaumealgis commented 3 years ago

Thank you @paynerc, this is great !

I rebased your branch on top of master, and will merge once the CI succeeds.