-
Notifications
You must be signed in to change notification settings - Fork 104
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
Add support for Apple Silicon (arm64) to iOS Simulator builds #22
Comments
I have the same issue. Has anyone found a workaround? |
Try running Xcode with Rosetta enabled |
Is there a way to change the settings to build for arm_64 simulator? |
Not if you link any binary that does not have an ARM64 slice for the simulator. |
Google provides two versions of the SDK now:
There are two problems:
Here is my (experimental) solution: https://github.com/darrarski/GoogleMaps-SP It can be used as a dependency of Swift Package and provides ARM64-simulator support (without running through Rosetta). Enjoy, I hope it helps :-) |
The problems with Google's XCFrameworks are:
|
That's true. I think there's no other way around than to use them if we need ARM64 simulator support at the moment. My approach is to rebuild the XCFrameworks using (slightly modified) script from this repo and thin frameworks contained inside Google's official XCFrameworks. A bit hacky, but works for me (in simulator on M1 and on a physical device). Hopefully Google will fix their frameworks, so we can use them directly. |
I tried embedding Google's XCFrameworks inside this repo XCFrameworks and it was a success, one problem was The framework name need to be different than Google's framework names to prevent linking collisions i.e renaming GoogleMaps.framework to GoogleMaps_.framework (either Google's one or this repo one). |
Not sure I understand the name collision issue. You can store |
@darrarski Thank you so much for sharing the code! I've been trying to reverse engineer the whole process (creation of Xcode projects, setting up dependencies). Could you please share how you setup linking between GoogleMaps & GoogleMapsBase & GoogleMapsCore? I'm now stuck at |
I didn't do anything special here. Started by forking this repository and duplicating the Xcode project to have two of them. One is using ".framework" files for physical devices and second for simulators. I've got these frameworks from official XCFramework file downloaded from Google (ver. 7.1.0-beta). That's it. |
Thank you! I’ll try the same! |
@karimhm perhaps you can shed some light on dependencies setup? |
What are you trying to achieve? |
I would like to know how As far as I can see you:
|
@karimhm Zipped xcarchives produced by |
I figured out how to re-create |
Any news on this? Building for |
Is there an update on this? |
That's really a Google question. I don't get why it takes them so long to update one of their most used libraries... |
fwiw, I found this one https://github.com/gomore/GoogleMaps-SPM which has 7.3.0 |
@bsrz did you manage to get that one working? It claims to be working with M1, but even on a fresh project I get errors. |
@svachmic yes, it's working for us, we're all on M1 and our CI machines are on Intel, everything works. |
Thanks @bsrz for a quick reply! I don't know what I'm doing wrong - I add it to my project simply by adding another SwiftPM dependency using Xcode's UI, I select all the packages (GoogleMaps, GoogleMapsCore and the third one that escapes me now), the code compiles but when I want to run it in the simulator or on an iPhone, I get an error that an Info.plist is missing in the GoogleMaps package. Am I missing a step? Am I supposed to run the shell script in the repo or add some build phase? I am seeing this same behavior both in my project which used to have Google Maps installed via cocoapods and in a fresh new Xcode project. |
@svachmic We're not using Xcode's UI for this, I'm using it in a local package for modularization. We're supporting iOS 14+ not sure if this has an impact for you? |
@bsrz thanks for your env description. It was actually more trivial than that. The newest version (8.0.0) is simply buggy. When I used the version below (7.3.0) it works just fine. |
No description provided.
The text was updated successfully, but these errors were encountered: