Closed mtrezza closed 1 year ago
Hi @mtrezza and thank you for this explanation and these steps. I tried to follow them but after running carthage update --use-xcframeworks
, I can only find Bolts.xcframework
in Carthage/Build, there is no Parse.xcframework
file.
Here is the execution result in the console:
Fetching Parse-SDK-iOS-OSX Fetching facebook-ios-sdk Fetching Bolts-ObjC Checking out Bolts-ObjC at "1.9.1" Checking out Parse-SDK-iOS-OSX at "1.19.3" Checking out facebook-ios-sdk at "v11.0.1" xcodebuild output can be found in /var/folders/v2/yb_z9mzj2d170bzw0xrknx180000gn/T/carthage-xcodebuild.8Dgj1D.log Downloading facebook-ios-sdk binary at "Facebook SDK v11.0.1" Downloading Parse-SDK-iOS-OSX binary at "1.19.3" Skipped installing facebook-ios-sdk binary due to the error: "Incompatible Swift version - framework was built with 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28) and the local version is 5.7 (swiftlang-5.7.0.127.4 clang-1400.0.29.50)." Falling back to building from the source Building scheme "Bolts-macOS" in Bolts.xcodeproj Building scheme "Bolts-tvOS" in Bolts.xcodeproj Could not find any available simulators for tvOS
My Cartfile only contains this line:
github "parse-community/Parse-SDK-iOS-OSX"
Thank you for your help
Could not find any available simulators for tvOS
You could try to install the tvOS simulators in Xcode and run carthage again. It's apparently missing a simulator. Alternatively, if you only need to build for iOS try carthage update --use-xcframeworks --platform iOS
.
TL;DR
The Parse ObjC SDK can officially only be implemented using carthage. All other ways are not officially supported anymore. See below for how to implement the SDK using carthage.
Issue
The Parse ObjC SDK has several build-issues when trying to add it via the usual ways. This is because it hasn't been updated according to changes in Xcode / framework requirements for a while:
Solution
We have an open issue for Swift Package Manager support. There have been attempts, but no pull request made it over the finish line. If you want to help, it would be very much appreciated. There are pull requests as proof of concepts where SPM is added, but they need refinement.
Implement using Carthage in Xcode 14
The following approach is currently known to work for Xcode 14 to build the iOS frameworks:
carthage update --use-xcframeworks --platform iOS
Parse.xcframework
andBolts.xcframework
to the project and choose "Embed and sign".Important:
ParseFacebookUtils
andParseTwitterUtils
won't work because they seem to look for a fat file dependency which isn't available. However, these two frameworks are just convenience wrappers, if you need Facebook or Twitter authentication, usePFUser.linkWith()
.carthage update --use-xcframeworks --platform iOS
once, then open the Parse SDK inCarthage/Checkouts
with Xcode and delete the schemes for building the static frameworks, then runcarthage build --use-xcframeworks --platform iOS
.