Framework Pod says Library not loaded - swift

Hi I'm making an application for ios that uses a pod library called Signature.Framework (Substantially allows you to make the signature). When I start the application on the XCode simulator everything works perfectly when I go to test the application on the physical device, I get the error below. What is more due and how can I solve it?
Error:
dyld: Library not loaded: #rpath/Signature.framework/Signature
Referenced from: /var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/myapp
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature: code signing blocked mmap() of '/private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature'
/private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature: code signing blocked mmap() of '/private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature'
/private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature: stat() failed with errno=1
/private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature: code signing blocked mmap() of '/private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature'
/private/var/containers/Bundle/Application/DD816747-0B6F-46FB-93E6-6C28DCFFED7F/myapp.app/Frameworks/Signature.framework/Signature: stat() failed with errno=1
(lldb)
Linking:

Solution 1
In my case i set the Pods.framework to optional and it fixed the issue , It wasn't being copied to device by the .sh script and so the app crashed:
Solution 2
remove your project from DerivedData
User/YourPcName/Library/Developer/Xcode/DerivedData/ProjectNameFolder

Related

Xcode 11.3.1 with Firebase

I've been making an Xcode app. When I run it on the simulator it works. When I run it on my iPad it also works but when I try to use is on my iPhone 11, it doesn't work. Gets the following message:
Thread 1: signal SIGABRT"
And in the console:
dyld: Library not loaded: #rpath/GTMSessionFetcher.framework/GTMSessionFetcher
Referenced from: /private/var/containers/Bundle/Application/B50AD250-D857-4C76-B9BB-EC8377913E91/WBG.app/WBG
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/B50AD250-D857-4C76-B9BB-EC8377913E91/WBG.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher: code signature invalid for '/private/var/containers/Bundle/Application/B50AD250-D857-4C76-B9BB-EC8377913E91/WBG.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher'
/private/var/containers/Bundle/Application/B50AD250-D857-4C76-B9BB-EC8377913E91/WBG.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher: stat() failed with errno=25
/private/var/containers/Bundle/Application/B50AD250-D857-4C76-B9BB-EC8377913E91/WBG.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher: code signature invalid for '/private/var/containers/Bundle/Application/B50AD250-D857-4C76-B9BB-EC8377913E91/WBG.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher'
/private/var/containers/Bundle/Application/B50AD250-D857-4C76-B9BB-EC8377913E91/WBG.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher: stat() failed with errno=1
/private/var/containers/Bundle/Application/B50AD250-D857-4C76-B9BB-EC8377913E91/WBG.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher: code signature invalid for '/private/var/containers/Bundle/Application/B50AD250-D857-4C76-B9BB-EC8377913E91/WBG.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher'
/private/var/containers/Bundle/Application/B50AD250-D857-4C76-B9BB-EC8377913E91/WBG.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher: stat() failed with errno=1
Seems like the libary GTMSessionFetcher is not copied on your device. PLease check on Your Project target settings, under section Frameworks, Libraries and Embedded Content that you have chosen Embed & Sign or Embed Without Signing.
Alsom, one of the issues might be that library GTMSessionFetcher was built for iPad Architecture only when archived.
Check sample image below
I have been facing the same problem... It got fixed by adding:
In you podfile:
use_modular_headers!
instead of
use_frameworks!
Good luck! I hope this works for you!

Can't build project to physical device Xcode

I cant build my Xcode project to a physical device. Simulated devices are working perfectly. I installed every cocoapods library again and cleaned the project multiple times.
dyld: Library not loaded: #rpath/BarcodeScanner.framework/BarcodeScanner
Referenced from: /private/var/containers/Bundle/Application/CFE145F7-D789-4DB8-A0DB-D8B533D08B5A/Segler.app/Segler
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/CFE145F7-D789-4DB8-A0DB-D8B533D08B5A/Segler.app/Frameworks/BarcodeScanner.framework/BarcodeScanner: code signature invalid for '/private/var/containers/Bundle/Application/CFE145F7-D789-4DB8-A0DB-D8B533D08B5A/Segler.app/Frameworks/BarcodeScanner.framework/BarcodeScanner'
/private/var/containers/Bundle/Application/CFE145F7-D789-4DB8-A0DB-D8B533D08B5A/Segler.app/Frameworks/BarcodeScanner.framework/BarcodeScanner: stat() failed with errno=25
/private/var/containers/Bundle/Application/CFE145F7-D789-4DB8-A0DB-D8B533D08B5A/Segler.app/Frameworks/BarcodeScanner.framework/BarcodeScanner: code signature invalid for '/private/var/containers/Bundle/Application/CFE145F7-D789-4DB8-A0DB-D8B533D08B5A/Segler.app/Frameworks/BarcodeScanner.framework/BarcodeScanner'
/private/var/containers/Bundle/Application/CFE145F7-D789-4DB8-A0DB-D8B533D08B5A/Segler.app/Frameworks/BarcodeScanner.framework/BarcodeScanner: stat() failed with errno=1
/private/var/containers/Bundle/Application/CFE145F7-D789-4DB8-A0DB-D8B533D08B5A/Segler.app/Frameworks/BarcodeScanner.framework/BarcodeScanner: code signature invalid for '/private/var/containers/Bundle/Application/CFE145F7-D789-4DB8-A0DB-D8B533D08B5A/Segler.app/Frameworks/BarcodeScanner.framework/BarcodeScanner'
/private/var/containers/Bundle/Application/CFE145F7-D789-4DB8-A0DB-D8B533D08B5A/Segler.app/Frameworks/BarcodeScanner.framework/BarcodeScanner: stat() failed with errno=1
(lldb)
Look like your project.xcodeproj path is wrong or something, I found this on someone's question/answer and look like he got the same problem as you. Hope this helps you.
https://stackoverflow.com/questions/32730312/reason-no-suitable-image-found

