I'm attempting to distribute an iOS 7.1 app using HockeyApp. The app works perfectly well in XCode on development devices that are attached to the computer but the app crashes on load when running from an over-the-air install from Hockey.
Here's the crash log I'm getting. As you can see, it's something to do with XCTest which I assume should not be present in an adhoc build.
Dyld Error Message:
<Error>: Library not loaded: /Developer/Library/Frameworks/XCTest.framework/XCTest
<Error>: Referenced from: /private/var/mobile/Containers/Bundle/Application/5F261236-E8C6-4F8B-9380-34445DAA3474/MyApp.app/MyApp
Reason: image not found
Dyld Version: 353.5
I've made sure there are no references to XCTest in my application target, but I still receive this error. Have I missed something obvious?
Thanks
Turns out that XCTest was included in a rogue cocoapod. By removing this, the problem was solved.
Reason: image not found.
This seems to be that you have not copied some image in the bundle. Check all the images in the app and see that it is copied in bundle. May be you have just referenced it from some folder from MAC machine.
Related
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.
I got
CSYMGenerator cannot be Opened because of a problem
message while running my project.
OS: High Sierra v10.13
XCode: 9.0
Termination Reason: DYLD, [0x1] Library missing
Application Specific Information: dyld: launch, loading dependent
libraries
Dyld Error Message: Library not loaded:
#rpath/CrashlyticsLanguageSupport.framework/Versions/A/CrashlyticsLanguageSupport
Referenced from:
/Applications/Fabric.app/Contents/XPCServices/CSYMGenerator.xpc/Contents/MacOS/CSYMGenerator
Reason: image not found
Crashlytics Version 3.8.3 (120)
Fabric Version 2.6.14 (1285)
I just deleted the Fabric app and this error went away.
According to a post here by Mike Bonnel who works at Google on Crashlytics at Google, Fabric app has not been used in years.
I just ran into the same problem. To get it to work I ran
rm -rf ~/Library/Caches/com.crashlytics.mac
AND I deleted the Fabric app off my computer.
This is not an ideal workaround, but at least I can build and run my app now. This is definitely not ideal, but the issue went away. I was using XCode 8.2.1 on the latest High Sierra.
I'm deploying a Meteor app on both android and ios.
meteor run android-device ios-device
The app starts properly on android, while on ios it gets stuck at the splashscreen, with the following exception:
dyld: Library not loaded: #rpath/libswiftCore.dylib
Referenced from:
/var/containers/Bundle/Application/31D76A91-102C-519E-A978-44C752705AF7/MyApp.app/MyApp
Reason: no suitable image found.
**Did find:**
/private/var/containers/Bundle/Application/31D76A91-102C-519E-A978-44C752705AF7/MyApp.app/Frameworks/libswiftCore.dylib: stat() failed with errno=1
It looks like it's looking in the wrong place.
What should I do to get this fixed? (I already tried to create a new project from scratch, clean the build, etc. but no luck)
It turned out to be a bug that Apple fixed in iOS 10.3.
When I try to run an UI and Unit tests, I get an exception:
dyld: could not load inserted library
'/private/var/containers/Bundle/Application//AutoTestingApp.app/Frameworks/IDEBundleInjection.framework/IDEBundleInjection'
because no suitable image found. Did find:
dyld: Library not loaded: #rpath/XCTest.framework/XCTest
App builds with success but fails when running a test.
I already tried:
reinstalling Xcode
checking a provisioning profiles and a certificates
What am I doing wrong?
For what it's worth, you might be able to avoid this issue by running your test on a simulator instead of the device. Also make sure you've set your profiles correctly: i.e. Xcode 7.0 XCTest dyld: could not load inserted library IDEBundleInjection
I'm using Xcode 6 with the iOS Simulator version 8.1 (build 550.3).
When I choose the "Build and Run" in Xcode everything works good, if the app isn't already installed in the simulator. If it is, however, I get the following error in Xcode:
Unable to run app in Simulator
An error was encountered while running (Domain = LaunchServicesError, Code = 0)
And the logs for the simulator show the following:
less ~/Library/Logs/CoreSimulator/CoreSimulator.log
Nov 6 11:53:47 Yggdrasil.local com.apple.dt.Xcode[4389] <Error>:
Error Domain=LaunchServicesError Code=0 "The operation couldn’t be completed.
(LaunchServicesError error 0.)" UserInfo=0x7fa697742360
{Error=PackagePatchFailed, ErrorDescription=Could not hardlink copy
/Volumes/UsersData/Users/kender/Library/Developer/CoreSimulator/Devices/AAD57C40-E208-4964-B63A-46B968B3EB36/data/Containers/Bundle/Application/FEE2DEB4-AEE3-48B7-BE71-5B027259C6FD/Baby Feeding.app
to /Volumes/UsersData/Users/kender/Library/Developer/CoreSimulator/Devices/AAD57C40-E208-4964-B63A-46B968B3EB36/data/Library/Caches/com.apple.mobile.installd.staging/temp.P8QJEE/extracted/Payload/Baby Feeding.app
with manifest /Volumes/UsersData/Users/kender/Library/Developer/CoreSimulator/Devices/AAD57C40-E208-4964-B63A-46B968B3EB36/data/Library/Caches/com.apple.mobile.installd.staging/temp.P8QJEE/extracted/com.apple.deltainstallcommands.com.owlcoding.babyfeeding}
(/Volumes/UsersData/Users/kender is my $HOME).
I tried to remove all simulators (from the Devices window in Xcode and re-add them - no luck.
I removed the entire ~/Library/Developer directory and allowed Xcode to recreate it - same issue after that.
So right now I'm stuck with Build and Run -> Make changes -> Remove app -> Build and Run flow, which kind of sucks... Anyone encountered a problem like this and found a solution, or maybe you guys have some pointers for me...
I had the same problem and it was due to localisation of the Info.plist.
My app is localised into several languages and each localisation has an InfoPlist.strings file with the CFBundleShortVersionString key. I had changed the Version string on the Target information, but not in the InfoPlist.strings files.
So I deleted the app in the Simulator, updated CFBundleShortVersionString in all the localised Info.plist files to match the version on the Target, and that resolved the issue for me.
The error indicates that installation failed because of hard linking. I suspect the filesystem for your $HOME does not support hard links. Please update your question to specify what type of filesystem /Volumes/UsersData is.
If it's not possible to support hard links on /Volumes/UsersData, then I suggest you make a local directory for your simulator data and create a symlink from ~/Library/Developer/CoreSimulator/Devices to it.
Also on a side note, deleting all of ~/Library/Developer can wreck havoc on the running simulator service. If you do that, make sure Xcode, iOS Simulator, Instruments, etc are quit, but ALSO make sure the service is killed as well by running killall -9 com.apple.CoreSimulator.CoreSimulatorService