You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cocoapod add VALID_ARCHS but it's discouraged in Xcode 12 #10077
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)
I have test to x86_64 for simulator only, test to exclude amd64 in both project and pod project... Sometimes it works but it depend on the project.
I have few prject, the only workaround that works 100% is to remove VALID_ARCHS line in the file located in the Pods/Targets Support Files/ Pods-(projectname)/Pods...xcconfig. Both in debug and release on the last line.
No need to exclude arm64 when there is no more VALID_ARCHS everywhere. It's very clean.
Is there a way to prevent pod update to not add this line or can cocoapod pubish a update to no more add this line in latest version of cocopod ?
After you told me it wasn't Cocoapod I searched for installed pods and found it was in a lot of pods like Mopub, Applovin... I guess if it is in the xcconfig of one of them it is also put in the xcconfig of the general Pod.
It is especially when the target is on IOS 9, from ios 10 it is no longer in it for Mopub, maybe it still is for others who have not fixed that.
Can Cocoapod check this line and delete it automatically, maybe with a script to add in the Podfile?
target 'Demo' do
post_install do |installer|
installer.pods_project.build_configurations.each do |configuration|
installer.pods_project.build_settings(configuration.name)['VALID_ARCHS'] = []
end
end
end
Fix one configuration, like Debug
target 'Demo' do
post_install do |installer|
installer.pods_project.build_settings('Debug')['VALID_ARCHS'] = []
end
end
Activity
dnkoutso commentedon Sep 21, 2020
Where does CocoaPods "add"
VALID_ARCHS? Nothing in the code search shows it.I think this is a dup of CocoaPods/Xcodeproj#784
SmartHbdev commentedon Sep 21, 2020
After you told me it wasn't Cocoapod I searched for installed pods and found it was in a lot of pods like Mopub, Applovin... I guess if it is in the xcconfig of one of them it is also put in the xcconfig of the general Pod.
It is especially when the target is on IOS 9, from ios 10 it is no longer in it for Mopub, maybe it still is for others who have not fixed that.
Can Cocoapod check this line and delete it automatically, maybe with a script to add in the Podfile?
dnkoutso commentedon Sep 21, 2020
We need to figure out how to support both for Xcode 11 transition and Xcode 12 with the new way. I still think the issue is in Xcodeproj.
Use a
post_installhook to deleteVALID_ARCHSfrom thePods.xcodeproj.SmartHbdev commentedon Sep 21, 2020
Yes a post_install but i don't know where i can find detailed docs.
Maybe you can give me a sample to do that ?
wxhzzsf commentedon Sep 22, 2020
add x86_64 in VALID_ARCHS
SmartHbdev commentedon Sep 24, 2020
If you read my first post i say it's not a universal solution. post_install hook would be nice but i don't know how to write it
dacaiguoguogmail commentedon Sep 25, 2020
Fix all configuration
Fix one configuration, like
Debugdnkoutso commentedon Sep 29, 2020
I am not seeing a thing we can do here for CocoaPods per se.
If a podspec uses
s.user_target_xcconfigthen that this strongly discourages as the docs say and you have to delete it yourself viapost_installhook.CocoaPods does not set
VALID_ARCHSin your project, only uses it for read-only duringlintwhich we have other issues filed for.I am going to close this for now. I will re-open if I have misunderstood something or new information shows we need to change something.