iOS TestFlight Build crashing with CocoaPods - ios

I have an app that uses multiple CocoaPods. I have built at least 10 versions of TestFlight builds with no problems and then one day my app using a new build started crashing when a custom alert view from a CocoaPod was being presented.
I know it has something to do with CocoaPods and TestFlight builds because when I run the app on my iPhone from Xcode, it works perfectly fine with no errors. It just seems to be forgetting that one CocoaPod.
If anyone could provide me with any help, it would be greatly appreciated.

Deleting the CocoaPod and reinstalling did the trick!

Related

Flutter project archive issue using Xcode: agora_rtc_engine "Module 'agora_rtc_engine' not found"

I am using Agora in my flutter application, everything works fine when I test it with simulators/emulators and my android/ios phones.
When I archive the project on Xcode and upload to App store, it throws one error as below, I have searched online for a couple of hours but didn't get any progress. I don't even have any idea what is the issue and what causes the issue
My understanding is agora_rtc_engine is installed by Flutter, I am not supposed to do anything when archiving an IOS package.
If anyone knows what happened and what needs to be done, please share your thoughts, Thanks!
From xcode change the ios deployment target to 11.0
I also had this problem because I was trying to open and archive runner.xcodeproj using xcode. When I selected runner.xcworkspace I was able to successfully archive.
try "flutter build ios" again

