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

GoogleSignInSwift build errors for Archive and SwiftUI Preview #153

Closed
Joebayld opened this issue May 25, 2022 · 5 comments · Fixed by #157
Closed

GoogleSignInSwift build errors for Archive and SwiftUI Preview #153

Joebayld opened this issue May 25, 2022 · 5 comments · Fixed by #157
Labels
bug Something isn't working

Comments

@Joebayld
Copy link

I'm having an issue when running a SwiftUI preview on my device while using this library. There's a bunch of errors thrown.. Attaching a screenshot for reference.

image

Whats odd is that it works fine when running the app on my device or in the simulator. It's really just an issue with SwiftUI previews on device. Any ideas?

@Joebayld
Copy link
Author

Joebayld commented May 25, 2022

An update on this:

I am also able to Archive an app. The same errors are thrown when Archiving an app.

It seems it has to do with using the SwiftUI GoogleSignInButton. If I go back to using a standard button, the issue is resolved.

@mdmathias
Copy link
Collaborator

Hello! I'm not sure what the issue is here. I was able to generate a preview of our sample app on my test device locally like the below.

image

Is it perhaps related to not having a preview made for your view? Or, maybe you're haven't added the GoogleSignInSwift dependency or imported it correctly? Another idea: perhaps the version of iOS you're trying to run against is too low? The GoogleSignInButton requires iOS 13 or higher.

@Joebayld
Copy link
Author

It's if you try to run the preview on your device. But make sure you have a GoogleSignInButton in your view. If anything - try to archive the app.

@mdmathias
Copy link
Collaborator

Thanks! I can reproduce this and am looking into it.

@petea
Copy link
Contributor

petea commented May 26, 2022

Thanks for bringing this to our attention. There is currently a problem with building the GoogleSignInSwift target for release (Archive, Analyze, and on device Swift Previews apparently) on iOS when using Swift Package Manager (SPM). This does not impact SPM macOS builds or CocoaPods builds for either iOS or macOS.

Because the Swift package shares platform min versions between its two targets (GoogleSignIn and GoogleSignInSwift), when building for iOS, the GoogleSignInSwift target is unnecessarily built with an armv7 slice and this part of the build fails with missing SwiftUI symbol errors. We are working on a solution for this.

@petea petea added the bug Something isn't working label May 26, 2022
@petea petea changed the title Errors when running SwiftUI Preview on device GoogleSignInSwift build errors for Archive and SwiftUI Preview on device May 26, 2022
@petea petea changed the title GoogleSignInSwift build errors for Archive and SwiftUI Preview on device GoogleSignInSwift build errors for Archive and SwiftUI Preview May 26, 2022
@petea petea linked a pull request May 26, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants