I have an OSX app that I distribute outside the AppStore. Therefor I sign it with the according certificate (Developer ID Application Certificate).
The app itself is written in Freepascal (Lazarus) and has a dependency lib, written in C++, which I also sign. I also change the path of the lib to be relative to the app by using install_name_tool and prefixing the path with #loader_path. Works like a charm for me locally.
The app (as reported to me) works OK on OSX 10.11.6, but crashes on OSX 10.10.5, saying:
Library not loaded: #loader_path/libMyAPP.dylib
Referenced from: /Users/USER/Downloads/MyAPP.app/Contents/MacOS/MyAPP
Reason: no suitable image found. Did find:
/Users/Steve/Downloads/MyAPP.app/Contents/MacOS/libMyAPP.dylib: code signature invalid for '/Users/Steve/Downloads/MyAPP.app/Contents/MacOS/libMyAPP.dylib'
/Users/Steve/Downloads/MyAPP.app/Contents/MacOS/libMyAPP.dylib: code signature invalid for '/Users/Steve/Downloads/MyAPP.app/Contents/MacOS/libMyAPP.dylib'
Any pointers what might be going on? Is this really a code signing issue or something else? Thanks.
I have the same error with XCode 11/iPhone7 device and google firebase.
dyld: Library not loaded: #rpath/GTMSessionFetcher.framework/GTMSessionFetcher
Referenced from:
...
Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher: code signature invalid for
...
GTMSessionFetcher: stat() failed with errno=1
Solution
try to remove pod and remove use_framework!
pod deintegrate
then remove use_framework!
# use_frameworks!
then install again
pod install
Related
I use cocoapods to install alamofire in my project, it works fine in simulator. When I want to run my App on my iphone 6s(ios 13.3.1), it crashed and show the error message. My Xcode version is 11.3.1 (11C504). Is this issue appear due to latest swiftUI project? And is there some way to solve this issue? Please help. Thank you.
dyld: Library not loaded: #rpath/Alamofire.framework/Alamofire
Referenced from: /private/var/containers/Bundle/Application/9B2A3A91-D290-45D7-BA8E-6243A782E25C/Fitness(SwiftUI).app/Fitness(SwiftUI)
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/9B2A3A91-D290-45D7-BA8E-6243A782E25C/Fitness(SwiftUI).app/Frameworks/Alamofire.framework/Alamofire: code signature invalid for '/private/var/containers/Bundle/Application/9B2A3A91-D290-45D7-BA8E-6243A782E25C/Fitness(SwiftUI).app/Frameworks/Alamofire.framework/Alamofire'
/private/var/containers/Bundle/Application/9B2A3A91-D290-45D7-BA8E-6243A782E25C/Fitness(SwiftUI).app/Frameworks/Alamofire.framework/Alamofire: stat() failed with errno=25
/private/var/containers/Bundle/Application/9B2A3A91-D290-45D7-BA8E-6243A782E25C/Fitness(SwiftUI).app/Frameworks/Alamofire.framework/Alamofire: code signature invalid for '/private/var/containers/Bundle/Application/9B2A3A91-D290-45D7-BA8E-6243A782E25C/Fitness(SwiftUI).app/Frameworks/Alamofire.framework/Alamofire'
/private/var/containers/Bundle/Application/9B2A3A91-D290-45D7-BA8E-6243A782E25C/Fitness(SwiftUI).app/Frameworks/Alamofire.framework/Alamofire: stat() failed with errno=1
/private/var/containers/Bundle/Application/9B2A3A91-D290-45D7-BA8E-6243A782E25C/Fitness(SwiftUI).app/Frameworks/Alamofire.framework/Alamofire: code signature invalid for '/private/var/containers/Bundle/Application/9B2A3A91-D290-45D7-BA8E-6243A782E25C/Fitness(SwiftUI).app/Frameworks/Alamofire.framework/Alamofire'
/private/var/containers/Bundle/Application/9B2A3A91-D290-45D7-BA8E-6243A782E25C/Fitness(SwiftUI).app/Frameworks/Alamofire.framework/Alamofire: stat() failed with errno=1
Below is my Podfile:
# Uncomment the next line to define a global platform for your project
# platform :ios, '13.3.1'
target 'Fitness(SwiftUI)' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for Fitness(SwiftUI)
pod 'Alamofire'
pod 'SwiftyJSON', '~> 4.0'
pod 'AlamofireImage', '~> 3.5'
end
There is an open issue:
https://github.com/Alamofire/Alamofire/issues/3051
Seems to happen on ios 13.1.3 with non-developer Apple ID. Right now you can switch to developer Apple ID or remove use_frameworks! from pods (sadly that can make other dependencies throw error)
What fixed this issue in my case was to delete the Apple Development profile from my device and then let Xcode install it again when I ran the app on the device.
General > Device Management > Apple Development ... > tap on it then tap on Delete App. Then when you run again the app one your device the profile will be installed again and you'll be asked to Trust it again.
To be fair, I've also done a pods update.
I am unable to add a new iOS app to fabric by following the instructions of the Fabric macOS plug in.
I have followed all of the instructions found at Crashlytics documentation
When running the app, I receive this error:
2018-03-12 14:22:24.090838-0400 [19139:8550117] [Crashlytics] Version 3.10.1 (129)
2018-03-12 14:22:24.636050-0400 [19139:8550293] [Fabric] unable to complete application configure: Error Domain=FABNetworkError Code=-5 "(null)" UserInfo={status_code=422, type=2, request_id=fbc432572e6f0e10f21d2ddc24c7f272, content_type=text/html; charset=utf-8}
I have tried searching StackOverflow and following answers, but no luck avoiding this error message.
Any ideas on this error message?
I had this problem and discovered that my 'visible' (in Xcode) info.plist was not a file in my root directory, and was an out of date version from earlier development activity. I am not sure why my correct/current info.plist did not display in Xcode. I found the current info.plist in Finder (it was in the root directory in Finder, just not appearing in Xcode). I dragged the file from Finder to Xcode and accepted all the defaults in the dialog that appeared. Then I simply built and ran the current scheme and all worked as it should.
Note: It appears that for some time I have been updating the 'invisible' info.plist directly from my apps Target / Info tab.
Make sure to include all dependency then throw a force crash or runtime error and do not forget to turn on your data or internet connection.
I have the latest Xcode 7 and iOS 9 SDK installed on my El Caption. I just get an issue about the Code Signing Resource Rules Path:
If I specify the CODE_SIGN_RESOURCE_RULES_PATH=$(SDKROOT)/ResourceRules.plist then I can not upload the IPA to iTunesConnect because:
ERROR ITMS-90339: "This bundle is invalid. The Info.plist contains an invalid key 'CFBundleResourceSpecification' in bundle
However, if I removed this CODE_SIGN_RESOURCE_RULES_PATH the xcrun PackageApplication will fail as:
/var/folders/9v/_4lr188x5h5019b4bsq2_fyr0000gn/T/ir4fp619hu/Payload/MyApp.app/ResourceRules.plist: cannot read resources
Any walk around?
The issue is that xcrun uses the resource path internally in its script.
The work around to is go and directly edit the script ourselves. I had the same issue and the solution i posted here worked for me. Thought it'd help you as well.
I have software that first loads a .dylib lets call libFirst.dylib using the following command:
void* handle = dlopen(path.c_str(), RTLD_LAZY | RTLD_GLOBAL);
Later on inside a function from the loaded libFirst.dylib I attempt to load another .dylib using the same command but for libSecond.dylib, the loading of this shared library gives me the following warnings in my Xcode console:
error warning: Ignored unknown object module at 0x129310 with type 0x8a8399
dlerror: dlopen(/path/libSecond.dylib, 9): Library not loaded: libFirst.dylib
Referenced from: /path/libSecond.dylib
Reason: image not found
What I don't get is that its says libFirst.dylib is not loaded but I am currently inside a function from libFirst.dylib, so how can this be?
All my paths in DYLD_LIBRARY_PATH appear correct too.
Thanks in advance, I have been stuck on this for days.
I ended up using -install_name to change the install name of all my libraries to #rpath/dylibName.dylib and then in Xcode I set the Runpath Search paths using #loader_path to find all my .dylibs that I was using.
use:
install_name_tool -id #executable_path/../Frameworks/mylib.dylib mylib.dylib
then check it with:
otool -D mylib.dylib
I think an easier way to get around this error would be to revert to an earlier version where you were not getting this error. Right click on the project folder and navigate to local history to revert to an earlier version. I verified this to be working on the android studio installed on Mac OS Big sur.
I'm trying to update my iPad app on the App Store. I filled out the "new version" form on iTunes Connect and then tried to upload the new version with Application Loader. It rejected the .zip file giving me three errors.
I had changed the "Bundle Version" line in the Info.plist file to 1.1, and added "Bundle versions string, short" (also 1.1). Then I build the .app file, and zipped it up with the .mobileprovision file.
The zip file: Chordpad.zip
Contains: ChordPad.app, ChordPad_Distribution.mobileprovision
These are the errors Application Loader is giving me:
1. iPad: application executable contains unsupported architecture(s): i386
2. Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate.
3. Unable to extract codesigning entitlements from your application. Please make sure ChordPad.app is a valid Mach executable that's properly codesigned.
As far as I know, all my certificates are valid. Could anyone please help me fix this?
If the i386 architecture is being used, you are probably building for the simulator. Switch to device to get the arm architectures.