简体   繁体   中英

Swift Code in XCode 7.3.1 not working in iOS 10

I am building an iOS app using Swift 2.2, XCode 7.3.1, which is going to go live very soon. I upgraded my iPhone to iOS 10.0 and now when I try to run my code in my iPhone, I am getting the error -

在此处输入图片说明

At this stage of my project I don't want to upgrade to XCode 8.0 and use Swift 3.0. Is there any way I can make my code written in XCode 7.3.1 work in iOS 10. My code is working well for iPhones having iOS versions 9.3.2

Thanks

No, Xcode 7.3.1 does not support iOS 10. You cannot. You will have to upgrade to Xcode 8.

And, you should upgrade because it also provides you Swift 2.3 which will help you run latest SDK for iOS 10 etc and the transformation is automatic.

Read here: https://developer.apple.com/swift/blog/

To detect device in XCode you must install software with appropriate version or system will show you the message you have mentioned in the question.

A workaround as per your wish is that every time you make an IPA of your release and install it in the device you want to run with it (that could be a hard time if you deploy several times a day). Remember there is an upward compatibility but no downward compatibility that is if your deployment target is 8 or above you can run the IPA on device having iOS 8 or above but not in iOS 7.

Perhaps you may get some issues on running it on new iOS because of the some obsolete or new features, and to fix that you must upgrade XCode and compile your code on it.

Hope that helps!

Copy the folder 10.0 (14A345) in DeviceSupport folder of Xcode8 to

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport

It works for me :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM