Umbrella framework

前端 未结 3 1605
执笔经年
执笔经年 2020-12-01 04:02

I\'ve created a framework in which is inserted the second framework, the so-called \"umbrella framework\". When I insert the framework in the test application(embedded binar

3条回答
  •  北荒
    北荒 (楼主)
    2020-12-01 04:44

    I was able to set up a working Umbrella Framework and wrote down my approach.

    Step 5 should remove your linker error ld: framework not found ..


    Setup:

    • A Swift based "client" project that has the Umbrella Framework as dependency

    • A dynamic Framework (mainly C++ and ObjC) that is a dependency of the Umbrella Framework


    Steps:

    1. Link the Umbrella Framework with its dependent (sub-)Framework and make sure that it is copied into the product upon building.

    Setting of Project -> Build Phases


    2. Add the location of the dependent (sub-)framework to the Framework Search Paths of the Umbrella Framework project.


    3. In the "client" project make sure to link and embed the Umbrella Framework


    4. Make sure the Umbrella Framework is copied into the (client-) app bundle to avoid dyld: Library not loaded: @rpath/... errors. The (client-) app, usually under ...Build/Products/Debug-iphoneos/YOUR_CLIENT_APP.app should now contain your Umbrella Framework in a folder called Frameworks.


    5. In the "client" project Make sure to add the path to the Umbrella Framework to Framework Search Paths.
    If the ld: framework not found '[Framework_Name]' for architecture ... error persists you can also add the path to the (sub-) Framework here.

提交回复
热议问题