iOS app with framework crashed on device, dyld: Library not loaded, Xcode 6 Beta

后端 未结 30 3029
鱼传尺愫
鱼传尺愫 2020-11-22 10:08

This crash has been a blocking issue I used the following steps to reproduce the issue:

  • Create a Cocoa Touch Framework project
  • Add a swift file and a
30条回答
  •  攒了一身酷
    2020-11-22 10:37

    Just dragging the framework into your project isn't going to be good enough. That is like being in the same ballpark but not being able to find your kids. Follow these steps:

    1) Create your framework

    • Develop your framework.
    • Once your development is complete, COMMAND+B build your framework and ensure you receive "Build Succeeded".

    2) Access your framework

    • Once your framework project successfully builds it will then be ready for you to access in your Products folder in your project.

    • Right click on your .framework and select "Show in Finder".

    3) Place framework in your project

    • Drag and drop the .framework from your Finder window to your app project's "Framework" folder.

    4) Configure app project for framework

    • Select the top level in your project

    • Choose your target

    • Go to "Build Phases", then "Link Binary with Libraries", and ensure that your framework is included with optional selected.

    • Still in "Build Phases", go to the upper left and select the + button. In the drop down choose "New Copy Files Phase".

    • Scroll down to the new "Copy Files" section and ensure that you set Destination to "Frameworks". Leave the subpath empty. Then click the + button at the bottom left.

    • You will be presented with your project hierarchy. Scroll down to the "Frameworks" folder that you added the framework to in step 3, or search for it in the search bar at the top. Select your framework and click "Add".

    • Ensure that your framework is included with "Code Sign On Copy" selected.

    5) Clean, then run your project

    • COMMAND+SHIFT+K
    • COMMAND+R

提交回复
热议问题