Compile my project in xcode_10_beta_5
Bulid succeeded
xxx/Pods/Target Support Files/Pods-xxx/Pods-xxx-frameworks.sh: line 128: ARCHS[@]: unbound variable
Command PhaseScriptExecution failed with a nonzero exit code
It is similar to 7708
I've seen the discussion about issue 7708, but i can't understand what should I do about my question.
I have tried to shield function strip_invalid_archs()
implementation, then xcode show error blow:
Build input file cannot be found: '/Users/xxx/Library/Developer/Xcode/DerivedData/xxx-bxsyiukyiugqxobnrgskhrgynsbb/Build/Products/Debug-iphoneos/xxx.app/xxx
CocoaPods : 1.6.0.beta.1
Podfile:
workspace 'xxx.xcworkspace'
source 'xxx/SpecsSwift4.git'
platform :ios, '8.0'
use_frameworks!
use_modular_headers!
inhibit_all_warnings!
def xxx_pods
pod 'AFNetworking', :path => 'submodules/AFNetworking/'
pod 'MLeaksFinder', :path =>'submodules/MLeaksFinder/'
pod 'IQKeyboardManager', :path =>'submodules/IQKeyboardManager/'
pod 'WebViewJavascriptBridge', :path => 'submodules/WebViewJavascriptBridge'
pod 'Zip'
pod 'MBProgressHUD', :path =>'submodules/MBProgressHUD/'
pod 'JDStatusBarNotification', :path =>'submodules/JDStatusBarNotification/'
pod 'WEPopover', :path =>'submodules/WEPopover/'
pod 'Pinyin4Swift', :path =>'submodules/Pinyin4Swift/'
pod 'SwiftyJSON', :path =>'submodules/SwiftyJSON/'
pod 'Mesh', :path =>'submodules/Mesh/'
pod 'Album', :path =>'submodules/Album/'
pod 'HUD', :path =>'submodules/HUD/'
pod 'MediaEditorKit', :path =>'submodules/MediaEditorKit/'
pod 'VideoPlayer', :path =>'submodules/VideoPlayer/'
pod 'AlertController', :path =>'submodules/AlertController/'
pod 'Core', :path =>'submodules/Core/'
pod 'ImageSlideshow', :path =>'submodules/ImageSlideshow/'
pod 'SnapKit', :path =>'submodules/SnapKit/'
pod 'FDFullscreenPopGesture', :path =>'submodules/FDFullscreenPopGesture/'
pod 'XCGLogger', :path =>'submodules/XCGLogger/'
pod 'ActionSheet', :path =>'submodules/ActionSheet/'
pod 'Eureka', :path =>'submodules/Eureka/'
pod 'PopoverImagePicker', :path =>'submodules/PopoverImagePicker/'
pod 'DZNEmptyDataSet', :path =>'submodules/DZNEmptyDataSet/'
pod 'OpusAudio'
pod 'FileBrowser', :path =>'submodules/FileBrowser/'
pod 'ESTabBarController', :path =>'submodules/ESTabBarController/'
pod 'AwesomeCollection', :path =>'submodules/AwesomeCollection/'
pod 'DeepDiff', :path =>'submodules/DeepDiff/'
pod 'ObjcExceptionBridging', :path =>'submodules/ObjcExceptionBridging/'
pod 'Bugly'
pod 'PinLayout', :path =>'submodules/PinLayout/'
pod 'AnimatedCollectionViewLayout', :path =>'submodules/AnimatedCollectionViewLayout/'
pod 'FSCalendar', :path => 'submodules/FSCalendar'
pod 'HappyDNS', :path => 'submodules/HappyDNS'
pod 'IGListKit', :path => 'submodules/IGListKit'
pod 'MJExtension', :path => 'submodules/MJExtension'
pod 'PhotoBrowser', :path => 'submodules/PhotoBrowser'
pod 'PNChart', :path => 'submodules/PNChart'
pod 'pop'
pod 'UJCloudHttpRequestClient', :path =>'submodules/UJCloudHttpRequestClient/'
pod 'UJBaseKit', :path =>'submodules/UJBaseKit/'
pod 'UJAddressBook', :path =>'submodules/UJAddressBook/'
pod 'UJDocument', :path =>'submodules/UJDocument/'
pod 'UJClockIn', :path =>'submodules/UJClockIn/'
pod 'UJForwardService', :path =>'submodules/UJForwardService/'
pod 'UJTransfer', :path =>'submodules/UJTransfer/'
pod 'UJMessage', :path =>'submodules/UJMessage/'
pod 'ReactiveSwift', :path =>'submodules/ReactiveSwift/'
pod 'ReactiveObjC', :path =>'submodules/ReactiveObjC/'
pod 'ReactiveCocoa', :path =>'submodules/ReactiveCocoa/'
pod 'Result', :path =>'submodules/Result/'
pod 'Qiniu', :path => 'submodules/Qiniu'
pod 'YTKNetwork', :path => 'submodules/YTKNetwork'
pod 'YYCache', :path => 'submodules/YYCache'
pod 'YYImage', :path => 'submodules/YYImage'
pod 'YYWebImage', :path => 'submodules/YYWebImage'
pod 'SVProgressHUD', :path => 'submodules/SVProgressHUD'
pod 'TZImagePickerController', :path => 'submodules/TZImagePickerController'
pod 'UICountingLabel', :path => 'submodules/UICountingLabel'
end
def xxxExtension_pods
pod 'MBProgressHUD', :path =>'submodules/MBProgressHUD/'
pod 'Masonry', :path =>'submodules/Masonry/'
pod 'MJRefresh', :path => 'submodules/MJRefresh'
end
target 'xxx' do
xxx_pods
end
target 'xxx_Develop' do
xxx_pods
end
target 'BagExtension' do
xxxExtension_pods
end
target 'BagExtension_Dev' do
xxxExtension_pods
end
target 'Deprecated' do
platform :ios, '8.0'
xxxExtension_pods
xcodeproj 'Deprecated/Deprecated/Deprecated.xcodeproj'
end
target 'TodayExtensionDev' do
pod 'SnapKit', :path =>'submodules/SnapKit/'
end
target 'TodayExtension' do
pod 'SnapKit', :path =>'submodules/SnapKit/'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['GCC_WARN_INHIBIT_ALL_WARNINGS'] = "YES"
end
end
end
sorry, our project is complicated, it is difficult to provide a sample for you
My English is so poor, I wish you can understand me, looking forward to your reply,thx.
is ARCHS
specified in all targets? Sorry this is very difficult to diagnose without a sample app.
@dnkoutso thank you for your reply. My problem solved. Because I delete the arm64
in Build setting -> Valid Architectures
.
I will close this issue.
Thank you very much.
line 144: ARCHS[@]: unbound variable
Command PhaseScriptExecution failed with a nonzero exit code
Please help
I am getting the same error like contisadmin in Nativescript
"tns-ios": {
"version": "6.5.2"
}
sent 3717339 bytes received 98 bytes 7434874.00 bytes/sec
total size is 3716539 speedup is 1.00
/Users/XXXXXXX/platforms/ios/Pods/Target Support Files/Pods-XXX/Pods-XXX-frameworks.sh: line 144: ARCHS[@]: unbound variable
Command PhaseScriptExecution failed with a nonzero exit code
Is there any solution for this?
It seems to be a problem in Xcode 12.x.
First when building for the simulator, I got errors. That is fixed by changing arm64 to x86_64 in VALID_ARCHS.
Now when trying to deploy my app (with fastlane) this error is thrown by CocoaPods.
Yep, same problem here. On Xcode 12.0.1.
Solution: https://stackoverflow.com/a/64150387/2399348
So, set VALID_ARCHS to $(ARCHS_STANDARD). This works for device AND simulator builds.
JeroenJK, first really thank you for share your thoughts or the solution that work in your project.
With hybrid word i mean Nativescript, flutter, and so on.
I am hybrid man in the hybrid world, and... it is not fantastic XD, therefore there is no solution for me today.
I am getting the same error like contisadmin in Nativescript
"tns-ios": {
"version": "6.5.2"
}sent 3717339 bytes received 98 bytes 7434874.00 bytes/sec
total size is 3716539 speedup is 1.00
/Users/XXXXXXX/platforms/ios/Pods/Target Support Files/Pods-XXX/Pods-XXX-frameworks.sh: line 144: ARCHS[@]: unbound variable
Command PhaseScriptExecution failed with a nonzero exit code
For Nativescript users trying to build with xcode11, just comment the following lines on platforms/ios/internal/nativescript-build.xcconfig:
// Xcode 12
EXCLUDED_ARCHS_x86_64 = arm64 arm64e
EXCLUDED_ARCHS[sdk=iphonesimulator] = i386 armv6 armv7 armv7s armv8 $(EXCLUDED_ARCHS_$(NATIVE_ARCH_64_BIT))
EXCLUDED_ARCHS[sdk=iphoneos] = i386 armv6 armv7 armv7s armv8 x86_64
Solution: https://stackoverflow.com/a/64150387/2399348
So, set VALID_ARCHS to $(ARCHS_STANDARD). This works for device AND simulator builds.
This didn't work for me (was able to run it either on device or sim but not both depending on config) so I added x86_64 and i386 at the end:
$(ARCHS_STANDARD) x86_64 i386
I also flipped Build Active Architecture Only
to 'Yes', and my problem went away.
Note: XCode 12.0.1, iPadOS 14.0.XX, bug did not exist in iPadOS 13/XCode 11.6.XX
Thank you so much to the previous posters for inspiring this fix.. this bug nearly killed me.
line 144: ARCHS[@]: unbound variable
Command PhaseScriptExecution failed with a nonzero exit code
Please help, I am using Xcode 11.3.1
Hi @kushalpal17, did you try deleting the pod lock file, the pods folder and unistalling then reinstalling pods? I'd also consider updating / upgrading cocoapods. Also, turning your machine off and on again may make it work.
If none of that works out, maybe try what I did for 12.0.1? I don't think it will help but it probably won't hurt.
( I added the VALID_ARCHS
key with the value: $(ARCHS_STANDARD) x86_64 i386
in user defined settings, I explain it a bit more above)
Solution: https://stackoverflow.com/a/64150387/2399348
So, set VALID_ARCHS to $(ARCHS_STANDARD). This works for device AND simulator builds.This didn't work for me (was able to run it either on device or sim but not both depending on config) so I added x86_64 and i386 at the end:
$(ARCHS_STANDARD) x86_64 i386
I also flipped
Build Active Architecture Only
to 'Yes', and my problem went away.Note: XCode 12.0.1, iPadOS 14.0.XX, bug did not exist in iPadOS 13/XCode 11.6.XX
Thank you so much to the previous posters for inspiring this fix.. this bug nearly killed me.
Thanks, this is the only solution that worked for me.
xCode 12.2 (12B45b) + iOS 14.2
samee problem
Our team added the solution for fixing iOS build for Xcode 12, but stopped working on Xcode 11.
For Xcode 12 added:
EXCLUDED_ARCHS = arm64;
into project.pbxproj
but stopped working build for Xcode 11.
The solution was added to make build working for Detox / Mapbox / Xcode 12.
Solution: https://stackoverflow.com/a/64150387/2399348
So, set VALID_ARCHS to $(ARCHS_STANDARD). This works for device AND simulator builds.This didn't work for me (was able to run it either on device or sim but not both depending on config) so I added x86_64 and i386 at the end:
$(ARCHS_STANDARD) x86_64 i386
I also flippedBuild Active Architecture Only
to 'Yes', and my problem went away.
Note: XCode 12.0.1, iPadOS 14.0.XX, bug did not exist in iPadOS 13/XCode 11.6.XX
Thank you so much to the previous posters for inspiring this fix.. this bug nearly killed me.Thanks, this is the only solution that worked for me.
xCode 12.2 (12B45b) + iOS 14.2
I could not get this to work on Xcode 12.2 (12B45b) for the life of me using these settings, even after having gone through multiple pages of Google results on GitHub and Stackoverflow.
As a last resort, I just started trying different Xcode 12.x versions. The moment I tried the same exact settings on Xcode 12.0.1 (12A7300) it was no longer an issue. Guess I'm staying on 12.0.1 for a while 馃し.
For what it's worth, I'm using Firebase Analytics + Crashlytics pods, with other dependencies on SPM.
Solution: https://stackoverflow.com/a/64150387/2399348
So, set VALID_ARCHS to $(ARCHS_STANDARD). This works for device AND simulator builds.This didn't work for me (was able to run it either on device or sim but not both depending on config) so I added x86_64 and i386 at the end:
$(ARCHS_STANDARD) x86_64 i386
I also flippedBuild Active Architecture Only
to 'Yes', and my problem went away.
Note: XCode 12.0.1, iPadOS 14.0.XX, bug did not exist in iPadOS 13/XCode 11.6.XX
Thank you so much to the previous posters for inspiring this fix.. this bug nearly killed me.Thanks, this is the only solution that worked for me.
xCode 12.2 (12B45b) + iOS 14.2I could not get this to work on Xcode 12.2 (12B45b) for the life of me using these settings, even after having gone through multiple pages of Google results on GitHub and Stackoverflow.
As a last resort, I just started trying different Xcode 12.x versions. The moment I tried the same exact settings on Xcode 12.0.1 (12A7300) it was no longer an issue. Guess I'm staying on 12.0.1 for a while 馃し.
For what it's worth, I'm using Firebase Analytics + Crashlytics pods, with other dependencies on SPM.
I'm using Xcode 12.2, and his solution works for me.
Solution: https://stackoverflow.com/a/64150387/2399348
So, set VALID_ARCHS to $(ARCHS_STANDARD). This works for device AND simulator builds.
Lots of people reporting that this didn't work, but it worked for me. Xcode 12.3.
None of this worked for me....
The Build Settings editor no longer includes the Valid Architectures build setting (VALID_ARCHS), and its use is discouraged. Instead, there is a new Excluded Architectures build setting (EXCLUDED_ARCHS). If a project includes VALID_ARCHS, the setting is displayed in the User-Defined section of the Build Settings editor. (15145028)
-> https://developer.apple.com/documentation/xcode-release-notes/xcode-12-release-notes
It works for me by removing VALID_ARCHS
lines on my project.pbxproj
For those who have Xcode 11.5, I have managed to solve this by upgrading Xcode to 12.1 and having no VALID_ARCHS
under Project -> Build settings -> User-Defined
For me i solved building an Xcode 12.x project on Xcode 11.x by removing Excluded Architectures
from Build Settings
-> User Defined
and setting Valid Architectures
to $(ARCHS_STANDARD)
Most helpful comment
line 144: ARCHS[@]: unbound variable
Command PhaseScriptExecution failed with a nonzero exit code
Please help