How to restrict my app to iphone 5s and above? - ios

I am using healthkit in my application to read user's steps. But unfortunately iphone 5 and below does not have M7 sensor due to which my app can not perfome its full functionalities on those devices. So is there any possible way that user having iphone 5 or below could not install my app from app store ? Or any other possible workout/behaviour suggested ?

I think you want the HealthKit key of UIRequiredDeviceCapabilities in your .plist file.
Documentation on UIRequiredDeviceCapabilities is here
UIRequiredDeviceCapabilities (Array or Dictionary - iOS) lets iTunes and the App Store know which device-related features an app requires in order to run. iTunes and the mobile App Store use this list to prevent customers from installing apps on a device that does not support the listed capabilities.
The healthkit bit says:
healthkit Include this key if your app requires (or specifically prohibits) HealthKit.

I am afraid you can't restrict application to device specific.
All device requirement changes must be made when you submit an update
to your binary. You are permitted only to expand your device
requirements. Submitting an update to your binary to restrict your
device requirements is not permitted. You are unable to restrict
device requirements because this action will keep customers who have
previously downloaded your app from running new updates.
don't know any work around regarding Healthkit, still if any may result in app rejection.
The value of the UIRequiredDeviceCapabilities key is either an array
or a dictionary that contains additional keys identifying features
your app requires (or specifically prohibits).
Be sure to include keys only for the features that your app absolutely
requires. If your app can run without a specific feature, do not
include the corresponding key.
Can read more details in docs here:
https://developer.apple.com/library/content/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/DeviceCompatibilityMatrix/DeviceCompatibilityMatrix.html

Related

Apple rejected my app: UIRequiredDeviceCapabilities key

I developed an app with ionic 3 and I’m trying to publish it for Android and iOS. With Android the publish process was fast as a lighting bolt without any problem. With iOS the publish process is a pain, they reject my app for this reason:
"Thank you for your response.
Regarding Guideline 2.3 - Performance - Accurate Metadata, we continue to find that your app does not install on iPad
To resolve this issue, it would be appropriate to check the UIRequiredDeviceCapabilities key to verify that it contains only the attributes required for your app features or the attributes that must not be present on the device. Attributes specified by a dictionary should be set to true if they are required and false if they must not be present on the device.
We look forward to reviewing your resubmitted app."
I checked the app info.plist but the key “UIRequiredDeviceCapabilities” is not present and I don’t know how to set it in order to address the issue.
Moreover I tested the app on several ipad simulators without any problem…
There’s anyone with the same issue ?
I solved the issue by adding the "telephony" property into "UIRequiredDeviceCapabilities" because my app use the "tel:" link so in this case the property is required.

Universal iOS app with HealthKit not showing up in iPad App Store

We have an iOS application that uses healthkit but we handle all cases of it gracefully for our iPad Application. After a successful submission we are not able to download it from the App Store directly on an iPad, but we can download it through iTunes. Is there something we need to do to make it appear on the iPad's App Store as well?
Does you plist contain healthkit under the required device capabilities? If it does, I'm guessing it won't show up on the iPad on the store, since the device doesn't fulfill the requirements. Downloading through iTunes won't filter out apps based on the requirements.
The fix would be to remove healthkit from the required capabilities and resubmit. The app should show up in the store for iPad then.
https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW3
Found that we needed to weak link HeathKit in the Link Binary With Libraries section by making the Framework "Optional".

Restrict app to devices with touch id

Based on this link, it's not possible to restrict supported device to specific device models but I also read that it's possible to restrict it when your device is using a specific hardware via UIRequiredDeviceCapabilities but I didn't see any key that pertains to devices with touch ID.
My question is, is there an app review safe way to restrict my app only to devices with touch ID? I may have overlooked some keys in the UIRequiredDeviceCapabilities.
Just to add, I already know how to restrict it via code but the problem is it might get rejected in the app review based on my research so my only hope is in the UIRequiredDeviceCapabilities maybe some combination of the existing keys that may lead to devices with touch id.
Reason:
Fingerprint scanning is one of the primary security feature of the app.
I have checked the UIRequiredDeviceCapabilities as well. There is no key to restrict the app to devices with Touch ID.
This might be a XYProblem.

What UIRequiredDeviceCapabilities key is linked to the M7 Processor?

My step counter app is using the core motion framework and the m7 processeor.
However, it was rejected by apple for this reason:
2.3 Details
We noticed your app requires functionality specific to iPhone devices, but the UIRequiredDeviceCapabilities key in the app's Info.plist does not reflect this requirement. This key prevents users from installing applications on unsupported devices.
Next Steps
Since your app requires step counting functionality utilizing the m7 processor, please configure the UIRequiredDeviceCapabilities key to reflect the appropriate devices.
Is it the accelerometer key that I need to add to the UIRequiredDeviceCapabilities in the info.plist or is there another key for the m7 processor?
I have added the key like this: http://i.imgur.com/Cg1I7kD.png
Does it look correct?
Help is much appreciated!

Unique device identification for ios

I have a HTML/JS/CSS app which I wish to convert to an ios app using phonegap. In my application, I require to identify each device uniquely. From iOS 7 Apple does not accept app that Fetch UDID. I want to achieve this for ios4+ to latest. I have seen one plugin listed at https://build.phonegap.com/plugins/1112. One additional question related to this plugin is if I use a plugin which relies on keychain then what is the risk factor, i.e., under which circumstances is the keychain reset or cleared?
This is not common way but it may be helpful.
You can use service http://get.udid.io to get real UDID of device.
Here is repo with example of usage https://github.com/vladignatyev/udidio-example
Per swift, the latest way I've been doing this is:
var vendorDeviceId = UIDevice.currentDevice().identifierForVendor.UUIDString
This is correct, the UUID is now unique per app install, not device. If the user re-installs your app he will be assigned a new unique identifier (different from the last one).
According to Cordova documentation here's the way to get device UUID
var string = device.uuid;
Note that for iOS the UUID for a device is different from each app. This UUID is created on your app first run, and changes when you delete and re-install your app.
iOS Quirk
The uuid on iOS uses the identifierForVendor property. It is unique to the device across the same vendor, but will be different for different vendors and will change if all apps from the vendor are deleted and then reinstalled. The UUID will be the same if app is restored from a backup or iCloud as it is saved in preferences. Users using older versions of this plugin will still receive the same previous UUID generated by another means as it will be retrieved from preferences.
You can use my indentifier for vendor plugin
https://github.com/jcesarmobile/IDFVPlugin
It uses the native identifier for vendor https://developer.apple.com/library/ios/documentation/uikit/reference/UIDevice_Class/Reference/UIDevice.html#//apple_ref/occ/instp/UIDevice/identifierForVendor

Resources