I have a custom .framework that I am trying to include in a Qt Quick iOS app. It compiles but when the app is run, it crashes saying:
dyld: Library not loaded: #rpath/SharedMobileLib.framework/SharedMobileLib
Referenced from: /var/containers/Bundle/Application/.../App.App/App
Reason: image not found
In the .pro file:
QMAKE_LFLAGS += -Fpath/to/framework
LIBS += -framework SharedMobileLib
How do I copy the framework with the app? I have been searching for the last hour for any ideas without any luck. Any help is greatly appreciated!
Related
Problem is, I got this well known IOS error message:
dyld: Library not loaded: #rpath/libswiftSwiftOnoneSupport.dylib Referenced from: /Users/<MY_USER>/Library/Developer/CoreSimulator/Devices/5AEAA313-0C65-49D8-BC20-DCC9994719C4/data/Containers/Bundle/Application/48DC52C0-4BC6-45ED-9AEE-A0E1F5C8BA1B/P2P-1-<MY_APP>.app/Frameworks/<REQUIRED_FRAMEWORK>.framework/<REQUIRED_FRAMEWORK>
And after I tried every given logical solution like the ones suggested in these threads:
dyld: Library not loaded: #rpath/libswiftSwiftOnoneSupport.dylib
Xcode - Bundle format unrecognized, invalid, or unsuitable
References to Removed Framework in project.pbxproj File
The only solution what was working was using swift's print() anywhere in the code, because this will somehow force libswiftSwiftOnoneSupport.dylib to be loaded. What is the connection between these two? And what is the right way to load this missing library?
Details about the project:
Cordova based mobile app
Native IOS written in Objective-C
Swift is only used after one of the libraries required it somehow
To be a bit more specific with this last point, our project relys on a not mainstream framework which uses swift. And we had this error:
dyld: Library not loaded: #rpath/libswiftContacts.dylib
Solution comes from here: dyld: Library not loaded: #rpath/libswiftContacts.dylib
We had to create a swift file in our project and have to import the required frameworks in that swift file.
I have this issue when I attach my custom framework to a Test project.
dyld: Library not loaded: #rpath/FrameworkName.framework/FrameworkName
Referenced from: /Users/Me/Library/Developer/CoreSimulator/Devices/9C4B0FD8-200B-4FF1-AFEC-7D2316698CDA/data/Containers/Bundle/Application/9BAA9518-2FD0-4AAC-ABD8-F3842FA77A9E/TestProject.app/TestProject
Reason: image not found
I need to attach the framework to the Embedded Binaries to fixe this issue.
My question is:
Why for the other framework is not mandatory to add it to Embedded Binaries ?
What is missing in my framework project, or what I need to change in the build settings of the framework project ?
Ok i found the issue, i need to change the Mach-O Type in the build settings to Static Library.
I'm trying to create a framework with some features of my App, which depends on Cocoapods for its dependencies.
The framework is compiling OK, but when added into another project, it crashes with this trace
Library not loaded: #rpath/AFNetworking.framework/AFNetworking
Referenced from: /private/var/containers/Bundle/Application/BA3917FD-FCF1-491B-90AF-86AFDCD7FF80/BMNPoC.app/Frameworks/myframework.framework/myframework
Reason: image not found
When searching on product folder I see my framework and the pod framework with AFNetworking in this case (so 3 separated frameworks). I guess those frameworks aren't being embed into MyFramework. How can I achieve this? Here's a link to a demo project https://www.dropbox.com/s/p9dbx9xy61twcoa/MyFramework.zip?dl=0
I have a static library that I've created. It's a universal library so it should be working on the iphone and the simulator. Just by bringing the library into the project it won't compile, I get about 21 linker errors. They're all like this:
"_OBJC_CLASS_$_NumberPad", referenced from:
objc-class-ref in libClipPOSLibrary.a(PCCIDEntryView.o)
I've included all the frameworks necessary in the project, but for some reason this library just isn't happy. Also, I'm sure the architecture of the library matches the architecture of the project, and I've even used the nm command to look at the library to see if all of the classes are referenced and they are.
Any help would be greatly appreciated. Thanks.
Your app doesn't need to know about NumberPad... it's your "libClipPOSLibrary.a". You should probably include / link the library that includes the NumberPad stuff (and the other missing symbols) against your "libClipPOSLibrary.a" when you build the .a file.
When I have tried to build my target I get this error with dynamic linker:
dyld: Library not loaded: #rpath/iPhoneSimulatorRemoteClient.framework/Versions/A/iPhoneSimulatorRemoteClient
I use this iphonesim library link that referenced on path as above.
I use Xcode 4.3 and in this case I think the path wrong.
How to change this path to correct path?
I have download this library again and recompile it.
I think this is related due XCode 4.3 have another path for framework.
Please check this link link