Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error building with PhraseSDK for the iOS simulator on an M1 Mac #26

Closed
cabeca opened this issue Dec 15, 2020 · 10 comments
Closed

Error building with PhraseSDK for the iOS simulator on an M1 Mac #26

cabeca opened this issue Dec 15, 2020 · 10 comments
Assignees

Comments

@cabeca
Copy link

cabeca commented Dec 15, 2020

Hello,

I'm trying to build our project on a brand new M1 MacBook Pro, but I get this error:

Failed to build module 'PhraseSDK' from its module interface; the compiler that produced it, 'Apple Swift version 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53)', may have used features that aren't supported by this compiler, 'Apple Swift version 5.3.1 (swiftlang-1200.0.41 clang-1200.0.32.8)'

I'm using Xcode Version 12.2 (12B45b) on macOS BigSur 11.1

This is a major blocker for us. Do you have any workarounds for this? Any updates on distributing PhraseSDK as a XCFramework?

Miguel Cabeça

@winkelsdorf
Copy link
Contributor

Hello @cabeca,

thanks for your report! How are you integrating the SDK? Carthage, CocoaPods or manually? The error you provide points to an issue with Module Stability, which is enabled.

But for M1 arm64 you will likely need a new build if you are targeting the arm64 Simulator. We are planning to release an Universal xcframework Version within the next 2-3 weeks.

@winkelsdorf winkelsdorf self-assigned this Dec 15, 2020
@cabeca
Copy link
Author

cabeca commented Dec 15, 2020

Sorry for the lack of information.

thanks for your report! How are you integrating the SDK? Carthage, CocoaPods or manually? The error you provide points to an issue with Module Stability, which is enabled.

We are integrating the PhraseSDK manually.

But for M1 arm64 you will likely need a new build if you are targeting the arm64 Simulator. We are planning to release an Universal xcframework Version within the next 2-3 weeks.

Yes. I forgot to mention that I was building for the iOS simulator on the M1 Mac.

Looking forward for the new XCFramework release!

@winkelsdorf
Copy link
Contributor

@cabeca No problem. If you are integrating manually an xcframework would be really easier for you, sorry for the inconvenience caused by the delay. Sure, I'll keep you updated.

@cabeca cabeca changed the title Error building with PhraseSDK on an M1 Mac Error building with PhraseSDK for the iOS simulator on an M1 Mac Dec 15, 2020
@gutaker
Copy link

gutaker commented Dec 23, 2020

Hi guys!
Do you have any ETA on this issue?
My new project heavily relies on your solution.

@winkelsdorf
Copy link
Contributor

@gutaker Unfortunately not officially as there are still several issues with the different Package Managers. We need to investigate all possible Build and Package Manager variants. As of today, Carthage does not support xcframeworks (Carthage/Carthage#2799) and CocoaPods has issues with current v1.10.0 on M1 (fixed for 1.10.1 CocoaPods/CocoaPods#10234).

Beside this many tools around the build chain currently are unstable on M1 arm64 Architecture, see e.g. CocoaPods/CocoaPods#9907.

But the Framework as it is supports A) Module Stability and B) is able to run on Device (arm64) and x86_64 Simulators.

Have you tried setting Any iOS Simulator SDK to arm64 for Excluded Architectures in the Build Settings of the Target? I am able to compile and run the current SDK on Device without issues doing that. Sadly, if your main development machine is already a M1, you cannot use the arm64 Simulator this way. Another possible intermediate solution is to run Xcode and/or iOS Simulator using Rosetta (which works as it is a Universal Binary).

Furthermore, if you add the framework manually please remember to still slice it accordingly, as it is a fat binary.

Sorry again for the inconvenience, we're working hard to provide a solution as soon as possible.

@gutaker
Copy link

gutaker commented Dec 23, 2020

Thanks! Rosetta trick for Xcode did the job!

@winkelsdorf
Copy link
Contributor

@gutaker Glad to hear that, happy to help! Happy Holidays!

@angelolloqui
Copy link

I am having the same issue. Is there any expected release time? how did you manage to work around it?

I am using Cocoapods for dependency management on an M1

@winkelsdorf
Copy link
Contributor

@angelolloqui Release is expected within the next 24-48 hrs. We are now defaulting to xcframeworks, where Xcode automatically handles the different Platforms. It will also include arm64 architecture where needed.

In the meantime you could always set arm64 to the excluded Simulator architectures within your Project's Build Configuration.

@winkelsdorf
Copy link
Contributor

@ALL New version is live. Looking forward to your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants