I am getting Code signing error while uploading app to App Store, it is working fine in simulator and device, only getting this error while uploading.
This target of my app is using a framework developed by me, so previously it was giving an error of code signing for the framework, so I did some changes related to code signing and it's gone, but now it is giving same code signing error for my app target.
It was working fine with Xcode 11 (Building and uploading), I did some changes in framework related to build architecture to make it compatible with Xcode 12.
Interestingly the error page says View distribution logs for more information, but the only information I found related to this issue is below,
Library/Developer/Xcode/Archives/2021-06-27/MyApp 27-06-21, 4.26 PM.xcarchive/Products/Applications/MyApp.app/MyApp>’, hardenedRuntime='0'>'> to: /var/folders/k6/jqdbxs4x6_d65495_v9127180000gn/T/XcodeDistPipeline.~~~v6vq0l/entitlements~~~a8rUuu
2021-06-27 10:56:59 +0000 Running /usr/bin/codesign '-vvv' '--force' '--sign' 'A5640AE3DE907C3AC86E500508C5B6A3096D871F' '--entitlements' '/var/folders/k6/jqdbxs4x6_d65495_v9127180000gn/T/XcodeDistPipeline.~~~v6vq0l/entitlements~~~a8rUuu' '--preserve-metadata=identifier,flags,runtime' '/var/folders/k6/jqdbxs4x6_d65495_v9127180000gn/T/XcodeDistPipeline.~~~v6vq0l/Root/Payload/MyApp.app'
2021-06-27 10:57:00 +0000 /var/folders/k6/jqdbxs4x6_d65495_v9127180000gn/T/XcodeDistPipeline.~~~v6vq0l/Root/Payload/MyApp.app: internal error in Code Signing subsystem
2021-06-27 10:57:00 +0000 /usr/bin/codesign exited with 1
Fix: Set Enable Bitcode to No from Build Settings.
This is clearly Xcode 12 bug, something is mismatched while enable bitcode, I tried uploading build from Xcode 13 beta and uploading was working fine, of course it was rejected by AppStore connect because of beta SDK.
If you are using third party framework, make sure you embed Framework, Otherwise you will get crash on launch in release build, here is the detailed missing framework crash solution by Apple.
Related
Trying to get the WeatherKit Beta working. have had the same error on Xcode 14 Betas 3/4/5 on both the simulator and physical device using the apple provide an example from WWDC or a simple project to load weather data.
The error output is always:
2022-08-12 15:56:02.825925-0400 WeatherPup[47533:15014528] [AuthService] Failed to generate jwt token for: com.apple.weatherkit.authservice with error: Error Domain=AMSErrorDomain Code=12 "Mescal Failed" UserInfo={NSLocalizedDescription=Mescal Failed, NSLocalizedFailureReason=SAPInit failed: -42049}
Has anyone been successful in building using this Beta yet? I would imagine it should work since the dark sky weather service is still running.
I have all certificates, identifiers, and privileges setup as they should be and triple-checked bundle identifiers, etc.
I've had the same issue and here are the 2 things I had to do to make it work:
Make sure that you have the WeatherKit checkbox checked under the development portal in both places - Capabilities and App Services:
As of Beta 5 I've only been able to successfully fetch weather information from the API when building on a real device.
I believe it has been generally confirmed that WeatherKit is not working correctly on XCode simulators. I haven't been successful yet with a Sim but physical iPhone device works fine. WK documentation is lacking.
I have the same issue. It doesn't work on simulator XCode 14 beta 6 and earlier.
It's working only on physical device with iOS16 Beta
Except of using physical device be sure You:
1.Configured correctly identifier. You have to select "WeatherKit" under "Capabilities" and "App Services" and waited at least 30min
2.Be sure You have added WeatherKit capabilities in XCode under Singing & Capabilities tabs in project settings
For more info visit:
https://help.apple.com/developer-account/?lang=en#/devfe6684fd6
https://developer.apple.com/weatherkit/get-started/
An screenshot of the error is here
It happens when trying to upload the app to Apple Connect from Xcode after achieving.
Here are the logs: IDEDistributionPipeline.log
2021-06-18 05:59:30 +0000 Running /usr/bin/codesign '-vvv' '--force' '--sign' '93D0804B68D64BEB32D3E27D45905B528D468CAE' '--entitlements' '/var/folders/l9/lc4s2hls2vg03bs4g3bct1d00000gn/T/XcodeDistPipeline.~~~1slhOn/entitlements~~~OmmxKx' '--preserve-metadata=identifier,flags,runtime' '/var/folders/l9/lc4s2hls2vg03bs4g3bct1d00000gn/T/XcodeDistPipeline.~~~1slhOn/Root/Payload/Belen.app/Frameworks/AppAuth.framework'
2021-06-18 05:59:30 +0000 /var/folders/l9/lc4s2hls2vg03bs4g3bct1d00000gn/T/XcodeDistPipeline.~~~1slhOn/Root/Payload/Belen.app/Frameworks/AppAuth.framework: internal error in Code Signing subsystem
2021-06-18 05:59:30 +0000 /usr/bin/codesign exited with 1
I'm importing this framework using CocoaPods.
Any ideas how can I fix this issue?
I've been struggling with this error for over a week.
Thanks!
This is a known issue on macOS Monterrey. Apple engineers are working on it.
My workaround was to simply use another Mac with macOS Big Sur and it worked.
First of all it might be good for us to know how you added AppAuth to your project. CocoaPods? Carthage? How exactly?
I think you also added the Framework wrong in your Xcode project by asking Xcode to "Embed and Sign" it, even though that framework is not your own code.
To change that setting open your project, select your apps target, go to the General tab and then scroll down to "Frameworks, Libraries and Embedded Content". Look for AppAuth.framework and change the selection to "Do Not Embed". This should do the trick.
it looks like impossible for me archiving and uploading an app (previously iOS) to app store ad a mac catalyst app.
The problem is this app uses a framework, XCFramework format, compiled both for iOS, simulators, and maccatalyst. iOS upload has no problems. macOS upload has this error:
Code signing "A" failed
and digging in the logs:
"code object is not signed at all"
XcodeDistPipeline.~~~o9FYy8/entitlements~~~NynJeN' '--preserve-metadata=identifier,flags,runtime' '/var/folders/52/c95qs7cj1bj7svn9dnn3sr7w0000gn/T/XcodeDistPipeline.~~~o9FYy8/Root/Applications/VisualNoteApp.app/Contents/Frameworks/VisualnoteIosBle.framework/Versions/A'
2021-05-18 12:30:18 +0000 /var/folders/52/c95qs7cj1bj7svn9dnn3sr7w0000gn/T/XcodeDistPipeline.~~~o9FYy8/Root/Applications/VisualNoteApp.app/Contents/Frameworks/VisualnoteIosBle.framework/Versions/A: replacing existing signature
2021-05-18 12:30:18 +0000 /var/folders/52/c95qs7cj1bj7svn9dnn3sr7w0000gn/T/XcodeDistPipeline.~~~o9FYy8/Root/Applications/VisualNoteApp.app/Contents/Frameworks/VisualnoteIosBle.framework/Versions/A: code object is not signed at all
2021-05-18 12:30:18 +0000 /usr/bin/codesign exited with 1
"VisualnoteIosBle"is my framework
I saw some discussion on this online and tried:
disabling bitcode on both the framework and the app
compiling for maccatalyst only
stripping bitcode with xcrun bitcode_strip (I get a "bundle format is ambiguous (could be app or framework)" after this)
including directly my source in the app (I get a lot of other errors in the objective C and swift bridge)
the framework is distributed via cocoapods but including it directly give the same error
what am I possibly doing wrong? why so difficult to compile a simple framework?
I'm running out of option here ...
I'm running into an annoying problem that I'm hoping someone can shed some light on. We have an iOS framework that is built outside of Xcode and is embedded in our iOS app. Running (debugging) the app via Xcode (9.4) works great on a simulator.
The problem is that when we run (debug) it on a device, the install fails with this error:
installd: 0x16f9eb000 +[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL: withOptions: error: ]: 147: Failed to verify code signature of /private/ var/ installd/ Library/ Caches/ com.apple.mobile.installd.staging/ temp.BGuE4G/ extracted/ MyApp.app/ Frameworks/ MyFramework.framework : 0xe8008001 (An unknown error has occurred.)
If I change the app target's signing identity/profile to distribution/ad hoc and run (debug) it, then it installs just fine (but course, doesn't let you actually attach to the process since it was signed for distribution). Then if I change the identity/profile back to development (without rebuilding the framework) and run it again, then it launches on the device and the debugger attaches just fine.
I can then edit-build-debug the app as many times as I like and it works great on the device every time. But as soon as I rebuild the framework and then run the app, I get the error again and have to repeat the process of switching to distribution and back before I can debug it.
So it appears to me that Xcode isn't properly signing the framework each time I run it - I have to trigger the signing myself by switching to distribution and back to development any time the framework changes. I've tried cleaning the app's project and derived data after rebuilding the framework but I still get the error.
I'd appreciate any ideas on how to troubleshoot this further or simply how to avoid needing to change the signing settings every time we change the framework (which is very frequent).
Thanks!
I use the Xcode7 release and tried so submit my app for review. After submitting the app for review I got a mail from Apple with the following error:
Invalid Bundle - Failed to verify bitcode in
testapp_main.framework/testapp_main: error: Bundle only contains
bitcode-marker Testapp.app/Frameworks/testapp_main.framework/testapp_main (armv7) ...
I also disabled bitcode in my Build Settings:
How do I solve this issue?
I'm having the same issue. Bitcode is enabled in both the framework that I've created myself and the incorporating project. Architectures are arm64, armv7, armv7s. Deployment target is iOS 8.0. SDK is iOS 9 (Xcode 7.0.1).
These are the errors that I get when it fails:
"Solution"
When trying to validate or submit to iTunes Connect, unchecking either "Include app symbols..." or "Include bitcode" allows validation to succeed. It's just when both of them are checked that it fails. I wouldn't really consider this a solution though.. You either have to give up receiving crash logs or utilizing app thinking, both of which would be preferably enabled. This is just a temporary workaround until someone else can figure out what is really causing the issue.
Encountered this issue when trying to Archive a flutter project.
The solution I found is to to uncheck Rebuild from Bitcode, and click Next before the error shows up.