Xcode 9: how to install ios 10 sdk

前端 未结 2 956
星月不相逢
星月不相逢 2021-02-08 04:28

Given the fact that currently Xcode 9 is beta and the main interest today is getting knowledge of iOS 11 the question is admittedly odd...

Is there a way to target iOS 1

相关标签:
2条回答
  • 2021-02-08 04:59

    Xcode 9 beta 4 allows all previous simulators to be downloaded and used. No workaround is needed any more, just download the simulator by clicking on the Download simulators menu item shown in picture (last item).

    Screenshot : XCode 9 beta mixed simulator versions in list

    0 讨论(0)
  • 2021-02-08 05:13

    Using this and this I was able to compile against SDK10.3 using Xcode 9 beta 4. It is possible with MANY caveats.

    Caveat 1: The Xcode GUI doesn't seem capable of detecting multiple iPhone SDKs simultaneously. So you can't switch back and forth between 10.3 and 11.0 as your base SDK.

    Caveat 2: The swift compiler that comes with Xcode 9 does not support targeting iPhone Simulator SDKs less than 11.0. You'll encounter this error if you try:

    error: Swift does not support the SDK 'iPhoneSimulator10.3.sdk'

    Caveat 3: Even if you do all of this, you still won't be allowed to submit an app with the intention of releasing it before iOS 11 is launched. The only benefit of using older base SDKs is to take advantage of certain special circumstances in the iOS platform. One notable example being background VoIP sockets and there are several other examples like it scattered throughout iOS's history.

    The legacy VoIP architecture was replaced by a new PushKit-based architecture in iOS 8. It was then formally deprecated with the iOS 9 SDK. In iOS 10 it is only available as a compatibility measure; it continues to work (as well as it ever did) if your app is linked with an old SDK, but is disabled if you link with the iOS 10 SDK.

    Caveat 4: You can only do it with a purely objective-C project. There seems to be some incompatibility between the 10.3 SDK and the version of the swift compiler that comes with Xcode 9. Specifically, this error:

    If You're still interested

    ... here's how to do it.

    Step 1

    Replace the 11.0 SDK for Xcode 9 with the 10.3 SDK for Xcode 8.3.3 by replacing the files here:

    Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs

    with the files from here:

    Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs

    Step 2

    Change the MinimumSDKVersion value from 11.0 to 10.3 in this file:

    Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Info.plist

    0 讨论(0)
提交回复
热议问题