I am able to open Settings > iCloud using following method,
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"App-Prefs:root=CASTLE"]];
Question: Is this legal? Will Apple reject the application? Because I cannot find any legitimate source for this method to open iCloud Settings.
Apple has stopped allowing redirection to the public schema like Prefs so from now on the application will not be able to redirect to the settings other than the self-settings.
See the link for more detail
It is not supported officially and you can follow along this SO Thread
and this answer in particular. Hope it clear out the issue. The settings would open but as it is not officially supported there may a rejection due to this issue.
Based on experience, Apple will decline reviewing your app in case you use ":root=" non-public url Scheme
Apple Review Team Message:
Your app uses the "prefs:root=" non-public URL scheme, which is a private entity. The use of non-public APIs is not permitted on the App Store because it can lead to a poor user experience should these APIs change.
Continuing to use or conceal non-public APIs in future submissions of this app may result in the termination of your Apple Developer account, as well as removal of all associated apps from the App Store.
Related
I received this rejection message from apple in the resolution center:
Guideline 2.5.1 - Performance - Software Requirements
Your app uses public APIs in an unapproved manner, which does not comply with guideline 2.5.1 of the App Store Review Guidelines.
Specifically, it would be appropriate to remove the HomeKit API from within your binary and resubmit your application for review.
Since there is no accurate way of predicting how an API may be modified and what effects those modifications may have, Apple does not permit unapproved uses of public APIs in App Store apps.
the app code I'm using is open sourced
https://github.com/SuperMarcus/NineAnimator
I need help on how to remove the HomeKit API from within the binary.
First remove it from the Signing and Capabilities:
Then try to run your code again.
If you where using a HomeKit API anywhere in code, Xcode will show you where it is.
In my app I'm using [NSURL URLWithString:#"App-Prefs:root=Privacy&path=LOCATION"] to open settings screen. Will it be rejected by apple as according to some sources this is considered a private API?
Yes. The only legal way to open Settings is to use UIApplicationOpenSettingsURLString.
My app just got rejected because of this, so yes, it is considered as private API :)
Here's the rejection notice from Apple:
Your app uses the "prefs:root=" non-public URL scheme, which is a private entity. The use of non-public APIs is not permitted on the App Store because it can lead to a poor user experience should these APIs change.
To resolve this issue, if you are navigating to Settings > Privacy. "Just remove that code" and put a simple alert showing Enable location services.
Because from iOS 10 apple consider it is as private entity. So you can not go through it.
There’s no supported way to open Settings to the Wi-Fi/Language/Location ‘page’. The fact that this worked in iOS 9 is a bug that’s been fixed in iOS 10.
For more info please refer https://forums.developer.apple.com/message/186656#186656
I received the below email shortly after I submit my app to the AppStore from XCode Organizer. My app contains the framework in this GitHub (https://github.com/wujianguo/iOSAppsInfo), I use it to create shortcuts to the rest of the users installed applications, and ONLY for that purpose.
Is there a different way of getting a list of all installed apps so I can create shortcuts or will all methods be instantly rejected as below?
Dear developer,
We have discovered one or more issues with your recent delivery "shortcut-app". To process your delivery, the following issues must be corrected:
Non-public API usage:
The app references non-public selectors in Xxxx xxxx: _applicationIconImageForBundleIdentifier:format:scale:, allInstalledApplications, appTags, applicationProxyForIdentifier:, localizedShortName, openApplicationWithBundleID:
If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed.
If you think this message was sent in error and that you have only used Apple-published APIs in accordance with the guidelines, send the app's nine-digit Apple ID, along with detailed information about why you believe the above APIs were incorrectly flagged, to appreview#apple.com. For further information, visit the Technical Support Information page.
Once these issues have been corrected, you can then redeliver the corrected binary.
Regards,
The App Store team
This library uses private API which you cannot use especially when you submit the app to apple, as they will reject it like this.
I am not aware of another way to get installed apps, but in order for apple to accept uploading the app, you must stop using this library, specially this method.
I am trying to find device lock state as UIApplicationState gives the wrong state when Lock the device, it gives UIApplicationStateActive for few second.
I found one solution using Darwin notifications for notification "com.apple.springboard.lockcomplete".
Is it the correct way to get Lock state? Does Apple allow this?
No Apple won't allow to use "com.apple.springboard.lockcomplete".My application get rejected due to this.
The answer is... it depends.
Using non-public API is not permitted, and these Darwin notifications are not publicly documented. So the official answer is no, you are not allowed to use this notification in a production code. Otherwise, you risk getting this unpleasant email from Apple:
Your app uses or references the following non-public APIs:
com.apple.springboard.lockcomplete
On the other hand, I've used that very notification for 4 years till I got a rejection from the App Store for one of my apps. Another app of mine still uses it without problems. So if you really need it and you think it's worth the risk, you may give it a try.
Based on our experience, your app WILL be rejected for use of com.apple.springboard.lockcomplete with the following notification:
Guideline 2.5.1 - Performance - Software Requirements
Your app uses or references the following non-public APIs:
com.apple.springboard.lockcomplete
The use of non-public APIs is not permitted on the App Store because
it can lead to a poor user experience should these APIs change.
Continuing to use or conceal non-public APIs in future submissions of
this app may result in the termination of your Apple Developer
account, as well as removal of all associated apps from the App Store.
Next Steps
If you are using third-party libraries, please update to the most
recent version of those libraries. If you do not have access to the
libraries' source, you may be able to search the compiled binary using
the "strings" or "otool" command line tools. The "strings" tool can
output a list of the methods that the library calls and "otool -ov"
will output the Objective-C class structures and their defined
methods. These tools can help you narrow down where the problematic
code resides. You could also use the "nm" tool to verify if any
third-party libraries are calling these APIs.
Resources
If there are no alternatives for providing the functionality your app
requires, you can file an enhancement request.
Apple won't allow this.Here is there comments for this
"The use of non-public APIs is not permitted on the App Store because it can lead to a poor user experience should these APIs change.
Continuing to use or conceal non-public APIs in future submissions of this app may result in the termination of your Apple Developer account, as well as removal of all associated apps from the App Store."
My app has been approved before with iHasApp. A new update has been rejected by Apple with the following reason:
"Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs"
We found that this app scan all known URL schemes using a service called iHasApp.
How to fix that?
Apple recently began rejecting apps that use canOpenURL: simply to determine which apps are installed on a user's device. You'll have to remove the library in question.