Parse-SDK-iOS-OSX
Parse-SDK-iOS-OSX copied to clipboard
Carthage Xcode >=12 compatibility
Generate xcframework for the next version in order to avoid using carthage workaround
https://github.com/Carthage/Carthage#building-platform-independent-xcframeworks-xcode-12-and-above
@cbaker6
Thanks for the link, @drdaz is looking at this in #1561
This issue has been automatically marked as stale because it has not had recent activity. If you believe it should stay open, please let us know! As always, we encourage contributions, check out the Contributing Guide
We may be moving straight to SPM support and skip fixing the carthage build altogether, see discussion in https://github.com/parse-community/Parse-SDK-iOS-OSX/pull/1615. In the meantime, I found a rather complex way to build with carthage on Xcode 13.2.1:
- Use carthage build script
carthage.shfor Xcode >12 compatibility - Build all xcframeworks; do not use
--no-use-binariesasfacebook-ios-sdkis required as dependency of Parse SDK but cannot be built from source in Xcode 13; run:./carthage.sh update --use-xcframeworks --platform iOS - Add built xcframeworks to Xcode project, except
Parse.xcframework, see step 5 why. - Open
Carthage/Checkouts/facebook-ios-sdk/samples/SmoketestSPM/SmoketestSPM.xcodeprojand wait for SPM to download the dependency; see here why. - Build Parse SDK frameworks because
ParseFacebookUtilsV4.xcframeworkrequiresParse.framework(not as xcframework), so it needs to be built and added viacarthage copy-frameworksin the Xcode project's build phases; run:./carthage.sh update Parse-SDK-iOS-OSX --platform iOS; note that during the build process, after carthage refetchesfacebook-ios-sdkand before it begins to build its scheme you may need to quickly retrigger the download in step 4.
I'm keeping this issue open if someone looks for guidance when building with carthage, but with a note that we intend to focus on adding Swift Package Manager support (https://github.com/parse-community/Parse-SDK-iOS-OSX/issues/1453) as a more sustainable solution instead of fixing the carthage build process / xcframeworks.
Closing as release 2.0.0 supports import via Swift Package Manager.