Xcode 11.3.1 does not embed binary third-party frameworks to the bundle (IPA).
I use almofire which installed through pods and when I run the project on a real device the app crashes with this message :
dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire
Referenced from: /private/var/containers/Bundle/Application/E7080212-1CE9-45FE-A384-738DA0DF6567/testFramworks.app/testFramworks
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/E7080212-1CE9-45FE-A384-738DA0DF6567/testFramworks.app/Frameworks/Alamofire.framework/Alamofire: code signature invalid for '/private/var/containers/Bundle/Application/E7080212-1CE9-45FE-A384-738DA0DF6567/testFramworks.app/Frameworks/Alamofire.framework/Alamofire'
I assume that Xcode does not embed binary third-party frameworks also I checked the section of frameworks, libraries, and embedded Content and found that the framework is there.
I tried a lot of ways to make such as adding the framework manually by downloading it and adds it to the framework section but the same error came up.
also, I tried another library the same thing. It was working in Xcode 10, I don't know why it doesn't in Xcode 11.3.1
for whom using pods: The solution is to remove the use_frameworks! in your Podfile and replace it with use_modular_headers!
e.g.