phrase / ios-sdk

Phrase Over the Air iOS SDK
https://phrase.com
Other
14 stars 3 forks source link

Please, upgrade ios sdk with swift 5.2.2 support #13

Closed fal-alexandr closed 4 years ago

fal-alexandr commented 4 years ago

Unable to setup with carthage and latest Xcode 11.4.1 installed

winkelsdorf commented 4 years ago

@fal-alexandr Thanks for reaching out and bringing this to our attention!

I'm able to reproduce your issue with Carthage v0.34:

*** Downloading binary-only framework PhraseSDK at "https://raw.githubusercontent.com/phrase/ios-sdk/master/PhraseSDK.json"
*** Downloading binary-only framework PhraseSDK at "https://raw.githubusercontent.com/phrase/ios-sdk/master/PhraseSDK.json"
*** xcodebuild output can be found in /var/folders/cs/cphyd8jj6_bcgvrk8s7qnsph0000gn/T/carthage-xcodebuild.l64oUg.log
*** Downloading PhraseSDK.framework binary at "2.1.0"
Incompatible Swift version - framework was built with 5.2 (swiftlang-1103.0.32.1 clang-1103.0.32.29) and the local version is 5.2.2 (swiftlang-1103.0.32.6 clang-1103.0.32.51).

Let me try to explain why this error message is misleading:

The Phrase iOS SDK is compiled with enabled Module Stability. This means it works with newer Swift compiler versions right out of the box. Beside Module Stability, especially minor version upgrades like this (from 5.2 to 5.2.2) never triggered a warning with Xcode, even before Module Stability was released. I verified the PhrasesSDK to be working with Xcode 11.4.1 and Swift 5.2.2 using CocoaPods as well as by manually adding the PhraseSDK.framework.

What you experience is likely a bug with Carthage itself, reported here https://github.com/Carthage/Carthage/issues/2887.

As of now the fix hasn't been released in Carthage yet.

Please try updating Carthage by manually compiling the latest version:

git clone https://github.com/Carthage/Carthage.git Carthage
cd Carthage
make install
carthage update --platform iOS --no-use-binaries

This installs the latest Carthage version to your user directory /usr/local/bin.

Using this updated version of Carthage no issue is reported anymore:

*** Downloading binary-only framework PhraseSDK at "https://raw.githubusercontent.com/phrase/ios-sdk/master/PhraseSDK.json"
*** Downloading binary-only framework PhraseSDK at "https://raw.githubusercontent.com/phrase/ios-sdk/master/PhraseSDK.json"
*** xcodebuild output can be found in /var/folders/cs/cphyd8jj6_bcgvrk8s7qnsph0000gn/T/carthage-xcodebuild.dNEBDV.log

Despite this workaround we'll discuss releasing updated binaries for our Carthage users until the above issue is resolved in Carthage.

Please let me know if this solves your issue.

fal-alexandr commented 4 years ago

thanks, that did help!

winkelsdorf commented 4 years ago

@fal-alexandr You're very welcome, thanks for the feedback! Glad I could help 😊

sam-w commented 4 years ago

@fal-alexandr and for anyone watching this issue, the problem should now be fixed with the release of Carthage 0.35.0

winkelsdorf commented 4 years ago

@sam-w Thank you very much for the follow-up on this! We really appreciate your feedback 💯