XCode - upgrade to Swift 4 manually

此生再无相见时 提交于 2019-12-23 12:05:21

问题


I have a project with 2 targets, both targets share more than 99% codes and was written in Swift 3.

When XCode 9 is available, one of the targets is being scanned, the codes and the target's "Build Settings" are all updated for Swift 4. Sadly, I just found out that another target is still marked as Swift 3.2 syntax.

I would like to update the second target to Swift 4 by XCode, however, the second target is marked as Swift 3.2 syntax but the codes are Swift 4 already, it is not compilable and thus automatic update to Swift 4 by XCode is not worked.

Since both targets share most of the codes, I do not need XCode to help me scan or convert the codes automatically, I would like to upgrade the whole project to Swift 4 instead. I have updated the "Swift Language Version" in Build Settings of the second target to Swift 4.0 manually. Is there any other project settings which I should take care too?

Thanks


回答1:


I have updated the "Swift Language Version" in Build Settings of the second target to Swift 4.0 manually

Check the Swift 3 @objc inference is set to off.

Other than that, you are good to go.



来源:https://stackoverflow.com/questions/46401856/xcode-upgrade-to-swift-4-manually

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!