ios - 将 POD 文件更新为与其包含的项目相同的构建设置
问题描述
我是一名初级开发者,继承了公司的 iOS 应用。我无权访问建造它的人。
我们升级到 Xcode 11.2 和 Swift 5。这引起了依赖问题的连锁反应,这是意料之中的。最大的问题是我们使用的是 Facebook SDK,而我们使用的版本不支持 iOS 13。所以我从 podfile 中删除了 FBSDKCoreKit 和 FBSDKLoginKit,运行“pod install”,将它们添加回 podfile,运行“pod install” ' 再次。我修复了不推荐使用的代码,一切都很好。
然而,我们的视频播放器的 pod 坏了,出现了十几个不推荐使用/重命名的函数错误。这个 Pod,VGPlayer,是由我们之前的开发人员分叉到他自己的 repo 中的,在那里他对其进行了更改。所以我再次将它从他的仓库分叉到我们公司的仓库,我的想法是修复损坏的东西,然后将其重新导入主项目。
我遇到的问题是,当我克隆存储库并在 Xcode 中打开它时,一切正常。当我将 pod 导入主项目时,所有不推荐使用/重命名的方法都很好,并且可以完美构建。所以我猜测 pod 和主项目使用不同的构建设置,但我不知道有什么不同。他们都使用 Swift 5.0 版,他们都有 iOS 11 的部署目标。
这里有什么建议吗?
platform :ios, '10.0'
use_frameworks!
inhibit_all_warnings!
def sharedPods
# Wrapper
pod 'KeychainAccess'
# Reporting tools
pod 'Fabric'
pod 'Crashlytics'
pod 'Firebase'
pod 'Firebase/Core'
pod 'Firebase/Performance'
pod 'Analytics'
pod 'Intercom'
pod 'FBSDKCoreKit'
# Models
pod 'FastEasyMapping'
# UI Components
pod 'MXSegmentedControl', :git => 'git@github.com:vesterio/MXSegmentedControl.git', :branch => 'master'
pod 'SDWebImage'
pod 'Presentr'
pod 'lottie-ios'
pod 'AloeStackView'
pod 'VGPlayer', :git => 'git@github.com:vesterio/VGPlayer.git', :branch => 'master'
pod 'IGListKit'
pod 'FBSDKLoginKit'
pod 'SwiftGen'
pod 'SAConfettiView', :git => 'git@github.com:vesterio/SAConfettiView.git', :branch => 'master'
end
target 'Tests' do
use_frameworks!
sharedPods
# Testing
pod 'Nimble'
pod 'Quick'
end
target 'Monner' do
sharedPods
end
post_install do |installer|
installer.pods_project.targets.each do |target|
plist_buddy = "/usr/libexec/PlistBuddy"
plist = "Pods/Target Support Files/#{target}/Info.plist"
`#{plist_buddy} -c "Add UIRequiredDeviceCapabilities array" "#{plist}"`
`#{plist_buddy} -c "Add UIRequiredDeviceCapabilities:0 string arm64" "#{plist}"`
end
end
解决方案
推荐阅读
- java - 无法使用上下文路径将请求转发到 URI
- react-testing-library - RTL中的getByText和screen.getByText有什么区别
- django - 不确定如何为 Celery 指定应用程序
- ios - 苹果支付服务器通知
- python - 字符串和字符串列表之间的余弦相似度
- laravel - Laravel Auth Bearer 令牌过期
- r - R-Studio 中的 $ 和 ~ 有什么区别?
- next.js - 在 NextJs 中检测生产或开发环境的最简单方法?
- c# - 从列表框句子中获取小数,然后将该小数添加到变量中
- r - 替换 r 中的嵌套循环(具有多个条件)