XCode8 支持IOS7

问题:最近好多IOS开发升级Xcode8,发现Xcode默认最低支持IOS8。

解决方案:

一、 如果你的工程用的全是oc开发,恭喜你按下面方法很容易就搞定。

1.下载:文件链接: https://pan.baidu.com/s/1dELI1pB 密码: 3s7e。

2.放在/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport下面即可。(Finder->前往->前往文件夹)

3.设置Xcode General->Deployment Target 7.0(没有选项,强制写7.0)。

二、如果你的工程是oc和swift混编或swift 还使用了Pod建议最好就最低支持IOS8

1.设置Podfile

platform :ios, '7.0'

use_frameworks!

2.如果你的工程不发布到AppStore。用上面的方法勉强还可以。

3.如果发布AppStore 还是会报错


XCode8 支持IOS7_第1张图片

No it does not. use_frameworks! enables Swift support by building your code in the new dynamic frameworks. Dynamic frameworks only support iOS 8. Unfortunately, since you cannot use Swift in static libraries (the previous way CocoaPods bundled libraries), this was the only way to bundle Swift files.

A note that, I believe, is important enough to be an answer. Dynamic frameworks are actually supported on iOS 7, and you can run code using dynamic frameworks on an iOS 7 device. However iOS 7 doesn't support fair-play encrypted third-party frameworks. And because of that if you tried to submit an app for iOS7 using dynamic frameworks to iTunesConnect, it would be rejected (one prooflink).

I think that it is important, because it might seem that it works, but it doesn't. And if you ignore the warning, you might encounter the problem too late, when half the project is already in Swift.

We faced this problem when we were starting to develop our own pod. The project compiled and run fine on iOS 7. Good thing we researched this issue further.


原因参考http://www.91r.net/ask/29728487.html

你可能感兴趣的:(XCode8 支持IOS7)