Closed hrabkin closed 1 year ago
Hello! Sorry you're having a problem.
I think perhaps this is a consequence of your set up and not with the library itself. I've attached a demo project that you can use as a reference. Here's what I did:
@import GoogleSignIn;
to the framework's header. See screenshot below..xcodeproj
file, select the "General" tab and make sure to add the framework you created and added to the project navigator. See screenshot.
I'm closing this for now as I think the issue is resolved. Please feel free to comment here if you're finding a bug with the GoogleSignIn-iOS. If you do, please include reproduction steps.
Thanks for your quick feedback it helped to move on but I still experience issues with GoogleSignIn. Sorry might be a separate issue but unfortunately if I use the option I can't distribute my framework as XCFramework with GoogleSignIn dependency.
I see the following error at building
Here's demo project with aggregate target for XCFramework and linked GoogleSignIn dependency. FrameworkDemo 2.zip
I suppose it is something with module map exporting.
I don't know what you mean by the following:
Sorry might be a separate issue but unfortunately if I use the option I can't distribute my framework as XCFramework with GoogleSignIn dependency.
Sadly, I can't download your attached demo. Please list exact steps to reproduce your problem. Also, the screenshot of the error doesn't really help since I can't see the error. Please add any error you see as well.
In any case, did you reproduce the steps I listed above? It should work. I suggest you start from a clean project if you haven't already.
I can't build XCFramework with GoogleSignIn dependency. Including demo one more time, so that you could see the error output by your own eyes as how Xcode generates it, there's no more details about except those I have shared in the screenshot.
Sorry, I meant that I'm not going to download the zip. I don't mean to be rude; I just don't think it's a good practice.
In any case, please follow my suggestion in https://github.com/google/GoogleSignIn-iOS/issues/333#issuecomment-1703097828 and let me know what happens. If there is an issue, please provide the exact steps you took and the error you found. That will help me to reproduce and provide support.
@mdmathias oh well, its weird, why should you ask me to download your archive if its meant to be not a good practice. Anyway I have tried your approach, it works for my original sample but doesn't when I build xcframework. I hope steps of reproduction are more clear now and I have answered your question.
I'm sorry that it feels like a double standard; I am working with some restrictions due to my role.
I'm still not sure what error you're seeing. Also, I cannot reproduce the problem you describe. For example, in FrameworkDemo.zip above, you will see that there is a project that is just a framework: SwiftFrameworkTest. I am able to build that project. I also added a small file to SwiftFrameworkTest and added import GoogleSignIn
to that file. I was able to create an instance of GIDSignIn
as a property in that class and build without problem. I also was able to add a test target to the framework, and was able to create an instance of that class I made and assert that the GIDSignIn
property was not nil.
I suggest that you break things down piece by piece. Build up piece-by-piece. It honestly feels like you have a problem with how your getting your dependencies.
Best of luck.
Ok, It works with simple framework, as I said that might be it should be a separate issue because it doesn't with XCFramework, full error: "failed to verify swift interface swift-interface-format-version: 1.0" pointing on GoogleSignIn at building it.
It looks like this might be a bug outside of GoogleSignIn: https://github.com/apple/swift/issues/64669. That link has some context and I think some workarounds that you might be able to try.
Describe the bug
Swift Storyboard project with linked custom framework which has GoogleSign 7.0.0 as dependency When GoogleSignIn is linked as transitive dependency there's an error "Missing required module 'GoogleSignIn'"
To Reproduce Steps to reproduce the behavior:
Expected behavior No errors
Screenshots![Screenshot 2023-08-18 at 15 35 30](https://github.com/google/GoogleSignIn-iOS/assets/2230377/1308ab15-ac63-4a9a-b169-e80ea6da3d9f)
Environment
Here's test project to reproduce framework-tests.zip