-
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
Xcode 12 GM Archive Error SPM - unexpected Mach-O header code: 0x72613c21 #6472
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Thanks for the report - I'll look into this right away. To confirm, did you add the |
@ryanwilson yeah it was the first thing I checked! I went back to the Xcode 12 beta 6 and had no issues at all. Something that might be of note is apple released a new version of the Xcode 12 GM with build number of (12A7209). Im currently downloading it and I will try with that version also as it could of been a Xcode bug. |
Yeah I'm downloading it as well, will report back when I can repro or not. Currently trying on 12A7208 but it's currently hanging when trying to check out grpc.. 😬 EDIT: it resolved, just took a while. |
I reproduced the issue, still unzipping the new GM seed and will test it there but I'll see if I can find a workaround for the first GM seed. |
Initial thought: if it's packaging for release, it may be trying to include all the architectures to run on device and it's not expecting to be run on the simulator? That's why it's searching for the arm64 architecture even though it's running on an x86 simulator. I tried running on device and get a different issue though, will try the new Xcode version. |
Yeah I think its something to do with that also. |
I can confirm I get the same issue with the new seed also. |
Same re: running with Release. I am able to Archive though, selecting "Any iOS Device (arm64)" and hitting "Product -> Archive" in the menu. Based on the original issue - you're unable to archive right? |
I can archive its when I try to upload to the App Store I get the |
Yeah, so right now the firebase framework artifacts are being copied into the |
This is due to a static framework being embedded within the |
Thanks @ThePragmaticArt for finding that! I'm wondering if that's an Xcode bug or that's an artifact based on how we set up our |
It seems to have to do with the |
Those are in fact the only binary frameworks that we offer - all the rest are source based. It could be due to packaging of the XCFrameworks since they're manually generated from regular .frameworks (we hope to be changing over to build XCFrameworks directly very soon), or it could be an issue with binary frameworks in general on the Xcode side. |
@ryanwilson I believe Realm has some embedded https://github.com/realm/realm-cocoa.git https://github.com/realm/realm-cocoa/tree/master/core Not sure if that helps as a reference point for something that might be similar. |
@ThePragmaticArt that must be outside of Swift Package Manager though - see here for where we define firebase-ios-sdk/Package.swift Lines 225 to 239 in cd84490
This was introduced in |
@ryanwilson interesting. I don't have anything separate I can test. I might be able to spin up something later today just to play around and see. Not sure if there are any quick samples that are already out there that could validate the behavior. It would be disappointing to hear there's a bug in the GM that requires a script to clean this up. |
It looks like this is related to PSPDFKit-labs/radar.apple.com@9b6c842 (FB7785691). This was an issue opened stating that the archive should include those frameworks, fixed in the GM, and now we're running into an issue for Firebase. @steipete - are you able to share how the XCFrameworks are generated and anything that may be going on here? Perhaps static vs dynamic frameworks? (Also, thanks for having that repo and the context - we would have been blind to it otherwise). |
Here's an yet unreleased blog post how we explain our SwiftPM integration: We use dynamic frameworks only, not statics, and the above radar has been fixed in the GM. Let me know if that helps, happy to share more to get Firebase across to SwiftPM! I also know the SwiftPM maintainer if we need further help. |
Thanks @steipete, helpful as always! :D That must be the issue, we package FrameworkAnalytics as a static framework. Will have to do some digging and chat offline with @paulb777 about how to proceed, but at least we have a workaround right now. Workaround:
|
Keep in mind that there is another issue cropping up on Xcode 12 GM when deploying to device https://forums.swift.org/t/swiftpm-binarytarget-dependency-and-code-signing/38953 |
As a temporary workaround for building add
|
@din that workaround did not work for me :( |
It looks like a workaround is excluding arm64 in the Build Settings. See https://stackoverflow.com/a/63622570 |
@paulb777 that doesn't work either, can't build to device. |
Hi guys.. i solved this problem changing the code signing identity. The target and project was different and i changed all for iOS Distribution according the provision profile file. |
Honestly shocked Apple haven't hotfixed this in 12.4 Xcode at least as it looks like it's been an issue for a while... ugh |
Confirmed this is still fixed in the Xcode 12.5 RC released today - will leave it open until the fix is the publicly released version. |
Now that Xcode 12.5 stable is release, this issue should be fixed, right? |
Confirmed that this issue is fixed in the public version of Xcode 12.5. 🎉 Thank you everyone for your patience and helping out with workarounds! If you did add a workaround for your project, it's probably best to remove it to ensure it doesn't cause any issues in the future. |
@ryanwilson Got it actually that issue got fixed, Please can you give a brief. It went a over my head a bit. Asking you because I faced same issue with static framework & IN XCODE 12.5. |
This issue is still exist on Xcode 12.5 (12E262). I could not upload the binary to App Store without adding Post-actions script. |
Hi @testAVD and @batuhansk, sorry for the trouble you're facing. Can you please try to reproduce this in a new project and let me know if you see the issue? If so, can you please confirm:
Thanks. If we can get a clean repro on Xcode 12.5 I'll re-open this issue. |
Hi @ryanwilson,
Thanks. |
@batuhansk Thanks for the confirmations. If you create a brand new project and only include FirebaseAnalytics, FirebaseMessaging, and FirebaseRemoteConfig do you see the same issue? |
[REQUIRED] Step 1: Describe your environment
[REQUIRED] Step 2: Describe the problem
When trying to upload an archive to App Store connect Xcode 12 GM gives me the following error:
Found an unexpected Mach-O header code: 0x72613c21
If I change my build configuration to development the app builds and runs fine but if I switch to a release configuration and try to run the app on the latest iOS 14 iPhone 11 Pro simulator I get the following error:
Undefined symbol: _OBJC_CLASS_$_FIRAnalytics
and the following warnings:
missing required architecture arm64 in file /Users/neil/Library/Developer/Xcode/DerivedData/Kantinebaas-gnwjztsimxavkscwhhoheneylhus/Build/Products/Alpha-iphonesimulator/FirebaseAnalytics.framework/FirebaseAnalytics
missing required architecture arm64 in file /Users/neil/Library/Developer/Xcode/DerivedData/Kantinebaas-gnwjztsimxavkscwhhoheneylhus/Build/Products/Alpha-iphonesimulator/FIRAnalyticsConnector.framework/FIRAnalyticsConnector
missing required architecture arm64 in file /Users/neil/Library/Developer/Xcode/DerivedData/Kantinebaas-gnwjztsimxavkscwhhoheneylhus/Build/Products/Alpha-iphonesimulator/GoogleAppMeasurement.framework/GoogleAppMeasurement (2 slices)
Steps to reproduce:
Archive and try to submit project with a release build configuration using Xcode 12 GM with Firebase analytics added to the project using SPM.
The text was updated successfully, but these errors were encountered: