-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
GoogleSignIn SDK on Apple Silicon (M1) #7208
Comments
I found a few problems with this issue:
|
@malcolmdeck Sorry about the trouble. GoogleSignIn has not yet added support for the simulator on ARM-based Macs. |
thank you for your info @paulb777 . Did you have a timeline for this or some place where I can stay updated? |
@malcommac Sorry I don't have a timeline. This has also been raised at https://developer.apple.com/forums/thread/668320. I'll leave this issue open and update when we get an update from the GoogleSignIn team. |
Thank you I'll continue to follow this thread |
+1 The GoogleSignIn SDK hasn't seen an update in more than an year, so it's not looking good... |
Did you know if there are alternatives? I would check if it’s still possible by implementing it manually. |
Yeah I would like to know if it's possible to implement manually. This issue is killer. |
+1 |
1 similar comment
+1 |
Yes there is. Google sign in is basically using OAuth so you can manually implementing it using URLSession and/or a WKWebView. |
I’m not sure it’s possible anymore; google blocked login from embedded browsers in 2017; the only way is to jump in safari out of the app. |
Workaround that I am using is running Xcode with Rosetta 2. |
The simulator runs terribly under Rosetta, at least on my machine. Google, can we please get an update for this? M1s have been out for a while now. |
Yeah absolutely. About three months are passed and there are no news, no dates, everything is obscure. |
While waiting for Google team to update... If GoogleSignIn is not a critical part of your app, and you just want to run and develop other parts of the app on M1, then you can create a Xcode configuration for only M1 Mac, and don't have to run Xcode on Rosetta. The configuration can be used for exclude GoogleSignIn when build the app:
Then in Build settings, add a flag to check if current configuration is able to import GoogleSignIn: ( Finally in code: #if !FAT_FRAMEWORK_NOT_AVAILABLE
import GoogleSignIn
#endif
class GoogleSignInManager: NSObject {
#if !FAT_FRAMEWORK_NOT_AVAILABLE
private let gid: GIDSignIn = GIDSignIn.sharedInstance()
#endif
/// Simply do nothing on M1 Mac
func signIn(presenter: UIViewController) {
#if !FAT_FRAMEWORK_NOT_AVAILABLE
self.presenter = presenter
gid.delegate = self
gid.presentingViewController = presenter
gid.signIn()
#endif
}
} Hope it helps someone! I'm currently using this method for my team to still able to developing on M1 while keep building the app for CI/CD on Intel mac mini. |
@paulb777 |
Sorry about the lack of visibility on GoogleSignIn. There has been some progress and I'll investigate what can be shared. @voidless GoogleTagManager is another product from another team, so another issue would be helpful. |
I've solved this for now by wrapping all GIDSignIn stuff in |
Any news? |
This is our last pod before we can get our app running on M1. We've already replaced google places because of the same issue, but unlikely we'll be able to do the same here. Hopefully this is fixed soon |
I'm afraid to say that AppAuth gives us a bit different experiences against GoogleSignIn SDK. It seems to use the webview to process the sign in with AppAuth. Instead, GoogleSignIn SDK is more like the native one. Currently GoogleSignIn is not working on simulator on Apple Silicon only, working fine on release. Changing to AppAuth means the whole different story to me. |
It took me less than two hours to make the switch to AppAuth, so it’s not that hard. Not being able to run on the sim is a deal breaker for a lot of folks. Are you saying you test after you release? Lol. Also, googlesignin is the only framework I use that hasn’t added SPM support. Once I left it behind, no more cocoapods. |
No, debug on Apple silicon using simulator is still possible, it's working pretty fine right now for my projects. |
Also google places. It seems googles closed source frameworks are pretty much ignored. They have not been updated in ages. |
Here is my workaround for my project running on simulator.
$ pod install --repo-update
$ yarn ios |
That won't work on Apple Silicon, as the simulator is considered ARM64, as has been mentioned in other previous comments. |
Then there must be some detail you're leaving out, as I just tried this and it fails. Excluding Arm64 for simulator sdk ON APPLE SILICON won't link. How could it? |
Here's another hacky workaround: you can manually edit the arm64-apple-ios My team is using this to unblock ourselves, but it's obviously an unsavory workaround, and liable to break in future Xcode or macOS versions. |
@diegostamigni Xcode will instead build x86_64 arch, and you'll have to also open the simulator in Rosetta |
If you are too lazy to write it, we did it for you 🤗 We have created OpenGoogleSignInSDK 🎉 |
Great work Honza, thank you, works great 👍 |
@mattdamon108 That is an unsupported hack, and it will apparently not work any longer under macOS 12. |
I'm happy to announce that next week we'll be making a substantive update to Google Sign-In for iOS that will provide Simulator support on M1 Macs in addition to other improvements. It's taken longer than we would have liked, but the wait is nearly over. I'll provide another update here as soon as the new release is available. |
SPM support? |
Yes, Swift Package Manager will be supported as well. |
@petea Hi there, do you know which day could be the release? |
Google Sign-In iOS 6.0.0 has just been released and is now open source on GitHub! |
And includes M1 support! Thanks @petea! |
Thank you! ❤️ @paulb777 are you planning to release a prebuilt binary of |
@acecilia Yes, the prebuilt binary is planned to be part of the 8.4.0 binary distributions cc: @ryanwilson |
@yemd I've responded here: google/GoogleSignIn-iOS#26 |
Thank you, I sent you a Podfile.lock |
I have the same problem with Google Sign-in for React Native version where the pod requires version 5.0 and I can't change it to 6 |
Yep - the conclusion at google/GoogleSignIn-iOS#26 is React Native support is dependent upon the resolution of react-native-google-signin/google-signin#948. Please follow along there. |
Closed for comments. Please do any additional followups at https://github.com/google/GoogleSignIn-iOS |
Hi, I tried to build my project on an M1 machine after updating the Firebase SDK to
7.2.0-M1
. However I still get this linking error on GoogleSignIn SDK.I'm not sure this is the right place to report it but the project itself does not have a repo and I supposed it's part of the same family.
This is the error:
ld: in .../Pods/GoogleSignIn/Frameworks/GoogleSignIn.framework/GoogleSignIn(GIDEMMErrorHandler_3a47e13d8ca81b41e9cdb7ef5468004a.o), building for iOS Simulator, but linking in object file built for iOS, file '..../Pods/GoogleSignIn/Frameworks/GoogleSignIn.framework/GoogleSignIn' for architecture arm64
The text was updated successfully, but these errors were encountered: