Signing embedded framework not working in Xcode 11.2.1

i0S Swift Issue

Question or problem with Swift language programming:

I have a small proof-of-concept app, where I am trying to embed (and sign) a framework (Alamofire) inside of my framework (AequumPOCFramework.framework), however, when I try to deploy to my device, it keeps giving me the error

If I just try to deploy my own framework, without having Alamofire embedded in it, everything works fine.

The complete error at deploy to my iphone is:

What am I doing wrong?

How to solve the problem:

Solution 1:

Nested frameworks are not supported on iOS (see technotes). The only legit solution at the moment is to link “embedded” frameworks directly to a hosting app.

XCFramework is mainly an aggregation of platform specific binaries’ and has nothing to do with embedding frameworks unfortunately.

Solution 2:

You gotta embed Alamofire to your project, too.

For example, you are using Carthage and the Cartfile of your framework has Alamofire library. You gotta use the same Carfile for your main app, too. Also, you gotta perform other Carthage actions(linking library, adding run script) for the main app.

Hope this helps!