dyld issues library not loaded - ios

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

Related

image not found while webrtc framework implement

I am implement demo of WebRTC but i am referring below example for WebRTC i am getting error like below
dyld: Library not loaded: #rpath/libswiftCore.dylib
Referenced from: /private/var/containers/Bundle/Application/C9A9D890-946F-4045-9FB3-C1F05912F4E2/webrtc-socketio-ios.app/Frameworks/SocketIO.framework/SocketIO
Reason: image not found
Referral Link of Demo
https://github.com/digixtechnology/iOSRTC
i tried many solution with my research like below
Add framework in Embedded Binaries
Delete Derived Data
Change Run Path To $(inherited) #executable_path/Frameworks
but still i am getting crash and error Image Not Found so please some one help me to solve this
Comment use_frameworks! line in pod file, reinstall the libraries and it works.
Also check the paths of the frameworks included in your application under
Build Settings --> Search Paths --> Framework Search Paths
NOTE: Make sure to delete your build and then install again
Swift Package Manager Solution
In my case, I've added WebRTC via Swift Package Manager. And I've got the same exact error.
.package(url: "https://github.com/stasel/WebRTC.git", from: "93.0.0")
But, I've forgot to add under target dependencies. Here is my solution:
target(
name: "MyClientName",
dependencies: ["SomeOtherDependency", "**WebRTC**"]),
Best

FrameWork + Embedded Binaries

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.

Remove edit button on ThumbnailViewController PDFTron

I have a requirement wherein I do not need the Edit/ Delete button that appears in ThumbnailViewController for PDFTron Library iOS. I have seen that the control for this is available in ThumbnailsViewController.m. But I am using dynamic framework and therefore I do not have access to this file. How can I remove this feature?
Now I am able to generate the updated Tools framework but when I replace it in the project, I am encountering the following error:
dyld: Library not loaded: #rpath/Tools.framework/Tools
Referenced from: /Users/sus/Library/Developer/CoreSimulator/Devices/0B6B340D-AE6A-4B91-B8C4-294FDC50D204/data/Containers/Bundle/Application/D568E9C5-1D13-475B-BB3A-C892AE0D29FA/Complete Reader.app/Complete Reader
Reason: no suitable image found. Did find:
/Users/sus/Library/Developer/CoreSimulator/Devices/0B6B340D-AE6A-4B91-B8C4-294FDC50D204/data/Containers/Bundle/Application/D568E9C5-1D13-475B-BB3A-C892AE0D29FA/Complete Reader.app/Frameworks/Tools.framework/Tools: no matching architecture in universal wrapper
This is happening both on the sample as well as my app.This happens when I try to build for Generic iOS device. It works fine when I build for any simulator.
To remove these options you need to modify the ThumbnailViewController.m file.
But I am using dynamic framework and therefore I do not have access to
this file.
That should not be an issue. You should be able to modify and build the Tools framework in XCode. If you are still stuck, please update your question on what you mean exactly by "I do not have access to this file."

dyld: Library not loaded: #rpath/libswiftSwiftOnoneSupport.dylib

