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
SwiftUI Previews Not Working When Using Analytics via SPM #6374
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Possibly related issue? #6360 (comment) |
Tried removing |
@StarLard Thanks for the report. This looks very similar to #6360 which we haven't been able to reproduce. Are you able to share a reproducible example? For the most recent comment, it seems that the Xcode project has lingering references to |
Thanks for the report, I was able to reproduce this one! It works in the simulator but previews are broken, meaning it's different from #6360. Will try with the other package managers as well, but for now here's what I did:
Note: there are multiple warnings above and below that gives us a clue at what's going on, it looks like SwiftPM is looking for the
Then at the error:
Looking at the Info.plist contents:
|
As noted in #6375 this happens in Zip file as well, so it must be related to the framework itself and how Xcode tries to run it. |
A workaround is adding arm64 to the Excluded Architectures Build Setting. Thanks to https://developer.apple.com/forums/thread/656509?answerId=627644022#627644022. |
@paulb777 To be clear, adding |
Yup, this was the case. I had to completely remove and reinstall Firebase from my project to get it to remove. Clearing package caches did not work. |
@StarLard @kylebrowning I believe the issue you're discussing is the same as #6360 and should now be resolved with an update. See that issue for details. I'll close this issue now since the missing symbol issue has a workaround and seems to be a reported Xcode issue. If you're seeing otherwise, please comment or open a new issue and we'll continue the investigation. |
Hi @paulb777 I've updated to the latest version of the Also while excluding |
For anyone else experiencing this issue: A workaround to get previews working is to declare a separate package library target that depends on your main target and only import FirebaseAnalytics there; similar the the Firebase package structure itself. |
Step 0: Are you in the right place?
file a Github issue.
with the
firebase
tag.google group.
of the above categories, reach out to
Firebase Support.
this repository, please delete this section.
[REQUIRED] Step 1: Describe your environment
Swift Package Manager
[REQUIRED] Step 2: Describe the problem
Steps to reproduce:
What happened? How can we make the problem occur?
-ObjC
flag as per instructions.Building app succeeds, but attempting to run the app will produce the following error:
Adding
arm64
to the 'Excluded Architectures' setting as suggested herewill change the previews error to the error produced while attempting to run.
If you have a downloadable sample project that reproduces the bug you're reporting, you will
likely receive a faster response on your issue.
Relevant Code:
Swift package declaration:
The text was updated successfully, but these errors were encountered: