Xcode 9: how to install ios 10 sdk

前端 未结 2 955
星月不相逢
星月不相逢 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 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

提交回复
热议问题