如何解决React Native:在 podfile 中添加 post_install 脚本的位置?
我已升级到 XCode 12,并且正在关注如何解决模拟器部署目标警告的 this article。它说要将以下 post_install 脚本添加到您的 podfile 中:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end
end
但是当我将它添加到 podfile 的末尾时,我仍然收到相同的错误:warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0,but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'RNBackgroundFetch' from project 'Pods')
和其他类似的错误。
我想知道的:我应该在 podfile 的哪个位置添加 post_install 脚本?我的 podfile 中有一个以 target '<project name>' do
开头的代码块,在这个块的末尾我已经有了这个代码:
post_install do |installer|
flipper_post_install(installer)
end
我应该将推荐的代码添加到这个现有的 post_install 脚本中吗?或者我应该在 podfile 的末尾添加一个单独的 post_install 脚本?或者是其他东西?我已经尝试了这两种方法,但仍然遇到相同的模拟器部署目标错误。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。