marcel
marcel

Reputation: 575

How to drop support for iPhone 5S

I want to release my app to the Appstore, and only allow users using an iPhone 6 and above to download the app.

I was hoping that requiring ARKit or iOS 11 would be able to drop support for 5S and below, but unfortunately 5S can run both.

My requirement is that I need support for 60 fps video recording at 1080p.

Can anyone think of a requirement that will allow me to drop 5S support?

Upvotes: 3

Views: 606

Answers (2)

Jordan Smith
Jordan Smith

Reputation: 10378

According to the below Apple document, the iPhone 5S does not support ARKit, so limiting to ARKit only devices should be the solution you are looking for.

https://developer.apple.com/library/content/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/DeviceCompatibilityMatrix/DeviceCompatibilityMatrix.html

Upvotes: 2

asd
asd

Reputation: 66

Use the following code in your project. You can write condition based on the Device type to exclude the divices you don't want to run.

struct ScreenSize {
    static let SCREEN_WIDTH         = UIScreen.main.bounds.size.width
    static let SCREEN_HEIGHT        = UIScreen.main.bounds.size.height
    static let SCREEN_MAX_LENGTH    = max(ScreenSize.SCREEN_WIDTH, ScreenSize.SCREEN_HEIGHT)
    static let SCREEN_MIN_LENGTH    = min(ScreenSize.SCREEN_WIDTH, ScreenSize.SCREEN_HEIGHT)
    static let WIDTH_RATIO          = ScreenSize.SCREEN_WIDTH / 320
    static let HEIGHT_RATIO         = ScreenSize.SCREEN_HEIGHT / 568
}

struct DeviceType {
    static let IS_IPHONE_4_OR_LESS  = UIDevice.current.userInterfaceIdiom == .phone && ScreenSize.SCREEN_MAX_LENGTH < 568.0
    static let IS_IPHONE_5          = UIDevice.current.userInterfaceIdiom == .phone && ScreenSize.SCREEN_MAX_LENGTH == 568.0
    static let IS_IPHONE_6          = UIDevice.current.userInterfaceIdiom == .phone && ScreenSize.SCREEN_MAX_LENGTH == 667.0
    static let IS_IPHONE_6P         = UIDevice.current.userInterfaceIdiom == .phone && ScreenSize.SCREEN_MAX_LENGTH == 736.0
    static let IS_IPAD              = UIDevice.current.userInterfaceIdiom == .pad && ScreenSize.SCREEN_MAX_LENGTH >= 1024.0
}

Upvotes: 0

Related Questions