I am attempting to upload an app to TestFlight. The app compiles and runs in the simulator, and will also run on my iPhone if I install it direct from Xcode. If I archive and push it to TestFlight, then update my device from TestFlight, the app crashes when I attempt to view a specific view Controller.
I am using MessageKit (using Cocoapods, since this is an older project I am reviving), and the specific view Controller that crashes the app extends MessagesViewController. The error message that TestFlight kicks back to me reads:
"MessageKit: static UIColor.colorFromAssetBundle(named:)"
Perhaps the archiving process is skipping a bundle from Messagekit that Xcode will include locally?
Any references to an error like this on StackOverflow seem to be hyper specific:
and in the case of the above user, they just ended up re-writing the viewController (which for me would mean dropping and rewriting MessageKit).
I think this is an issue with the archiving process skipping files. Any thoughts on how to investigate if that is the case, or any suggestions on how to rectify this would be greatly appreciated. Thanks!
2
Answers
Solution: Coacopods was the issue. I was running the latest version of Messagekit that was published using cocaopods, which was over a year old. This meant that updating the pods was never going to work. I switched to swift package manager and have the up to date version of Messagekit, and everything is working! Thanks to everyone that reached out.
Reference: https://github.com/MessageKit/MessageKit/issues/1537
The following codes are available in the UIColor and Bundle extensions in MessageKit:
UIColor+Extensions.swift
Bundle+Extensions.swift
Make sure you have the correct bundle for MessagesViewController here or
Manually copy the assets files in MessageKit into the Project’s assets file.