apollo-ios: Can't build apollo-ios for watchOS, tvOS using Carthage
- has-reproduction
- blocking
Can’t build apollo-ios for macOS, watchOS and tvOS using Carthage.
» carthage build apollo-ios --platform macOS,tvOS,watchOS
*** xcodebuild output can be found in /var/folders/jc/ktgtqxj574x18dscvp2vlnfw0000gn/T/carthage-xcodebuild.uRRLh2.log
*** Skipped downloading SQLite.swift.framework binary due to the error:
"Bad credentials"
*** Skipped downloading Starscream.framework binary due to the error:
"Bad credentials"
*** Building scheme "SQLite watchOS" in SQLite.xcodeproj
*** Building scheme "SQLite tvOS" in SQLite.xcodeproj
*** Building scheme "SQLite Mac" in SQLite.xcodeproj
*** Building scheme "Starscream" in Starscream.xcodeproj
*** Building scheme "ApolloWebSocket" in Apollo.xcworkspace
*** Building scheme "Apollo" in Apollo.xcworkspace
*** Building scheme "ApolloSQLite" in Apollo.xcworkspace
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -workspace /Users/kristaps/Documents/qminder/swift-api/Carthage/Checkouts/apollo-ios/Apollo.xcworkspace -scheme ApolloSQLite -configuration Release -derivedDataPath /Users/kristaps/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A255/apollo-ios/0.9.4 -sdk appletvsimulator -destination platform=tvOS\ Simulator,id=BE6DCEB8-5A05-4354-A0E9-C99E0F73EDCC -destination-timeout 3 ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES build (launched in /Users/kristaps/Documents/qminder/swift-api/Carthage/Checkouts/apollo-ios)
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/jc/ktgtqxj574x18dscvp2vlnfw0000gn/T/carthage-xcodebuild.uRRLh2.log
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 19
- Comments: 37 (15 by maintainers)
Is there any update on this? It seems like the issue is in SQLite.swift dependency, possibly the project is not correctly defining the version correctly on non-ios targets.
Same. macOS 10.14 Xcode 10.0; Build version 10A255
Unfortunately, it appears this is a Carthage issue.
So the problem is that when things are compiled by Carthage, Carthage is setting the version of a dependent project being compiled incorrectly for both watchOS and tvOS.
For example, though the
SQLite
dependency is clearly declared as having a 2.2 minimumwatchOS
SDK in its ownxcodeproj
, when usingcarthage update --platform watchos
to install it, Carthage compiles theSQLite
dependency with a 5.2 minimum deployment target, causing theApolloSQLite
target to fail because it has a deployment target of 3.0 (which is lower than 5.2).I’m reaching out to the Carthage folks to see if they have any suggestions for workarounds, but for now:
--platform
argument to specify what platforms you want to build for - those two are building fine at the moment.On my list for this (shortened due to 🇺🇸holiday) week!
That’s an interesting workaround - at some point it’d be interesting to dig into this, but honestly my much much stronger recommendation long-term is to use Swift Package Manager instead of Carthage.
Weird - looks like there’s something goofy going on in a totally different place (the websocket subspec) with that build, and the error is totally different as well. I would recommend trying another build and seeing if you still get the same error or if the errors are inconsistent. That’d probably help figure out what’s going on
I’m out moving but I’ll take a deeper look next week.
Sorry about the earlier tumbleweeds and thanks for bringing this to my attention - I’ll take a look and see what I can figure out.
Indeed Carthage is preferred, I just provided a temporary solution for others who come across this, since all we’re getting from Apollo is tumbleweeds.