I've built a Swift framework and now I'm trying to start building a Swift iOS application that will use that framework. I'm getting this error:
dyld: Library not loaded: #rpath/libswiftSwiftOnoneSupport.dylib
Referenced from: /Users/tdean/Library/Developer/Xcode/DerivedData/NFLApplication-ejmafvjrlqgjaabggwvadjarjjlg/Build/Products/Debug-iphonesimulator/NFLStatsModel.framework/NFLStatsModel
Reason: image not found
I've scoured SO and found similar reports and tried the fixes listed there, including:
Clearing out my DerivedData folder
Restarting Xcode and the iPhone simulator
Ensuring that Always Embed Swift Standard Libraries = YES is set, both in my framework and my application's build settings
Ensuring that Enable Bitcode=NO is set, both in my framework and my application's build settings
Ensuring that Runpath Search Paths is set to #executable_path/Frameworks, both in my framework and my application's build settings
Copied all the libswift files from my Xcode installation into a local copy within my project, and added a custom build phase to copy those files into the frameworks folder.
In every case, I get the same error when I try to run my application.
Xcode Version 8.1 (8B62)
Apple Swift version 3.0.1 (swiftlang-800.0.58.6 clang-800.0.42.1)
I eventually got this working using a mix of fixes. I'm not sure if all of them are needed, but I'm documenting what seemed to work for me here, just in case anyone else can benefit by what I've found.
I have set Always Embed Swift Standard Libraries to a value of YES in the build settings tab for both my Swift framework and in the Swift application that uses the framework.
I have added Foundation.framework to the Linked Frameworks and Libraries section of the general tab for both my Swift framework and in the Swift application that uses the framework.
I have added Foundation.framework to the Embedded Binaries section of the general tab for the Swift application that uses the framework.
With all 3 of these settings in place, I am able to build and run my application without encountering this error.
This might not be the case for everyone, but I solved it by actually writing some code in the main target.
I had an empty project consisting of a framework and a test target, and when running tests I was getting this error. Apparently Swift is pretty smart to detect that you don't actually need this library and does not link to libswiftSwiftOnoneSupport.dylib.
The fix is just to add some code, I just added:
class Test {
func a() { print ("something") }
}
and libswiftSwiftOnoneSupport.dylib got linked.
After several days of being stuck with this issue I finally found something that worked for me; hopefully this will help others too.
Turns out that specifically using print() anywhere in the code will somehow force libswiftSwiftOnoneSupport.dylib to be loaded and the issue will go away.
I'm using Xcode 10.1, Swift 4.2 and the pod that was giving me this issue was Nimble.
BTW, I am aware of #S2dent's suggestion to "just add some code" but in my case my framework already had several different classes so it didn't help me.
How are you installing your dependencies?
I had a similar issue:
dyld: Library not loaded: #rpath/libswiftSwiftOnoneSupport.dylib
Referenced from: <internal framework>
Reason: image not found
It turned out to be related to Swift whole-module optimization.
Using Carthage as a dependency manager, they were being compiled for Release, and thus compiled with whole-module optimization, which Xcode suggested I turn on. Running the app on the simulator compiles it for Debug. I'm guessing that dynamic frameworks cannot be at a different level of optimization from the app running it.
The solution was to explicitly specify the configuration I wanted Carthage to build for. (carthage bootstrap --configuration Debug) Oh, and cleaning my build folder, of course.
I had the same issue, adding the library (my own build one) to Linked Frameworks and Libraries in General tab of the app solved the issue.
You can also provide an Host Application to your test target if you don't want to add Foundation.framework to Linked Frameworks or Embedded Binaries
You can solve this by setting "Always Embed Swift Standard Libraries" to "Yes" in the Build Settings of your target.
It is an dynamic linker error which links binary in load or runtime
[#rpath]

No suitable image found for iPhone5's architecture

I'm using Xcode6.4 and Cocoapods 0.38.2.
When I use Alamofire through Cocoapods, some strage error happens.
When I use iPhone6(iOS8.4), everything is fine. I can compile and use Alamofire.
But when I use iPhone5(iOS8.4), even if I can compile without errors, I get errors like below.
dyld: Library not loaded: #rpath/Alamofire.framework/Alamofire
Referenced from: /private/var/mobile/Containers/Bundle/Application/AA92A24D-B208-46E8-8C08-1532116C9C64/knews.app/knews
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/AA92A24D-B208-46E8-8C08-1532116C9C64/knews.app/Frameworks/Alamofire.framework/Alamofire: mach-o, but wrong architecture
/private/var/mobile/Containers/Bundle/Application/AA92A24D-B208-46E8-8C08-1532116C9C64/knews.app/Frameworks/Alamofire.framework/Alamofire: mach-o, but wrong architecture
/private/var/mobile/Containers/Bundle/Application/AA92A24D-B208-46E8-8C08-1532116C9C64/knews.app/Frameworks/Alamofire.framework/Alamofire: mach-o, but wrong architecture
I don't know exactly when this problem happens, but I could use cocoapods and Amamofire with iPhone5 a while ago.
Please help.
Actually I even don't know what kind of information I should put here.
Thanks,
I created new Xcode project and copied all files.
( and made configuration files same as old one as much as possible)
And I can compile and run my app both on iPhone6 and iPhone5.
So I don't know the reason. But now my problem is solved.
As mentioned here, I Embedded all frameworks generated by Cocoapods, and I finally could run my app on iPhone5.
But when I tried to upload binary to submit to Apple, I was required 64bit binary and I could not upload my binary.

Resources