Error dyld: Library not loaded: #rpath/GTMSessionFetcher.framework/GTMSessionFetcher - Code signing error

I am having this error with GTMSessionFetcher
I'm not sure what it means.
Could it be a could signing error?
dyld: Library not loaded: #rpath/GTMSessionFetcher.framework/GTMSessionFetcher
Referenced from: /var/containers/Bundle/Application/E62297DC-9AD6-49C8-8821-5F9BF265B7CF/Studioso.app/Studioso
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/E62297DC-9AD6-49C8-8821-5F9BF265B7CF/Studioso.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher: code signing blocked mmap() of '/private/var/containers/Bundle/Application/E62297DC-9AD6-49C8-8821-5F9BF265B7CF/Studioso.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher'
/private/var/containers/Bundle/Application/E62297DC-9AD6-49C8-8821-5F9BF265B7CF/Studioso.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher: code signing blocked mmap() of '/private/var/containers/Bundle/Application/E62297DC-9AD6-49C8-8821-5F9BF265B7CF/Studioso.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher'
/private/var/containers/Bundle/Application/E62297DC-9AD6-49C8-8821-5F9BF265B7CF/Studioso.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher: code signing blocked mmap() of '/private/var/containers/Bundle/Application/E62297DC-9AD6-49C8-8821-5F9BF265B7CF/Studioso.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher'
/private/var/containers/Bundle/Application/E62297DC-9AD6-49C8-8821-5F9BF265B7CF/Studioso.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher: code signing blocked mmap() of '/private/var/containers/Bundle/Application/E62297DC-9AD6-49C8-8821-5F9BF265B7CF/Studioso.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher'
/private/var/containers/Bundle/Application/E62297DC-9AD6-49C8-8821-5F9BF265B7CF/Studioso.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher: code signing blocked mmap() of '/private/var/containers/Bundle/Application/E62297DC-9AD6-49C8-8821-5F9BF265B7CF/Studioso.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher'
Message from debugger: Terminated due to signal 6
I have been facing the same problem... It got fixed by adding:
In you podfile:
use_modular_headers!
instead of
use_frameworks!
Good luck! I hope this works for you!

iOS app framework crashed

While I am trying to deploy an app on my phone, The app crashed and here is the console log:
dyld: Library not loaded: #rpath/libswiftCloudKit.dylib Referenced
from:
/var/containers/Bundle/Application/3327C878-41D2-4394-9D3E-F5FA1C126941/ProximityContent.app/ProximityContent
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/3327C878-41D2-4394-9D3E-F5FA1C126941/ProximityContent.app/Frameworks/libswiftCloudKit.dylib:
code signing blocked mmap() of
'/private/var/containers/Bundle/Application/3327C878-41D2-4394-9D3E-F5FA1C126941/ProximityContent.app/Frameworks/libswiftCloudKit.dylib'
This happens for all other applications in my xcode.
I fixed the same issue (were having EXC_BAD_ACCESS for AVFoundation) by cleaning (cmd+k) and then cleaning the folder (cmd + shift + K).
It worked for me.
Check your Framework deployment info means framework supported OS.
Your project supported OS version and framework supported OS version check required.

Building SoundCloudAPI Fails with Apple Mach-O Librarian Error

I'm trying to integrate SoundCloud sharing into my project using the instructions at https://github.com/soundcloud/CocoaSoundCloudAPI. In my workspace, OHAttributedLabel, OAuth2Client, JSONKit and SoundCloudUI all build fine, but building SoundCloudAPI for iOS always fails with the following errors:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lSoundCloudAPI
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lSoundCloudAPI is not an object file (not allowed in a library)
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool failed with exit code 1
Does anyone know what's going on here?