$iOSVersion = '13.1'
platform :ios, $iOSVersion
use_frameworks!
def general_pods
pod 'Some_pods_here'
end
target 'Some_target1' do
general_pods
pod 'Some_pod_here'
end
target 'Some_target2' do
general_pods
pod 'some_pod_here'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["ONLY_ACTIVE_ARCH"] = "YES"
config.build_settings["EXCLUDED_ARCHS[sdk=*]"] = "armv7"
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
end
end
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if Gem::Version.new($iOSVersion) > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
end
end
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
# some older pods don't support some architectures, anything over iOS 11 resolves that
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
end
end
end
4条答案
按热度按时间0wi1tuuw1#
将其更改为IOS部署目标12.0后,问题解决
mwyxok5s2#
请看这个屏幕截图-x1c 0d1x
问题是
Undefined symbols for architecture armv7
。你能去你的
Build Settings
1.投射
1.应用程序目标
1.所有的pod目标(如果使用pod)
搜索
armv7
,如果存在,是否删除?之后,执行
Product > Clean Build Folder
,然后尝试运行/构建应用程序。6xfqseft3#
我在我的项目中遇到了同样的错误。我使用Xcode 13.3.1。所以我用下一种方法更新了我的Podfile(添加了排除的arch和部署目标):
wztqucjr4#
在我的情况下,我使用这个解决方案,它为我工作。
将下面给出的代码添加到你的podfile底部并运行“pod install”命令。
此时**'12.0'您可以根据您的项目进行相应的更改。对于示例**:'11.0'或'10.0',如下图所示。它应与**平台相匹配:ios,'12.0'**这一行在您的podfile中的第二个位置。
"在我看来"
示例:平台:ios,'12.0'所以配置构建设置[' IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'.所以12.0在两个版本中都匹配.