-
Notifications
You must be signed in to change notification settings - Fork 411
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
GoogleMaps don't compile at Macbook with M1 chip #355
Comments
In my case I'm using Cocoapods to integrate Google maps and I get the same error on M1 chip. This issue only happens with iOs 14 Simulators, working fine with iOs 13. |
I subscribe to the above. My project doesn't compile on the M1 Macs because GoogleMaps is the only dependency left that hasn't adopted the new xcframework with support for arm64 for simulator. |
The Maps SDK for iOS does not yet contain the architecture necessary to run on the new Arm-based Mac Simulators—we are currently working on supporting this. For now, if you are using the new Arm-based Macs, you will need to develop using a physical device. This has been noted in our FAQ. |
Any update on this? |
Im having this issue as well. Any update on this? Seems to be the only blocker for getting our app running on silicon |
Adding another vote to advocate for a fix to this issue. We are currently blocked from developing on M1 chipsets due to this issue. |
Hey everyone, unfortunately I can't share any timelines on when this issue will be addressed since there are a lot of moving parts to supporting an .xcframework that contains the new arm simulator architecture. This is a very high priority for us though. The only workaround at the moment is to develop on a physical device if you are using one of the new Macbooks. |
I appreciate that, but even if you just had an alpha branch that would compile (and just wasn't a full release), that would at least get our CI MacMini machine unblocked. |
Thanks @arriolac for the transparency. Please keep us updated as you get a sense of timelines |
Would supporting SPM solve the problem? We have had lots of issues with pods on Apple silicon. |
That wouldn't solve the problem. Even if you manually assemble an .xcframework from the current version of the SDK using Once that new architecture is supported in a subsequent version of the Maps and Places SDKs though (and the only way to do so is to create an .xcframework), then it would make sense to also add SPM support. |
I found a similar solution for a third-party framework that we had on our app, by using the following Bogo's guide and by manually creating an XCFramework instead of using I don't know if it works for your framework because our third-party framework only supported iOS, but this is the guide: Let's start with what we had:
So, by following the guide, we should change the Mach-O header to let it run on the The first step is removing the
Delete the old Now that we have the Simulator The final step is to manually create the XCFramework:
Now you can use this XCFramework on both an iOS device and a Simulator on a Mac ARM 🎉 |
@FabrizioBrancati you should note that the steps do not work for this framework. |
After writing this guide I tried with the GoogleMaps framework, but it is composed of 3 frameworks:
The first one works by using the above method, for the other two don't work because they have negative available space. |
@FabrizioBrancati I have run into the exact same issues. Unfortunately, I don't think this approach will work because there is simply no padding available in the header for the Base and Core frameworks. |
I just got an M1 machine and I could make it work by opening Xcode using Rosetta. It works against an iOS 14.4 simulator and Google Maps appear on the app correctly. |
Yeah this is a workaround for general day to day work. However, our CI machine is a M1 MacMini, and I couldn't figure out how to get an Xcode bot to launch with Rosetta. Anyone have a trick for that? |
Running Xcode under Rossetta fixed the issue as a temporary workaround
** This will cause a decrease in speed and performance in Xcode and simulator |
Can anyone explain, why this error appears on Mac OS with M1 chip if the iPhone is ARM too? For me, no makes sense build works fine for one ARM device and the other don't. GooglePlaces still in ARM 32bit? |
The build on iOS simulator and the build on the Mac, both is running on M1. |
Please, for the love of god, is there any update to this? It shouldn't take half a year to support arm64 arch. |
I was helping @mikina set up a project depending on Google Maps today and ran I used the following vtool invocation: And here's a screenshot of running Google Maps SDK: |
@shalinipk thanks for reporting these issues. Since version 5.2.0, you should be able to opt-in to use the Metal rendering framework instead of OpenGLES. Currently using Metal is opt-in but this will be the default in a future version. GMSServices.setMetalRendererEnabled(true) As far as the crash that you linked, can you report that issue on the public issue tracker along with some repro steps? Thanks! |
In case you want to give a try to using Metal as the rendering framework, please be aware that it crashes in the iOS simulator! |
I still get a crash when trying to present street view for a given coordinate:
|
Probably missing “-ObjC” in link flags. |
Nope. |
@codeisjoy that issue should be addressed in version 6.0.1 (looks like you are still on 6.0.0). Give that a try instead. |
Thanks @arriolac @dcacenabes This is useful info. In case apple decides to pull the plug on OpenGLES, now I know what to do :) I will try to submit an issue sometime this week, also try getting rid of OpenGLES |
I confirm the issue is resolved on 6.0.1. |
Hello, I tried running the new SDK version 6.0.1, but I still get the error I am using Xcode 13.2.1, iOS 13.6 and M1 MacBook Am I doing anything wrong? |
How was this closed? It is definitely not working on my M1 Pro on simulator, seems there's a difference between arm64 for phone and for simulator? building for iOS Simulator, but linking in object file built for iOS, file '.../Pods/GoogleMaps/Base/Frameworks/GoogleMapsBase.framework/GoogleMapsBase' for architecture arm64 Using the latest versions: |
Opening XCode using Rosetta seems to resolve it for me - for now. |
Solving this means being able to build on M1 without Rosetta. |
Confirmed I can only build with Rosetta. Not perfect, but definitely an improvement! |
I'm able to run to run GoogleMaps on my M1 on a simulator. Did you try to remove and re-install the CocoaPods the arm64? Maybe this answer might help. |
And you're sure you're not running Xcode with Rosetta? I tried the solutions at the link you shared and can still only build with Rosetta (which to me isn't the end of the world). |
I run from a native terminal (not rosetta). Did you install the pods from scratch? I tried it now and it worked, i just had to do a manual |
I tried: No luck with non-rosetta. But I'm content with running in Rosetta. I'm just pumped to be able to use the simulator again. |
I did the following: Maybe you need to check that the rest of the toolchain is arm64 like Cocoapods, RubyGems etc. Not sure how all this works .. but if you are fine running on Rosetta 👍 |
I actually managed to run it once in an empty project, but don't know what i did. As soon as i started to add more pods everything broke. The problem i'm seeing is that Pods_projectname.framework is not generated on M1 |
Any news regarding running in XCode WITHOUT Rosetta???? I confirm that it runs only on Rosetta in XCode. |
I read more carefully the docs and it says that you need to add the .xcframework manually, using the pod will not work because it uses .framework |
also facing the same issue still. 🥲 |
Can you please elaborate on how to do this? I have patched react-native-maps to use 6.0.1 but it is still not using xcframework. Thanks. :) |
I did have the same issue using CocoaPods and I followed Google's suggestion to visit this StackOverflow thread. What resolved it for me was: |
Here it is: https://developers.google.com/maps/documentation/ios-sdk/config |
This solved my issue react-native-maps/react-native-maps#3527 (comment) |
What an absolute clown show by Google. The issue everyone is having is that Google did not actually put the fix into the CocoaPods release. You have to stop using CocoaPods and include the .xcframework manually. |
Hi folks, it looks like there's some confusion on the status of M1 mac support for the Maps SDK. I want to clarify that here. Getting the SDK to work on emulators on an M1 MacAs of version What about CocoaPods?As of version Further issues?If you have any further issues related to the Maps SDK for iOS, please view or open a new issue in the issue tracker for the Maps SDK for iOS. Otherwise, if you have an issue with the Maps SDK for iOS Utility Library, open an issue in this repository. I'm going to lock this conversation so this message is visible to others when they land here. |
The text was updated successfully, but these errors were encountered: