Skip to content

SwiftUI Previews wont run #6375

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

Closed
Baza207 opened this issue Aug 31, 2020 · 4 comments
Closed

SwiftUI Previews wont run #6375

Baza207 opened this issue Aug 31, 2020 · 4 comments
Labels
api: analytics beta-software Related to using beta iOS or Xcode versions. SwiftUI Issues directly related to Apple's SwiftUI framework zip Issues related to binary distribution (zip file)

Comments

@Baza207
Copy link

Baza207 commented Aug 31, 2020

[REQUIRED] Step 1: Describe your environment

  • Xcode version: Xcode 12.0 beta 6 (12A8189n)
  • Firebase SDK version: 6.31.0
  • Firebase Component: FirebaseAnalytics
  • Component version: 6.8.0
  • Installation method: Zip file

[REQUIRED] Step 2: Describe the problem

Steps to reproduce:

Since Xcode 12 b5 (and now b6) SwiftUI previews do not run. Running on a device seems to work fine, however the previews always throw an error.

ld: in Frameworks/Firebase/FirebaseAnalytics/GoogleAppMeasurement.framework/GoogleAppMeasurement(APMEExperiment_b2a748bf275090fe4fe9f58d85ea296b.o), building for iOS Simulator, but linking in object file built for iOS, file 'Frameworks/Firebase/FirebaseAnalytics/GoogleAppMeasurement.framework/GoogleAppMeasurement' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

This seems to have been a change in Xcode 12 since b5, but I'm not sure if it's a bug (and so will be fixed in a later beta past the current b6 where it's still happening) or if this is something that needs to be fixed in Firebase itself.

It sounds like there's a static framework in GoogleAppMeasurement that for whoever reason Xcode is unable to run in the simulator (and so SwiftUI previews). Interestingly though however the app does run in the simulator directly, just not SwiftUI previews.

Note: I was having this issue also with the ML framework, but then updating it to the latest version got rid of that error and showed this one. It was the same error, but now it's talking about GoogleAppMeasurement.

Relevant Code:

No specific code available.

@google-oss-bot
Copy link

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@Baza207
Copy link
Author

Baza207 commented Aug 31, 2020

Possibly related to #6374 and/or #6219.

@paulb777 paulb777 added api: analytics zip Issues related to binary distribution (zip file) and removed needs-triage labels Aug 31, 2020
@paulb777
Copy link
Member

Thanks for the report. It could also be related to #5562.

@paulb777 paulb777 added the beta-software Related to using beta iOS or Xcode versions. label Aug 31, 2020
@ryanwilson
Copy link
Member

ryanwilson commented Aug 31, 2020

This looks to be the same as #6374 even though it's using a different package manager, so I'll close this and use that as the issue to track it since it was opened first. I've written a summary and a repro in this comment. Thanks for the report!

@ryanwilson ryanwilson added the SwiftUI Issues directly related to Apple's SwiftUI framework label Aug 31, 2020
@firebase firebase locked and limited conversation to collaborators Oct 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: analytics beta-software Related to using beta iOS or Xcode versions. SwiftUI Issues directly related to Apple's SwiftUI framework zip Issues related to binary distribution (zip file)
Projects
None yet
Development

No branches or pull requests

4 participants