【发布时间】:2018-02-12 05:12:03
【问题描述】:
好的,在这里让特定的 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。然而,在去那里之后,当我去“转换为当前的 Swift 语法”时,它不会在你可以在菜单中检查的框架/事物下拉出这个特定的 pod。钢琴 OAuth 不存在。
我试图直接找到错误引用的 .swiftmodule,但是“模块文件夹”在我的项目中不可见 - 只有使用 finder 才能打开它,它是一堆随机字符。
我需要帮助。如何将此 pod 转换为 3.2 然后转换为 4?我尝试了 pod deintegrate 然后 pod install,在进入 9 之前我在 Xcode 8 中进行了清理,但这个 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
现在在另一个 pod 上得到这个: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
【问题讨论】:
-
pod 本身需要支持 Swift4,否则你将无法使用 Swift4 编译它,原因很明显。查看您提到的 pod 的 GitHub 页面,它尚不支持 Swift4,因此您将无法使用 Swift4 进行编译。
-
对,这不是我要问的——我需要将它从 3.1 转换为 3.2。我怎么做?否则我无法在新的 Xcode 中运行我的整个程序
标签: xcode swift3 cocoapods swift4 xcode9-beta