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
andB.framework
both depend onOther.framework
, then neither of them can nestOther.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
Use the framework in extension target
In General Tab
And in Build Settings Tab -> Linking
Add @executable_path/../../Frameworks
to Runpath Search Paths
Related Topics
Firebase Retrieving Data in Swift
Get Current View Controller from the App Delegate (Modal Is Possible)
Continue Uploading Process in Background iOS
Combining Text and Images in 'Uitextview'
About Viewcontroller's "Viewdidload" and "Viewwillappear" Methods
How to Merge Audio and Video Using Avmutablecompositiontrack
Xcode: Any Way to Refresh/Re-Run the Playground
Where to Set Environment Variables for App
Difference Between Completion Handler and Blocks:[Ios]
How to Have a Uiscrollview Scroll and Have a Gesture Recognizer
Uiscrollview Not Scrolling Regardless of Large Contentsize
Creating a Tutorial for My iOS App with Page Control
New Itunes User Interface Unable to Find "Ready to Upload Binary"
Uialertview in Swift, Getting Exc_Bad_Access
View Controller Responds to App Delegate Notifications in iOS 12 But Not in iOS 13