好的,在这里让一个特定的pod在Xcode 9中工作有些困难。这是一个很大的问题,我不知道该怎么做 - 问题是https://github.com/tinypass/piano-sdk-for-ios最后写的在Swift 3.1和Xcode 9中只导入Swift 3.2。
将其他所有内容转换为Swift 4后,我收到此错误 -
因此,在查看其他答案之后,我再次在Xcode 8中打开了项目,因为从我理解的可以转换为Swift 3.2。然后去那里,当我去#34;转换为当前的Swift语法"它不会在您可以在菜单中检查的框架/事物下拉出这个特定的pod。钢琴OAuth不存在。
我试图直接找到.swiftmodule错误引用,但" Modules文件夹"在我的项目中不可见 - 我只能使用finder打开它,以及它是一堆随机字符。
我需要帮助。如何将此pod转换为3.2然后转换为4?我试过pod deintegrate然后pod安装,我在Xcode 8中清理,然后转到9,没有任何东西正在使用这个3.1 pod。
PODFILE:
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'Adventures In Design' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Adventures In Design
pod 'PianoOAuth', '~>2.0.1'
pod 'AudioPlayerManager'
pod 'FontAwesome.swift'
pod 'Parse'
pod 'ParseUI'
target 'Adventures In DesignTests' do
inherit! :search_paths
# Pods for testing
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'Adventures In Design'
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.2'
end
end
end
end
现在在另一个广告连播中获取此内容:The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. This setting can be set in the build settings editor.
即使它是Swift 3
答案 0 :(得分:1)
pod本身需要支持Swift 4才能将它编译为Swift 4.对于Swift 3.2,有一种使用Swift 3.2在Xcode 9 beta中编译pod的解决方法(从GitHub复制的代码) issue关于这个主题):
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == '<insert target name of your pod here>'
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.2'
end
end
end
end
但是,如果pod包含一些使用Swift 3.1编译的预构建二进制文件,则无法更新pod,您需要等待项目开发人员将其更新为Swift 3.2。