Post-Archive app crash on launch

So I've been working on an app and everything has been going up and down untill I finally got it running. After I archived it to export the .ipa file and sent it to another team member the app suddenly started crashing and giving the same error message. I went back to the pre-archive version and now it's crashing with the same error message.

I've been googling for a while now and couldn't find anything that can help me fix this.

Please note that the app was working well and I tested it on my iPhone 8 as well as all the simulators.
The error message is


dyld: Library not loaded: @rpath/FontAwesome_swift.framework/FontAwesome_swift

Referenced from: /Users/AmrAhmed/Library/Developer/CoreSimulator/Devices/DE180FC4-6CAD-43E7-BB60-6135A8C2BD3E/data/Containers/Bundle/Application/51BFC0FA-5FAE-44F8-97C3-730F7D1A69A5/Hadi.app/Hadi

Reason: image not found

(lldb)


I'm not exaclty looking for someone to post the solution ready to be tested so I'd be appreciated if you could explain the causes of such errors.

Please take into consideration that I'm using Xcode 9.3.1 and cocoapods to manage SDKs.

Also keep in mind that the crashing app is the same one that I tested on several platforms.

Thanks

I think it’s probably a CocoaPods problem, not an Xcode problem, and I can’t help you with that part.


However, my guess is that what’s wrong with the built app is that you have linked against the wrong version of the framework it’s complaining about. This could be because the frameworks was built with a version of Swift earlier than the one in Xcode 9.3.1, or the framework is built for the wrong platform. (The simulator and device are different platforms.)


In 5e past, when people have brought problems like this to the forum, they usually report that it was fixed by rebuilding the pod.


FWIW

Thanks for taking the time to reply to this post. The reason I think this is an Xcode problem is that the app was working fine till I archived it to create the ipa file. However; I did update the pods, rebuilt them from scratch and even decided to rebuild the app from the beginning, nothing was able to solve that error.

Another reason I think this is related to Xcode is that I went back to an earlier stable and tested version of the app and it was producing the same error although that version had several copies of it and all were kept in different locations with almost no chance of them interfering with each other.

Post-Archive app crash on launch
 
 
Q