Cannot build iOS from pipeline

I can run this on a simulator with no issue, but something is happening to cause these xcframeworks-related scripts to fail when run from a pipeline (same physical machine). My pipeline worked before updating to Ionic 6. I have found various articles around PhaseScriptExecution failures and none of them have illuminated the cause. I am mostly clueless regarding iOS apps so I feel pretty lost at this point.
Here are the iOS build errors I am getting from my pipeline, let me know if there is something else I can provide or if this question would be better posted elsewhere.

note: Build preparation complete
note: Building targets in dependency order
/Library/Scripts/vsts-agent-osx-x64/_work/1/s/ios/App/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target 'OneSignalXCFramework' from project 'Pods')
PhaseScriptExecution [CP]\ Copy\ XCFrameworks /Users/tusksupport/Library/Developer/Xcode/DerivedData/App-favqtvtatmyfkhdtnqrxyhrfegot/Build/Intermediates.noindex/Pods.build/Release-iphoneos/OneSignalXCFramework.build/Script-91C49828BF74B4D97C7DD6998DDC126C.sh (in target 'OneSignalXCFramework' from project 'Pods')
    cd /Library/Scripts/vsts-agent-osx-x64/_work/1/s/ios/App/Pods
    /bin/sh -c /Users/tusksupport/Library/Developer/Xcode/DerivedData/App-favqtvtatmyfkhdtnqrxyhrfegot/Build/Intermediates.noindex/Pods.build/Release-iphoneos/OneSignalXCFramework.build/Script-91C49828BF74B4D97C7DD6998DDC126C.sh
/Users/tusksupport/Library/Developer/Xcode/DerivedData/App-favqtvtatmyfkhdtnqrxyhrfegot/Build/Intermediates.noindex/Pods.build/Release-iphoneos/OneSignalXCFramework.build/Script-91C49828BF74B4D97C7DD6998DDC126C.sh: line 2: /Library/Scripts/vsts-agent-osx-x64/_work/1/s/ios/App/Pods/Target Support Files/OneSignalXCFramework/OneSignalXCFramework-xcframeworks.sh: Permission denied
Command PhaseScriptExecution failed with a nonzero exit code

PhaseScriptExecution [CP]\ Copy\ XCFrameworks /Users/tusksupport/Library/Developer/Xcode/DerivedData/App-favqtvtatmyfkhdtnqrxyhrfegot/Build/Intermediates.noindex/Pods.build/Release-iphoneos/FBSDKCoreKit_Basics.build/Script-5CD761B0BF30F690F1C73B5782F659F3.sh (in target 'FBSDKCoreKit_Basics' from project 'Pods')
    cd /Library/Scripts/vsts-agent-osx-x64/_work/1/s/ios/App/Pods
    /bin/sh -c /Users/tusksupport/Library/Developer/Xcode/DerivedData/App-favqtvtatmyfkhdtnqrxyhrfegot/Build/Intermediates.noindex/Pods.build/Release-iphoneos/FBSDKCoreKit_Basics.build/Script-5CD761B0BF30F690F1C73B5782F659F3.sh
/Users/tusksupport/Library/Developer/Xcode/DerivedData/App-favqtvtatmyfkhdtnqrxyhrfegot/Build/Intermediates.noindex/Pods.build/Release-iphoneos/FBSDKCoreKit_Basics.build/Script-5CD761B0BF30F690F1C73B5782F659F3.sh: line 2: /Library/Scripts/vsts-agent-osx-x64/_work/1/s/ios/App/Pods/Target Support Files/FBSDKCoreKit_Basics/FBSDKCoreKit_Basics-xcframeworks.sh: Permission denied
Command PhaseScriptExecution failed with a nonzero exit code

WriteAuxiliaryFile /Users/tusksupport/Library/Developer/Xcode/DerivedData/App-favqtvtatmyfkhdtnqrxyhrfegot/Build/Intermediates.noindex/Pods.build/Release-iphoneos/PromisesObjC.build/FBLPromises-all-target-headers.hmap (in target 'PromisesObjC' from project 'Pods')
    cd /Library/Scripts/vsts-agent-osx-x64/_work/1/s/ios/App/Pods
    write-file /Users/tusksupport/Library/Developer/Xcode/DerivedData/App-favqtvtatmyfkhdtnqrxyhrfegot/Build/Intermediates.noindex/Pods.build/Release-iphoneos/PromisesObjC.build/FBLPromises-all-target-headers.hmap

/Library/Scripts/vsts-agent-osx-x64/_work/1/s/ios/App/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target 'AppAuth' from project 'Pods')
/Library/Scripts/vsts-agent-osx-x64/_work/1/s/ios/App/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target 'ReachabilitySwift' from project 'Pods')
/Library/Scripts/vsts-agent-osx-x64/_work/1/s/ios/App/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target 'GoogleSignIn' from project 'Pods')
** BUILD FAILED **


The following build commands failed:
	PhaseScriptExecution [CP]\ Copy\ XCFrameworks /Users/tusksupport/Library/Developer/Xcode/DerivedData/App-favqtvtatmyfkhdtnqrxyhrfegot/Build/Intermediates.noindex/Pods.build/Release-iphoneos/OneSignalXCFramework.build/Script-91C49828BF74B4D97C7DD6998DDC126C.sh (in target 'OneSignalXCFramework' from project 'Pods')
	PhaseScriptExecution [CP]\ Copy\ XCFrameworks /Users/tusksupport/Library/Developer/Xcode/DerivedData/App-favqtvtatmyfkhdtnqrxyhrfegot/Build/Intermediates.noindex/Pods.build/Release-iphoneos/FBSDKCoreKit_Basics.build/Script-5CD761B0BF30F690F1C73B5782F659F3.sh (in target 'FBSDKCoreKit_Basics' from project 'Pods')
(2 failures)

Your pod minimum is iOS 8, which conflicts with your other libraries. You can modify it within XCode or try running pod deintegrate in your iOS folder and then npx cap sync in the root of your project

I finally determined the issue. We were zipping up the artifacts from the sync step and passing them off to another job to run the iOS build. This archival and restore was stripping the plugin scripts of their file permissions. By calling deintegrate right before the install step, it allowed any existing scripts to be reinstalled with the correct permissions.

1 Like