dyld`__abort_with_payload error and Thread 1 signal SIGABRT when running app on my iPad but runs fine on simulator [duplicate]

Every time I try to run this application it builds OK and installs, but as soon as it runs, the application breaks and prints this error message:
dyld: Library not loaded: #rpath/StandardCyborgFusion.framework/StandardCyborgFusion
Referenced from: /private/var/containers/Bundle/Application/2292CCF2-800F-4E28-AF10-A1B98081DD0A/StandardCyborgExample.app/StandardCyborgExample
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/2292CCF2-800F-4E28-AF10-A1B98081DD0A/StandardCyborgExample.app/Frameworks/StandardCyborgFusion.framework/StandardCyborgFusion: code signature invalid for '/private/var/containers/Bundle/Application/2292CCF2-800F-4E28-AF10-A1B98081DD0A/StandardCyborgExample.app/Frameworks/StandardCyborgFusion.framework/StandardCyborgFusion'
I saw many similar posts here and on the App Developer forums about this problem but no one has an explanation or a valid fix.
I tried:
Cleaning and building
Restarting XCode
Restarting the Mac
Completely resetting Keychain
Verifying all Keychain certs Trust settings are on "Use System Defaults"
Factory resetting my Mac
It appears to be an issue with my iOS device. The application can start on a simulator, but the simulator is not good for my development purposes so I need to make this work on my device. I recently updated my iPhone XR to iOS 13.3.1.
"Running new app on actual iOS (13.3.1) device crashes on startup: code signature invalid for "path/to/Flutter.framework/Flutter" #49504" seems to be the same issue.
I'm using XCode 11 and iOS 13.
This is an issue with iOS 13.3.1. All dynamic frameworks being compiled to the newest release of iOS 13.3.1 are experiencing this issue when run on a personal provisioning profile/developer account. The solution, copied from jmagman from Github, is below.
You can:
Use a non-Personal Team provisioning profile (paid developer account).
Run on the 13.3.1 simulator.
Test on a real iOS device running 13.3 or lower.
Install the beta profile on your test device and install iOS 13.4 beta 3. (Fixed)
Wait for iOS 13.4 to be released.
Hopefully this issue will be fixed soon.
I'm using CocoaPods, and for me this fixes the error (Wasa22's Answer on github issue):
Open the podfile
Comment out use_frameworks!
Add use_modular_headers!
In Terminal, do a pod update -> pod install
In Xcode, Clean (Command-Shift-K) -> Build and Run.
Source:
https://github.com/Alamofire/Alamofire/issues/3051
This appears to be fixed on iOS 13.4 beta 3. You can install the beta profile or wait for the release of iOS 13.4.
I see 2 way to fix it.
Downgrade to iOS 13.3. iOS 13.3.1 breaks third parties signature unless you have a paid developer account. If possible (get a cheap iphone dedicated to development)
Update Mac OS, Xcode, and iOS to latest Beta version (Update anyone of them alone will not work, because iOS beta requires latest Xcode beta, and Xcode requires latest Mac OS Catalina)
I had the same issue using a local framework. After hours of debugging, all I had to do what change the default "Do Not Embed" to "Embed & Sign" and the error went away. Worth a try! :)
If you run from Xcode you will see an error like:
/private/var/containers/Bundle/Application/D0BD5694-A7D6-4820-A146-
A49DF0C0F0B1/Runner.app/Frameworks/Flutter.framework/Flutter: code signature
invalid for '/private/var/containers/Bundle/Application/D0BD5694-A7D6-4820-
A146-A49DF0C0F0B1/Runner.app/Frameworks/Flutter.framework/Flutter'
solution provided by jmagman on Github
jmagman has escalated to Apple (FB7562472) and will let everyone know if they hear anything. more details on github
I encountered this issue when trying to build to my actual iOS device (but it worked fine in the simulator). I spent at least 10 hours trying to fix this bug. Tried everything in all the forums, nothing worked. But this is what finally worked for me!
Upgrading from iOS 13.3.1 to iOS 13.4.1
I couldn't have imagined this, but its true that iOS 13.3.1 breaks the third parties signature unless you have a paid developer account!
I had the same error message with GoogleUtilities.framework. My problem occurred when trying to run on the simulator. On the device, it ran fine. The problem is that CylancePROTECT antivirus software on my MacBook is quarantining the file and this causes the app to crash. Check if your device is running CylancePROTECT or some other antivirus software that is blocking the framework you need.
This is an Apple's problem. I solved this issue by upgrade my device to iOS 13.4.1
Also, if you don't want upgrade ios system,and you also use Podfile, you can do flow ways:
Comment out use_frameworks! in Podfile.
Add use_modular_headers!
pod deintegrate + pod install.
Clean (Command-Shift-K) -> Build and Run.

Building/archiving for release hangs indefinitely in Xcode 11

I'm trying to release an iOS app - it builds fine on simulator or device in Xcode 11, and can be archived fine in Xcode 10, but when I try to archive it for release in the App Store the build hangs indefinitely. I hit Product > Archive, it completes 3960 out of 4040 steps, and then hangs in indefinitely at the stage of "Archiving Firebase/Firestore". This is happening on 4 different Xcode 11 versions - 3,6,7 and most recently the GM that was released earlier today.
I've tried flipping a bunch of the build settings - the Optimization flags, incremental/whole modules, enabling Bitcode, exclusive memory, and have also reinstalled Xcode with different 11 versions a few times. I've also tried this with various versions of cocoapods, including the Firebase/Firestore pod that is being compiled when the build hangs (i.e., I've used an old version and tried updating to the latest version of the pod) Nothing I've done has worked. Does anyone have any advice for other things I could try to stop this from hanging?
#leonluc-dev tracked this infinite loop down to a Swift compiler bug building the SwiftSoup CocoaPod.
Full description here.
See this answer for a screen shot of disabling optimization of Swift Soup to work around.
It seems to be a bug with Xcode 11. I reported the issue to the Firebase team over here:
https://github.com/firebase/firebase-ios-sdk/issues/3884#issuecomment-533663539
and I also reported the issue to Apple using feedback assistant (bug FB7303206). I'll update this answer when Apple responds.
If you're also using Firebase Crashlytics, moving
"${PODS_ROOT}/FirebaseCrashlytics/run"
after
"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols"
in your Run Script phase should solve the issue.

Xcode 11 GM Seed 2 freezes while building workspace/project

I have recently downloaded new Xcode 11 GM Seed 2 so that i can update my project to support Dark mode. (I am already on MacOS Catalina latest beta version-19A558d).
I have my project(workspace with pods) working 100% fine with Xcode 10.2. When I have started building same project with newly installed Xcode 11 GM Seed 2, It randomly freeze while building with title Building X of Y tasks. It randomly stops building any file at anytime. As per my different observations, It stops building while it is building library from my Pods.
I have already tried cleaning, manually deleting derived data files. Also, i have tried by reinstalling Xcode. Also restarted Mac to give try. All trial get failed. If anyone faced same issue and know the solution, please post here.
Disable the Swift Optimizer for SwiftSoup:
I were trying all day hard to solve this issue. Finally issue get resolved.
Actually i tried to build/compile the app via Terminal. Then i found that it got struck/freezed while compiling the files from installed 3rd party libraries from pods. The 3rd party library named SwiftSoup was making problem. Then i removed that pod, and commented out the code related to that. And tried compiling/building the app again. And It worked successfully this time.
UPDATE:
I followed #Paul's Answer, that works without removing pod, keeping same pod and code working. Just need to update settings as described by him. But make sure, that you need to change this setting every time you update your pods.

Xcode 7 ValidateEmbeddedBinary error Could not read data in foo-WatchKit-App.app

I am trying to do a full build on an iOS App with a WatchKit App as well.
When compiling the full project for Archive I am seeing the following
ValidateEmbeddedBinary DerivedData/lifa93/Build/Intermediates/ArchiveIntermediates/lifa93Dev/BuildProductsPath/Release-iphoneos/lifa93.app/Watch/lifa93-WatchKit-App.app
cd /Users/lordandrei/Projects/git/X7/lifa93
export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
builtin-embeddedBinaryValidationUtility /Users/lordandrei/Projects/git/X7/lifa93/DerivedData/lifa93/Build/Intermediates/ArchiveIntermediates/lifa93Dev/BuildProductsPath/Release-iphoneos/lifa93.app/Watch/lifa93-WatchKit-App.app -signing-cert *9F…FB* -info-plist-path /Users/lordandrei/Projects/git/X7/lifa93/DerivedData/lifa93/Build/Intermediates/ArchiveIntermediates/lifa93Dev/InstallationBuildProductsLocation/Applications/lifa93.app/Info.plist
error: warning: Could not read data in /Users/lordandrei/Projects/git/X7/lifa93/DerivedData/lifa93/Build/Intermediates/ArchiveIntermediates/lifa93Dev/BuildProductsPath/Release-iphoneos/lifa93.app/Watch/lifa93-WatchKit-App.app
I have tried:
toggling between Debug and Release
toggling No Install and No Validate.
revoking and replacing all profiles (Signing, adhoc, dist)
So far nothing has made a dent.
Suggestions welcome as I am in a holding pattern trying to build.
Xcode: Version 7.0 beta 3 (7A152u)
iOS: 9.0 beta 3 (13A4293g)
Radar: 21975256
I had this issue when I was trying to build to my iPhone 6+ and Watch. I had just re-installed Xcode 7 Beta because I accidentally deleted one of the needed frameworks. I tried building several times and received the same "Could not read data..." error. I finally built to the simulator successfully, AND THEN built to both devices and it worked.
My issue now is that builds to Apple Watch seem to take forever to run or pass "Attaching...".
I don't know exact reason of your problem, but I created new project that includes WatchKit App target as well. And it works fine, no problems with building process.
I am using Xcode 7 beta (7A120f).
That's why I propose 3 potential ways to resolve the issue:
1. Create new new project from scratch and migrate source and resource files from your current project to new one. I had similar problems (it wasn't related to WatchKit app) previously and this trick helped me.
2. Install latest version of Xcode. Xcode 7 beta 4 is released on 21st of July.
3. Install Xcode (7A120f). This is version that I am using, you are using different one. I don't think that it will help, but who knows.

Resources