"image not found" Error using Custom FrameWork

I created my own framework for one of my cocoa applications. I added this structure to my project and named a method from this structure. When I tried to run the application, it crashed:

Failure Log:

dyld: Library not loaded: @rpath/MMP.framework/Versions/A/MMP Referenced from: /Users/Midhun/Library/Developer/Xcode/DerivedData/MMPTest-ccvjtgedqkcftchapjehhwjbaqdq/Build/Products/Debug/MMPTest.app/Contents/MacOS/MMPTest Reason: image not found 

What I've done:

Framework:

  • I added the header file to the public section

Public header

  • I added Deployment and Linking paths like:

Paths

  • I am creating a project and I got my frame ready (pretty cool so far).

Project:

  • I added this framework to the FrameWorks folder in the Project root directory.
  • I added the framework in the Link Binary With Libraries Section
  • I changed the Linking path as: Changed path

Platform Details:

 Xcode: 4.6.2 OS X : 10.8 

What I tried (after a crash)

  • When I get this problem, I checked with otool . It shows ways like:

otool

But I could not solve the problem. Please help me, thanks in advance.

+8
objective-c xcode cocoa macos
source share
2 answers

Install the frame installation directory @executable_path/../Frameworks

enter image description here

Now add the copy files to the build phase, specify the purpose of the Frameworks . click the target , then in the Editor (menu bar) β†’ Add build phase β†’ Add build phase of copy files

enter image description here

enter image description here

+24
source share

I faced the same problem, and that’s how I solved it,

In my case, the user Framework is in Swift , and my project is in Goal c

Follow these steps

  • Go to Project Navigator
  • Select Goals , go to the General tab
  • Locate Embedded binaries , drag and drop custom structure. Find the stream in the image below enter image description here
  • Check if Framework is added to Related Structures and Libraries (fix image) List item
  • NOTE. In my case, it was added to Linked Frameworks and Libraries, go to the head and delete .
  • Last step, find the flag Always insert fast built-in libraries in the "Configure Settings" and translate it into "YES" (specify the image).

enter image description here

Hope this helps.

+2
source share

All Articles