I have an universal app and I´ve implemented it to use the healthkit API. It runs great on iPhone but when I try to install it on an actual iPad device (works perfectly in iPad simulator) it wont install.
I am getting the error message: "The Info.plist for application at ... specifies device capability requirements, which are not met by "my ipad"".
I there any way I can distribute an universal app where the healthkit API (framework) only runs on the iPhone?
Heres two screenshots of my project:
Do I really need to make a standalone iPad app?
Update:
this answer comes many years ago when HealthKit was first introduced on iOS 8. Now, please follow the official guideline:
https://developer.apple.com/documentation/healthkit/samples/accessing_health_records?language=objc
--- original answer ---
you can remove healthkit from Required device capabilities in your project's info.plist
Only by removing healthkit from Required device capabilities from info.plist doesn't work.
If you do only above step then apple reject the app with below message.
Your app uses the HealthKit API but does not indicate integration with the Health app in your app description.
You need to do below steps to run your app in both iPhone & iPad.
1. Remove healthkit from Required device capabilities from info.plist
2. You need to set HealthKit.framework as Optional from Linked Frameworks and Libraries
Seems like you can't use HealthKit on the iPad:
From the HealthKit Framework Reference:
Both HealthKit and the Health app are unavailable on iPad. The HealthKit framework cannot be used in an app extension.
From Apple documentation:
https://developer.apple.com/reference/healthkit
HealthKit and the Health app are unavailable on iPad.
When you enable the HealthKit capabilities on an iOS app, Xcode adds HealthKit to the list of required device capabilities. This prevents users from purchasing or installing the app on devices that do not support HealthKit.
The two statements together imply that if you add HealthKit capabilities to your app, user will not be able to install your app on iPad.
It can be found in the Device Compatibility Matrix as well:
https://developer.apple.com/library/content/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/DeviceCompatibilityMatrix/DeviceCompatibilityMatrix.html
Related
Have anyone worked on migrating an iOS app with Watch OS1 to Watch OS2 or higher versions. I have used Coredata & Appgroups for sharing data between iPhone app and watch app. Now in the newer Watch OS 2(& above) Apple no longer supports Appgroups to share data across iPhone app & Apple Watch app. Could you please help me in this.
I need to use Coredata to share data between the targets without having Appgroups.
Implement two-way communication between your Apple Watch app and the paired iPhone app with the Watch Connectivity framework.
Apple provided the sample code here
for connectivity between apple watch app and iphone app using latest OS version.
Apple OverView
Most Apple Watch apps require an exchange of data with a paired iPhone app. This sample demonstrates how to use the Watch Connectivity APIs to:
Update application contexts
Send messages
Transfer user info and manage the outstanding transfers
Transfer files, view transfer progress, and manage the outstanding
transfers
Update current complications from iOS apps
Handle Watch Connectivity background tasks
On watchOS 1, the watch app was an app extension that actually ran on the paired phone and the watch simply acted as a remote display. This is why it was possible to share data using an app group, just as you can with any other extension.
From watchOS 2.0 onwards the watch app executes on the watch itself so the watch app and the companion app no longer share a file system.
In fact, where possible, users should be able to use the watch app even when the watch isn't near the paired phone. This means that you need to adopt an asynchronous data sharing approach between the watch and phone apps
You will need to use the Watch Connectivity Framework for your app.
I had submitted my app as Universal a long time ago and now I need to remove it from the iPad section and few iPhone versions such as 4,5,5S. Is there a way I can achieve this or do I need to show custom not supported screen to user when they install on such devices. Will apple reject my app for this reason?
For restricting your app to only iPhones devices after the app was already published on App Store you should reupload new version of your app to App Store by simply just changing target devices to iPhone only(with different Bundle Identifier of course).
About restricting your app to stop supporting older devices(4,5,5S) you should change your iOS version compatibility. For example iOS 13 is supported on iPhone 6s and newer devices so user won't be able to use it on older devices. Apple should handle this on their own.
There are some alternatives to restrict your app to specific devices with Required device capabilities key which you can find in your Info.plist file. But I don't think apple will accept this, if this features are not actually used in your app.
Here is the documentation about UIRequiredDeviceCapabilities in case you need it.
You can only restrict user from downloading newer versions of your app from App Store ,By changing your apps deployment info in Xcode general tab.
By changing device type from Universal to iPhone only and Deployment target to iOS 13 which in supported by device above 6s. Then user will not be able to download on older versions.
Or you can restrict user access in your app by putting device specific checks and showing your custom ui for unsupported versions. But for this apple may reject your app if it fails in every case for specific device.
But both type of changes you have to upload newer version of app on App Store.
I am sorry that I look around but didn't find answer for this. I am new to ios development and want to create an app and include it in CarPlay to test it. I don't want the app to be public now, just for testing. So is there any developer version I can use? Thanks.
If the accessory(Car audio system) supports iOS app for CarPlay, it must setup at least one, but preferably many,SupportedExternalAccessoryProtocol parameters in their IdentificationInformation message
Starting with iOS 12, many CarPlay APIs are public. Once you add the respective entitlements, you can develop a CarPlay app even without Apple's blessing. See How to test an iOS application on the CarPlay simulator for more details.
If I only want my application to run on certain iPhone/iPad models, is it appropriate to specify for instance that my app needs ARKit to achieve this even if my app does not actually use anything from ARKit?
Is there another way to go about this? Also, even after making this change, my app still builds for devices it shouldn’t like the iPhone 5s simulator. Is the device restriction a change that occurs only on the app store?
UIRequiredDeviceCapabilities lets you declare the hardware or specific capabilities that your app needs in order to run.
UIRequiredDeviceCapabilities can be used as a dictionary in Info.plist with a capability as key and its value as YES/NO.
It does not seem to have any impact on simulators but when run on a device it although compiles but shows a prompt and does not run:
It looks like you can use a capability to restrict the device even if you are not actually using that capability in code anywhere.
Apple has mentioned here that AppStore uses this key to prevent users from installing the app.
Also, we can not use this key to restrict any device in a update. It looks like any intended restriction needs to be included in the first app version:
Important: 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.
EDIT:
The device capability restriction seems to work even if that particular capability is not available fo the iOS version. To test this, I have set the deployment target as iOS 9.3 and tested on a iPhone 6 device with iOS 10.3.3 version. It still showed me the popup. Here, arkit and nfc are available for iOS 11 onwards.
References:
https://developer.apple.com/library/content/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/DeviceCompatibilityMatrix/DeviceCompatibilityMatrix.html
https://developer.apple.com/library/content/qa/qa1397/_index.html
I'm working on an App which uses some new iOS 8 Health Kit (HK) features.
At present the iPad doesn't get the Health app, so can't use HK. Since the HK features are not a major part of my app functionality, I could happily leave them out of the iPad version.
My problem is that there seems no way to get a universal app running on iPad once the HK entitlements have been added, even if no use is made of HK functionality.
Does anyone know any different? Is there a way (for example) to have separate 'per device' entitlements?
Thanks!
If you want to use HealthKit, Framework Reference clearly states that your app should be primarily designed to provide health or fitness service. If your app is not a health or fitness focused app, you might not able to submit your universal app .
In addition, your app must not access the HealthKit APIs unless the
app is primarily designed to provide health or fitness services. Your
app's role as a health and fitness service must be clear in both your
marketing text and your user interface. Specifically, the following
guidelines apply to all HealthKit apps.
https://developer.apple.com/library/prerelease/iOS/documentation/HealthKit/Reference/HealthKit_Framework/index.html
Removing healthkit from Required device capabilities in my Info.plist solve this issue for me.