Swift with iOS 5 Deployment Target

What is the minimum ios deployment target for swift 5?

You can set any valid iOS version between 8.0 to 12.1.

RealityKit app and lower iOS deployment target


Firstly :

Do not include Reality Composer's .rcproject files in your archive for distribution. .rcproject bundles contain the code with iOS 13.0+ classes, structs and enums. Instead, supply your project with USDZ files.

Secondly :

To allow iOS 13+ users to use RealityKit features, but still allow non-AR users to run this app starting from iOS 10.0, use the following code (CONSIDER, IT'S A SIMULATOR VERSION):

import UIKit

#if canImport(RealityKit) && TARGET_OS_SIMULATOR

import RealityKit

@available(iOS 13.0, *)
class ViewController: UIViewController {

var arView = ARView(frame: .zero)

override func viewDidLoad() {
super.viewDidLoad()

arView.frame = self.view.frame
self.view.addSubview(arView)

let entity = ModelEntity(mesh: .generateBox(size: 0.1))
let anchor = AnchorEntity(world: [0,0,-2])
anchor.addChild(entity)
arView.scene.anchors.append(anchor)
}
}
#else

class ViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()
}
}

#endif

Deployment target is iOS 10.0:

Sample Image

Thirdly :

When publishing to the AppStore (in case we have a deployment target lower than iOS 13.0), we must make the import of this framework weakly linked in the build settings (that's because RealityKit is deeply integrated in iOS and Xcode).

So, go to Build Settings –> Linking -> Other linker Flags.

Double-click it, press +, and paste the following command:

-weak_framework RealityKit -weak_framework Combine

Sample Image

P.S. In Xcode 13.3, there's a project setting that also could help

OTHER_LDFLAGS = -weak_framework RealityFoundation

Fourthly :

So, go to Build Settings –> Framework Search Paths.

Then type there the following command:

$(SRCROOT)

it must be recursive.

Sample Image

Fifthly

The archives window:

Sample Image

Which iOS target do I need to set to avoid bundling Swift runtime libraries with my iOS app?

The answer is iOS 12.2.

Source : Xcode 10.2 Release Notes

Interesting part is in App Thinning section.

To see the difference in file sizes between an app that’s thinned for iOS 12.2 and an app that’s thinned for iOS 12.1 or earlier, set your app’s deployment target to iOS 12.1 or earlier, then create an archive of your app with the scheme set to Generic iOS Device. After building the archive, select Distribute App from the Archives organizer, then select Development distribution. Be sure to select a specific device—such as iPhone XS—in the App Thinning pull-down menu. When the distribution process completes, open the App Thinning Size Report in the newly created folder. The variant for iOS 12.2 will be smaller than the variant for iOS 12.1 and earlier. The exact size difference depends on the number of system frameworks your app uses.

How to change deployment target in Xcode 12.3?

Search for IPHONEOS_DEPLOYMENT_TARGET in the search bar: you'll see that the human readable version (non-raw) string is iOS deployment target. So this is not about setting the simulator's target, this is about setting the iOS one. But you think you've already set the correct value for iOS deployment target.

Perhaps you are looking at the wrong target? Or looking at the project instead of the target?: See the picture below, select the target under TARGETS not PROJECT. This is because the target configuration overrides the project one:

Sample Image

Swift with iOS 5 deployment target

From one of the engineers working on Swift, iOS 7, Mavericks and later:

Sample Image

Interface is changing between IOS deployment target version on all buttons

From the interface builder, set button style from plain to default.

Sample Image

Xcode Consequences of Raising Minimum Deployment Target for Users of older OS

Short answer, yes.
Your old version will still be available.

can i change my iOS deployment target to 5.0 on xcode 4.5?

You don't need to change the base SDK to change the deployment target. Just change it to 5.0 under your target options:

Sample Image

Note that autolayout and some other features are available only on SDK 6.0.

Edit for XCode 7+

The tab is now called General, and the Deployment target is under Deployment info:

XCode 7

Prompted to Update iOS Deployment Target to 12.0 when deployment set to iOS 10.0

You don't have to do it. Uncheck (note that there could be other types of changes that you may want to perform) & Perform Changes, or hit cancel if all changes are for min deployment target.



Related Topics



Leave a reply



Submit