Recently downloaded the Xcode 11 Beta to test my app in iOS 13 and I'm running into an issue I can't seem to figure out. Builds fail every time on the [CP] Copy Pods Resources step, saying "Command PhaseScriptExecution failed with a nonzero exit code". Now I know this is the error when any run script phase fails, but usually there is some useful information provided along with this error.
Error output:
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target 11.0 --output-format human-readable-text --compile /Users/chris/Library/Developer/Xcode/DerivedData/SmartPager-dcfjsnhrgkjfeabbvafghvwsrsxr/Build/Products/Debug-iphoneos/SmartPager Sandbox.app/JSQMessagesViewController.nib
/Users/chris/Work/projectname/Pods/JSQMessagesViewController/JSQMessagesViewController/Controllers/JSQMessagesViewController.xib --sdk /Users/chris/Downloads/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.0.sdk --target-device ipad --target-device iphone
2019-09-06 13:26:17.003 IBAgent-iOS[39395:514843] Incorrect screen size for <UIScreen: 0x7fb0e05245a0; bounds = {{0, 0}, {0, 0}}> in UICollectionViewData
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target 11.0 --output-format human-readable-text --compile /Users/chris/Library/Developer/Xcode/DerivedData/SmartPager-dcfjsnhrgkjfeabbvafghvwsrsxr/Build/Products/Debug-iphoneos/SmartPager Sandbox.app/JSQMessagesCollectionViewCellIncoming.nib /Users/chris/Work/projectname/Pods/JSQMessagesViewController/JSQMessagesViewController/Views/JSQMessagesCollectionViewCellIncoming.xib --sdk /Users/chris/Downloads/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.0.sdk --target-device ipad --target-device iphone
Command PhaseScriptExecution failed with a nonzero exit code
Relevant information: From what I can tell this might have something to do with a deprecated cocoapod we're using, specifically JSQMessagesViewController (7.3.5). Obviously using a deprecated library isn't great, but it builds and runs just fine in Xcode 10, so I don't know what the issue might be. In a separate project I tried just adding this pod and it throws the same error. The line about "incorrect screen size..." seems to just be a warning rather than an error, as in Xcode 10 it compiles correctly with that same line.
I've tried restarting my computer, cleaning, removing derived data, all the usual stuff. I just don't know where else to look now. Any advice would be most appreciated. Thanks!
As Ethan Wen commented, inside of your project (if you used Cocoapods) search for all the .xib files of JSQMessagesViewController and in the right panel at the first tab (File Inspector), look for the section 'Interface Builder Document' and change it from 'iOS 8.0 and later' to 'iOS 10.0 and later'. This worked for me in XCode 11 GM seed 2.
UPDATED
Finally, I found how to solve this issue.
JSQMessages.xcworkspace
with Xcode11iOS10.0 and Later
pod install
this repoHope this can help you :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With