phrase / ios-sdk

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

Swift 5.1.2 support #10

Closed trevorwang closed 4 years ago

trevorwang commented 4 years ago

It doesn't work when I updated to latest xcode.

Module compiled with Swift 5.1 cannot be imported by the Swift 5.1.2 compiler: Pods/PhraseApp/PhraseApp.framework/Modules/PhraseApp.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
winkelsdorf commented 4 years ago

@trevorwang Thank you for bringing this to my attention. We will be releasing an updated framework later today which fixes module stability. Sorry for the inconvenience it caused you!

angelolloqui commented 4 years ago

Same thing here! waiting for that update! thanks!

winkelsdorf commented 4 years ago

An updated SDK that has been built for Swift 5.1.2 has been released: https://github.com/phrase/ios-sdk/releases/tag/1.2.2.

Due to a known issue with the Swift compiler itself, we need to postpone the use of Module Stability to a later release as this would would introduce a breaking change.

angelolloqui commented 4 years ago

Works fine! for future releases, I suggest you distribute the source code instead of the built framework. That way we could also contribute if anything arises. Thanks for the quick response anyway!

winkelsdorf commented 4 years ago

@angelolloqui Thank you for your feedback, you're welcome! We will discuss your suggestion internally 👍

dmhts commented 4 years ago

@winkelsdorf

Due to a known issue with the Swift compiler itself, we need to postpone the use of Module Stability to a later release

I'm just wondering, what known issue are you referring to?

winkelsdorf commented 4 years ago

@dmhts There is a known issue with the namespace of a framework and its classes, mentioned in the Xcode 11.2 release notes (https://developer.apple.com/documentation/xcode_release_notes/xcode_11_2_release_notes):

If a module is built with BUILD_LIBRARIES_FOR_DISTRIBUTION and contains a public type with the same name as the module itself, clients will fail to import the module. (19481048) (FB5863238)

This has been reported in the Swift forums previously: https://forums.swift.org/t/frameworkname-is-not-a-member-type-of-frameworkname-errors-inside-swiftinterface/28962.

Despite this, there have also been reports that enabling Module Stability might lead to segmentation faults in the LLVM compiler. Source: https://forums.swift.org/t/module-compiled-with-swift-5-1-cannot-be-imported-by-the-swift-5-1-2-compiler/30431/7.

We are currently investigating our options and evaluating the upcoming Xcode 11.2.1 release (currently in GM seed).

dmhts commented 4 years ago

Thanks, I thought you had some concrete issues with your library. Anyway, it's reasonable to wait until module stability gets stable 👍

winkelsdorf commented 4 years ago

@dmhts You're welcome and thank you for your understanding! No, just the compiler issue with the module's namespace. Exactly, we will test the new functionality with each release and provide Module Stability as soon as possible and as soon as it appears reasonable.

winkelsdorf commented 4 years ago

Update: A new release fully supporting module stability is available now. Please see https://github.com/phrase/ios-sdk/releases for details.

dmhts commented 4 years ago

@winkelsdorf Thanks a lot for letting us know!

winkelsdorf commented 4 years ago

@dmhts You're welcome!