IPA processing failed in Xcode when trying to create distribution - ios

I am trying to build and create a new IPA file (Enterprise Distribution, not app store) and I am having difficulties. This is an app that I have not touch for about a year, but need to create new binaries due to expiring cert.
Environment: macOS 10.15.7, Xcode 11.5 (Swift 5.2.4)
I first upgraded to XCode 12.4, but had issues with Swift versions and 3rd party libraries that I use, so I went back to Xcode 11.5. I am using Carthage and it seems to run fine and Xcode builds fine, but it errors out after clicking on Distribute App: Product -> Archive -> Distribute -> Enterprise/Development -> “IPA processing failed”:
In the log, I see this about Alamofire, which seems to be the issue:
2021-02-18 18:23:00 +0000 Scanning IPA...
2021-02-18 18:23:00 +0000 Assertion failed: Expected 4 archs in otool output:
/var/folders/6_/t3d3774j3k51w0xwhdswhw880000gn/T/IDEDistributionOptionThinning.~~~UiyRoc/Payload/POS
Pad.app/Frameworks/Alamofire.framework/Alamofire:
Carthage libraries:
github "Alamofire/Alamofire" "5.4.1"
github "AuthorizeNet/sdk-ios" "4.2"
github "Hearst-DD/ObjectMapper" "4.2.0"
github "SwiftyJSON/SwiftyJSON" "4.3.0"
github "TakeScoop/SwiftyRSA" "1.6.0"
github "emaloney/CleanroomLogger" "6.0.2"
github "glock45/swifter" "1.5.0"
github "jzau/fpingx" "0.1.2"
I have "/usr/local/bin/carthage copy-frameworks" in Build Phases (as always). I have also added the Run Script from here: 'IPA processing failed' while distributing build in Xcode Beta, but that did not help.
I only need this to run on iPad Air 2 and later (but it would be good if it also runs on the iPad emulators).
I have never seen this error before and help to get this working would be much appreciated!

Related

I just can't get App Check to work on my iOS deployment

I have been trying and trying to enable App Check for the iOS version of my app. The Android version is working fine.
I have followed the instructions at: https://firebase.google.com/docs/app-check
Here is my build output:
flutter build ipa
💪 Building with sound null safety 💪
Archiving [bundle ID]...
Updating project for Xcode compatibility.
Upgrading Runner.xcscheme
Automatically signing iOS for device deployment using specified development team in Xcode project: [team ID]
Running pod install... 10.6s
Running Xcode build...
└─Compiling, linking and signing... 10.8s
Xcode archive done. 358.4s
Built .../build/ios/archive/Runner.xcarchive.
Building App Store IPA... 4.2s
Encountered error while creating the IPA:
error: exportArchive: "Runner.app" requires a provisioning profile with the Push Notifications and App Attest features.
Try distributing the app in Xcode: "open .../build/ios/archive/Runner.xcarchive"
My provisioning profile looks like:
My XCode Signing & Capabilities:
I used Xcode to distribute the app archive to App Store Connect, which was successful.
When my son loads the app via TestFlight on his iPhone, he cannot use any function that reads/writes to Firebase (in enforcement mode). I can see in the Firebase console that the requests from his iPhone are invalid and are being rejected.
Anyone got any suggestions? I feel like I've tried everything.
Thanks,
Luke

Unable to install an Distribution build Flutter app .ipa ( Failed using apple configurator 2 and even on TestFlight app release)

I am working on a flutter project and trying to release an IPA but if fails. I usually release on TestFlight but yesterday it failed, (I released one build successfully on last Friday).
When I create a development build IPA and try to install on my iPhone using Application Loader, it works fine.
But with a Distribution build it fails on installing iPA using ApplicationLoader.
With TestFlight, the app is released, it can be installed but on launching it crashes.
I have tried Flutter clean,Pod install, clearing all Derived data.
My certificates are valid.
The only thing that is changed from last Friday is I had Flutter upgrade to version 1.17.
I created build using this too..
flutter clean
rm -rf ios/Flutter/Flutter.framework
flutter build ios --release
But still not working when I try to install using application loader.
Please help! 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.

Fastlane (Gym) Mysteriously Seg Faults after Installing Fabric/Crashlytics

I'm working on a React Native iOS app. I've setup Fastlane, which has worked fine, building and uploading my app to iTunes connect. However upon installing Fabric/Crashlytics my Fastlane script fails on Gym. XCode still is able to build my app successfully. I've followed the Mac client instructions for setting up Fabric.
Fastlane version: 1.101.0
XCode version: 7.2.1
ReactNative version: 0.31.0
I have cleaned all my build artifacts since installing Fabric. I've been searching for a solution for several days, but to no avail. Any help would be much appreciated!
Output after running fastlane beta (fails on Gym)
My Fastfile

xcode 4.2 build and archive issues in iTunes

i have upgraded my xcode to 4.2 and tried to build my old project using new xcode.
i changed the following settings in new xcode -
Architectures -> armv6 armv7
Base SDK - ios5
Compiler - > LLVM GCC 4.2
iOS Deployment Target -> iOS 3.1
i was able to build and install it in device(5.0 ios) but when i tried to make an distribution build using archive, it failed to install in the devices showing invalid entitlements both for ios4 and ios5.
when i googled it i found that in order successfully intall set
Build Active Architecture Only - > NO
After this i got success to install my distribution build .ipa through iTunes in iphone 3gs/4(both 4 and ios5) but it still showing invalid entitlements in iphone3g(3.1.3ios).
i have static libraries in my project as well.
Please help me figure out how to create an build which should install in 3.1 to 5.0 ios.
Thanks
You will have to plug your device and open organizer, than it will ask to install IOS3.0 - 3.2.2 Device Debugging Support, install it and try again, it works for me.

Resources