问题
I am building my framework FooFramework that uses WebRTC framework. After I used the WebRTC framework(https://github.com/zevarito/PodRTC) in my pod as a dynamic framework. My demo app FooDemoApp that uses FooFramework crashes as it runs with not- my-own provision profile on a device. The error message is dyld: Library not loaded... Reason: no suitable image found. Did find... code signing blocked mmap()
I think the problem is that Apple seems doens't allow nested framework. The WebRTC will be signed with my teamIdentifier, but the teamIdentifier is not set on my framework. I wonder what's the proper way except for re-code sign WebRTC?
FooDemoApp would not crash before I added the PodRTC in FooFramework when I run it using not my provision profile on a device.
The relationships between the framework are like this:
FooFramework(before built) includes: PodRTC(not code signed) as a Cocoapod
FooDemoApp(after built FooFramework) includes: my code-signed built FooFramework(code signed with Identifier:io.allen.ALSDK, no team identifier set), which includes code-signed PodRTC(code signed with Identifier:org.webrtc.WebRTC, team identifier PodRTCTeam)
So I have two questions:
- How to use PodRTC without crashing on a different provision profile?
- Why my demo app wouldn't crash before while it's running with a different provision profile?
来源:https://stackoverflow.com/questions/51918306/how-to-use-a-dynamic-framework-in-a-framework