Error after App Store Connect submision. ITMS-90562: Invalid Bundle - ios

I have an App that integrates Framework A that I have developed.
Framework A has two (optional) weak-linked third-party dependencies, Framework X and Framework Y.
If I add both optional frameworks, everything works fine.
I don't need Framework Y in my App, so I'm adding to MyApp only Framework A and X.
Run on device works fine, upload to TestFlight works fine, but then I'm getting this email from App Store Connect, and build is marked as an Invalid Binary on App Store Connect.
App Store Connect Dear Developer,
We identified one or more issues with a recent delivery for your app,
Please correct the following issues, then upload again.
ITMS-90562: Invalid Bundle - One or more dynamic libraries that are
referenced by your app are not present in the dylib search path.
ITMS-90562: Invalid Bundle - The app submission can not be
successfully recompiled from bitcode due to missing symbols during
linking. You can try to reproduce and diagnose such issues locally by
following the instructions from:
https://developer.apple.com/library/archive/technotes/tn2432/_index.html
Best regards,
The App Store Team
I have tried editing Build Settings, but nothing happened, the error stays.
How I removed that error was by disabling Bitcode. Build Settings - Enable Bitcode - NO.
But that is not a solution for me.
I saw the same question on the Apple Developer forum. https://developer.apple.com/forums/thread/88814
After that, I tried to Validate App in the organizer, which went well. After that, I tried to export IPA for AdHoc distribution. But then I got an error:
ipatool failed with an exception: #<CmdSpec::NonZeroExitException: $ /Applications/Xcode.app/Contents/Developer/usr/bin/python3 /Applications/Xcode.app/Contents/Developer/usr/bin/bitcode-build-tool -v -t /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin -L /var/folders/cy/n0fltmsx671_s97kbtqvhcw80000gn/T/ipatool20220308-33623-uqn6vl/thinned-out/arm64/Payload/MyApp.app/Frameworks/FrameworkY.framework -L /var/folders/cy/n0fltmsx671_s97kbtqvhcw80000gn/T/ipatool20220308-33623-uqn6vl/thinned-out/arm64/Payload/MyApp.app/Frameworks/FrameworkX.framework --sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk -o /var/folders/cy/n0fltmsx671_s97kbtqvhcw80000gn/T/ipatool20220308-33623-uqn6vl/thinned-out/arm64/Payload/MyApp.app/Frameworks/FrameworkA.framework/FrameworkA --generate-dsym /var/folders/cy/n0fltmsx671_s97kbtqvhcw80000gn/T/ipatool20220308-33623-uqn6vl/thinned-out/arm64/Payload/MyApp.app/Frameworks/FrameworkA.framework/FrameworkA.dSYM --strip-swift-symbols /var/folders/cy/n0fltmsx671_s97kbtqvhcw80000gn/T/ipatool20220308-33623-uqn6vl/thinned-in/arm64/Payload/MyApp.app/Frameworks/FrameworkA.framework/FrameworkA
I saw a similar error in this post: https://developer.apple.com/forums/thread/663112
If at export I disable Bitcode, I'm able to export the IPA file.
I'm not sure if I'm doing something wrong or is there a bug on Apple's side with Bitcode, but I hope that maybe someone had the same problem.

Removing Bitcode is not a good approach since it will not slim the ipas for installation.
What I'm doing at the moment is to use Xcode 13.2.1 for the upload of my project.

Related

Unable to upload build to App Store Xcode 13.2. Invalid Bundle Structure

I am trying to upload build on AppStore using Xcode 13. But when I try to do so, I am getting the below error
Invalid Bundle Structure - The binary file 'MyApp.app/Frameworks/HHUnitConverter.framework/HHUnitConverter' is not permitted. Your app can’t contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure.
When I archive the build and make it ready for upload, this is how my framework looks which is not correct I suppose
And when I click on upload, after sometime I am getting this error.
I have tried deleting and reinstalling the pods, restarting Xcode and the system, clearing derived data, but nothing works.
Any help will be appreciated. Thanks in advance

Xcode app distribution fails after update of OS and Xcode

