Parse-SDK-iOS-OSX icon indicating copy to clipboard operation
Parse-SDK-iOS-OSX copied to clipboard

Carthage Xcode >=12 compatibility

Open jesusmateos1234 opened this issue 4 years ago • 4 comments

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

jesusmateos1234 avatar Jan 06 '21 18:01 jesusmateos1234

Thanks for the link, @drdaz is looking at this in #1561

cbaker6 avatar Jan 06 '21 19:01 cbaker6

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

stale[bot] avatar Jul 21 '21 01:07 stale[bot]

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:

  1. Use carthage build script carthage.sh for Xcode >12 compatibility
  2. Build all xcframeworks; do not use --no-use-binaries as facebook-ios-sdk is required as dependency of Parse SDK but cannot be built from source in Xcode 13; run: ./carthage.sh update --use-xcframeworks --platform iOS
  3. Add built xcframeworks to Xcode project, except Parse.xcframework, see step 5 why.
  4. Open Carthage/Checkouts/facebook-ios-sdk/samples/SmoketestSPM/SmoketestSPM.xcodeproj and wait for SPM to download the dependency; see here why.
  5. Build Parse SDK frameworks because ParseFacebookUtilsV4.xcframework requires Parse.framework (not as xcframework), so it needs to be built and added via carthage copy-frameworks in the Xcode project's build phases; run: ./carthage.sh update Parse-SDK-iOS-OSX --platform iOS; note that during the build process, after carthage refetches facebook-ios-sdk and before it begins to build its scheme you may need to quickly retrigger the download in step 4.

mtrezza avatar Jan 20 '22 12:01 mtrezza

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.

mtrezza avatar Jan 20 '22 12:01 mtrezza

Closing as release 2.0.0 supports import via Swift Package Manager.

mtrezza avatar Jan 29 '23 12:01 mtrezza