iOS 8+ Framework with Nested Embedded Framework

Linking only embedded framework with other dynamic framework fails when build & run on device

Discussing this issue on the Carthage github page, it's become clear that the workaround mentioned in the question, is actually an expected behaviour:

Carthage doesn't support nested frameworks.

Nesting frameworks doesn't let you reuse those frameworks. For instance, if A.framework and B.framework both depend on Other.framework, then neither of them can nest Other.framework—otherwise you might end up with 2 different versions, and the correct one might not be chosen at runtime.

The correct way to do this is to list it as a dependency, but link it into the app target.

Full discussion: Linking only embedded framework with other dynamic framework fails when build & run on device: "required code signature missing"

This was unclear from the README, so I raised another issue, requesting to update the documentation:

Update to README: Linking dynamic frameworks to embedded frameworks requires as well linking them to the app target #1427

This is resolved and closed in the scope of the PR:

#1427 README upd: link dependencies from embedded frameworks to the app target

Multiple iOS Framework, nested Library Not loaded issue if Main Framework name is Network

Yes, you cannot name the framework which already exists.

Network.framework is already exists in iOS 12.0+, macOS 10.14+ and tvOS 12.0+

Please refer here

Hope it helps

Issue with nested Framework for Watchkit Extension

So I found the solution.
The third party framework in my custom framework was not the problem. But It was my custom framework in the watch kit extension. So it's not possible to embed directly a framework in an extension. The framework should be embedded by the main app. And the extension will be able to use it.

Add the framework to the main app target

In Build Phases Tab

Sample Image

Use the framework in extension target

In General Tab

Sample Image

And in Build Settings Tab -> Linking
Add @executable_path/../../Frameworks to Runpath Search Paths

Sample Image



Related Topics



Leave a reply



Submit