My iOS App is rejected from Apple Store review with the following issue:
Your app uses or references the following non-public APIs:
LSApplicationWorkspace, defaultWorkspace
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.
But I can find any code about these APIs. Anyone know which part will contain these APIs ?
My blindfold shot in the dark (edit: not sure why it matters that it's dark if I'm blindfold): Make sure that if you have any testing related pods or libraries, that they are not included in the target you use for deployment. Calabash for example probably does make use of private APIs to get work done that'd not be possible otherwise, but it's not meant to be on the app you release.
We experienced the same error. Calabash is referencing LSApplicationWorkspace. After excluding references to Calabash for release builds, the app was not rejected from review any longer.
Related
Say I have created a framework and want to publish it to github. In what circumstances will this framework be rejected by Apple / won't be allowed to publish to github...? Also, when will my framework be accepted by Apple..? Or is there any step as such at all...?
I have referred this (https://www.raywenderlich.com/5109-creating-a-framework-for-ios) link and this (Steps in creating custom frameworks) also. Though the first one showed how to make a framework it didn't tell when a framework will be accepted or rejected. The second one also didn't help...
Apple doesn't approve or reject frameworks. You can publish anything you want on GitHub.
Apple reviews apps. People can use your framework in their apps if they like. If your framework does something wrong (say, uses private API) then those people may get their app rejected.
Frameworks are not published on App Store. So there is no point on its rejection.
Its Apps which can get rejected because of some framework. And people will stop using your framework, if apple rejects app because of something wrong in it.
we just got my rejection from Apple about some non-public API "contectId". The only thing I have done since I upgraded to the latest Xcode and Titanium SDK (Also with the newest macOS), this became a problem.
I know that there's steps here in the message, but is this an Titanium bug or something?
--
Hello,
Thank you for your resubmission.
Performance - 2.5.1
Your app still uses or references the following non-public APIs:
contextId
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.
Next Steps
Please revise your app to remove any non-public APIs. If you have defined methods in your source code with the same names as the above-mentioned APIs, we suggest altering your method names so that they no longer collide with Apple's private APIs to avoid your application being flagged in future submissions.
Additionally, 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
For information on the "nm" tool, please see the "nm tool" Xcode manual page.
If there are no alternatives for providing the functionality your app requires, you may wish to file an enhancement request.
If you have difficulty reproducing a reported issue, please try testing the workflow described in Technical Q&A QA1764: How to reproduce bugs reported against App Store submissions.
If you have code-level questions after utilizing the above resources, you may wish to consult with Apple Developer Technical Support. When the DTS engineer follows up with you, please be ready to provide:
- complete details of your rejection issue(s)
- screenshots
- steps to reproduce the issue(s)
- symbolicated crash logs - if your issue results in a crash log
Best regards,
App Store Review
Although it was not really a Titanium-issue than more an issue with Apple detecting false positives, this issue has just been fixed in Titanium 5.5.1.GA and later, thanks!
I've also had two App updates rejected due to this reason.
Over the same period I've had others approved.
One common item between the two App updates that were rejected is the use of the following property set in my project:
<property name="run-on-main-thread" type="bool">true</property>
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."
I got some trouble when I try to upload my app to AppStore.
Apple reject the app with these error message:
Non-public API usage:
The app references non-public selectors in MyAppiOS: cardNumber, cardType, libraryVersion, navigationBarStyle, navigationBarTintColor, preload, setCardNumber:, setNavigationBarTintColor:
Deep searching told me that the Card.IO is causing the problem, indeed it has all the above selectors.
The same code was uploading successfully. What can be the cause of such behavior?
The same code was uploading successfully. What can be the cause of such behavior?
Apple is continuously updating the checks they do on submitted applications. This means that re-submitting a new version, even with a trivial change, can sometimes end up rejected because of the new checks.
Your best bet is to ensure you're using the latest version of the library. An update might already be available for you - unless you're in the first people affected. In the later case you should file an issue with the developer or, since it's open source, re-compile a version of the library that excludes those symbols.
I'm trying to submit my app on the App Store but I'm getting this msg:
Your app contains non-public API usage. Please review the errors, correct them, and resubmit your application.
The app references non-public symbols in Payload/XXX.app/XXX: CFUserNotificationDisplayNotice
Where "XXX" -- application name.
Can anybody help me with this issue?
A private API is an API that is not intended to be used by outside developers. This is to prevent breaking changes when the SDK is updated.
The behavior of a private API is not guaranteed. The methods may be removed in the future updates of the platform.
You can use the private API's in you OSX and iOS apps if you don't intend to release through Apple App Store, but then, again you yourself need to make sure that your app is not broken by the comming SDK/OS updates.
Either you or some third party framework in your bundle is using private APIs
Remove the signature mentioned from the code and you should be fine.