I have such an error in the organizer while distributing my app. The app builds and works ok in Debug mode on simulator or iPhone. It also Archived but I cannot distribute it via Development distribution from organizer!
ipatool failed with an exception: #<CmdSpec::NonZeroExitException: $ /Applications/Xcode-beta.app/Contents/Developer/usr/bin/python3 /Applications/Xcode-beta.app/Contents/Developer/usr/bin/bitcode-build-tool -v -t /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin --sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.4.sdk -o /var/folders/ls/0vdttqm92zq1rtcsjntc4mxw0000gn/T/ipatool20200210-7826-1kq2c5j/thinned-out/arm64/Payload/CRM\ Dev.app/Frameworks/GoogleUtilities.framework/GoogleUtilities --generate-dsym /var/folders/ls/0vdttqm92zq1rtcsjntc4mxw0000gn/T/ipatool20200210-7826-1kq2c5j/thinned-out/arm64/Payload/CRM\ Dev.app/Frameworks/GoogleUtilities.framework/GoogleUtilities.dSYM --strip-swift-symbols /var/folders/ls/0vdttqm92zq1rtcsjntc4mxw0000gn/T/ipatool20200210-7826-1kq2c5j/thinned-in/arm64/Payload/CRM\ Dev.app/Frameworks/GoogleUtilities.framework/GoogleUtilities
Status: pid 8359 exit 2
Stdout:
SDK path: /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.4.sdk
SDK version: 13.4
UPDATE
If I uncheck Rebuild form bitcode then it distributes. But I think it can cause problem later if I want to distribute app to App Store?
need to check the transporter App Apple launches to upload the apps to app Store
https://developer.apple.com/news/?id=10152019a. It's going to help
iOS 13.4 is a beta version. The app store doesn't accept builds created with beta versions.
We've got similar issue, which is described here. No needs to distribute without bitcode. Long story short, there were LLVM instrumentation included, which prevents AppStore processing. I've written a whole blog about XCode 12 and BigSur issues with XCFramework.
To sum up, here is a few required steps to make sure while creating XCFramework for distribution:
Using archive builds is a MUST, release build isn't enough
BUILD_LIBRARY_FOR_DISTRIBUTION must be set to YES
SKIP_INSTALL must be set to NO
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO to turn off GCC instrumentation and remove them from the binary
CLANG_ENABLE_CODE_COVERAGE = NO to turn off code coverage tools from the binary
Having all of the above helped to solve our preparing and distribution problem and hopefully save you some time if you happened to face same issues as we did.

ARkit and Appthinning.plist error

I have created a project under Unity with the ARKit plugin.
I have used the right versions. I compile from Unity, compile from XCode, archive and sent the (.ipa) on iTunes connect.
But, I received this error :
"Dear developer,
We have discovered one or more issues with your recent delivery for "Kouji". To process your delivery, the following issues must be corrected:
This bundle is invalid - Your archive contains paths that are not allowed: ( "AppThinning.plist" )
Once these issues have been corrected, you can then redeliver the corrected binary.
Regards,
The App Store team
"
My problem is that I found nowhere on internet a solution to these problems. Even on the apple developper website, this error is not listed.
If anyone can help me, it would be fantastic !
I used an other method.
In Xcode, instead of "Publishing the app", I exported it for the app store.
Then I used these commands to delete the file, create a new ipa and push it on iTunes connect with the App loader.
mkdir extract
unzip -qo MyApp.ipa -d extract
cd extract
ls
rm AppThining.plist
zip -qry ../MyApp.Fixed.ipa .
Please refer this answer fixed my problem
Dont uncheck the Strip Swift symbols while uploading to AppStore
Check this image:
Stackoverflow Answer
Apple Developer Forum

Cocoapods/ CrittercismSDK causing App Submission Error: ITMS-90035

I am trying to upload an app to Testflight using XCode 6.3. However, on trying to validate the app, it is giving me the error message below:
I have tried regenerating the certificates and provisioning profiles without having any success.
ERROR: ERROR ITMS-90035: "Invalid Signature. Code object is not signed
at all. The binary at path [VirtualMechanic.app/dsym_upload.sh]
contains an invalid signature. Make sure you have signed your
application with a distribution certificate, not an ad hoc certificate
or a development certificate. Verify that the code signing settings in
Xcode are correct at the target level (which override any values at
the project level). Additionally, make sure the bundle you are
uploading was built using a Release target in Xcode, not a Simulator
target. If you are certain your code signing settings are correct,
choose "Clean All" in Xcode, delete the "build" directory in the
Finder, and rebuild your release target. For more information, please
consult
https://developer.apple.com/library/ios/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html"
That dsym_upload.sh script does not belong in the app bundle as it's the script that is run as part of a Build Phase that is used to upload the debug symbols to Crittercism.
Find the Build Phase that is copying it into the app bundle and remove it, however please note that it will still need to be run within a Build Phase.
Here's the official Crittercism Support Article related to the issue which recommends upgrading the pod to version 5.2.0.

Xcode / Why do we need to copy ~/Library/MobileDevice/ to /Library/MobileDevice/?

While running the command cordova run ios, or ionic run ios, I came across this error:
Check dependencies
Code Sign error: No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID “31e9e9bb-8da1-48c6-9256-ec365145a0ac”, however, no such provisioning profile was found.
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.1'
At first glance, I decided to refresh my provisioning profiles, ensuring that they were valid and reachable.
However, same issue occurred.
I'm pointing out that running the app from Xcode directly worked/works great.
Until I ... came across this post, suggesting to run this command:
cp -r ~/Library/MobileDevice/ /Library/MobileDevice/
Tried it and...the whole works!
I found that very...ugly and totally non-intuitive.
May anyone explain the essence of this kind of copy?
Isn't Xcode smart enough to handle that automatically?
That works, indeed, but I never want to admit things I don't figure out ;)
I don't understand what I've done.

Resources