我正在开发一个项目,最初在Xcode 8.3和Swift 3.2中启动,Xcode 9(稳定版本)发布后,我使用Xcode中的内置选项将项目从Swift 3.2转换为Swift 4.0 9.它还转换了Alamofire,SwiftyJson等豆荚。我还使用pod update
命令更新了所有的豆荚。
一切在模拟器以及iPhone上运行良好,但是当我尝试归档项目时,归档过程失败,错误如下。 Error Image1 Error Image2Xcode 9归档过程失败
我试着像改变斯威夫特语言版本,优化级别两个目标&荚构建设置所有可能的解决方案,但它没有工作。
我也试过在我的pod文件中。
swift_32 = ['Alamofire', 'AlamofireImage', 'AssistantKit'] # if these pods are in Swift 3.2
swift4 = ['SwiftyJSON'] # if these pods are in Swift 4
post_install do |installer|
installer.pods_project.targets.each do |target|
swift_version = nil
if swift_32.include?(target.name)
swift_version = '3.2'
end
if swift4.include?(target.name)
swift_version = '4.0'
end
if swift_version
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = swift_version
end
end
end
end
构建和运行项目工程,但只有归档进程失败,上面提到的错误。
请将收到的错误消息添加为文本而不是截图。 –