I use Nativescript, my app was rejected by Apple many times by the issue below.
Can someone please help me.
Your app uses or references the following non-public APIs:
com.apple.springboard.hasblankedscreen
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.
Apple have accepted my app after I removed one of libraries.
In my case, I used a SDK from my supplier of bluetooth door. It is old version so it call non-public API. Thank you all anyway.
Related
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.
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.
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."
To tell you a little about my app, I have a free version and a pro version without ads. The free version was accepted in the App Store, but the pro version was not. In the pro version, I just left out all the Advertising IDs. I am using Revmob, Chartboost and AppLovin. After submitting, I got this message from Apple:
"PLA 3.3.12"
We found your app uses the iOS Advertising Identifier but does not include ad functionality. This does not comply with the terms of the iOS Developer Program License Agreement, as required by the App Store Review Guidelines.
Specifically, section 3.3.12 of the iOS Developer Program License Agreement states:
"You and Your Applications (and any third party with whom you have contracted to serve advertising) may use the Advertising Identifier, and any information obtained through the use of the Advertising Identifier, only for the purpose of serving advertising. If a user resets the Advertising Identifier, then You agree not to combine, correlate, link or otherwise associate, either directly or indirectly, the prior Advertising Identifier and any derived information with the reset Advertising Identifier."
Please check your code - including any third-party libraries - to remove any instances of:
class: ASIdentifierManager
selector: advertisingIdentifier
framework: AdSupport.framework
If you are planning to incorporate ads in a future version, please remove the Advertising Identifier from your app until you have included ad functionality.
To help locate the Advertising Identifier, use the “nm” tool. For information on the “nm” tool, open a terminal window and enter, “man nm.”
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 lists the methods that the library calls, and "otool -ov" will list the Objective-C class structures and their defined methods. These techniques can help you narrow down where the problematic code resides."
I don't really know much about coding. I just know the basics with Xcode. Can anyone help me figure out what to do to find the problem code so I can remove it?
Thank you so much!
Statistics suggest that using in-app purchases to remove advertising has a better conversion rate than having separate free and pro versions. Instead of maintaining two versions of your app and removing chunks from the pro one, why not try this approach?
Remove revmob, Chartboost and AppLovin from your pro version. Unlink AdSupport.framework. Also, if you use Flurry or other analytics sdk, make sure you have the latest version. My app was rejected for the same reason because Flurry Analytics was using advertising identifier under the hood. Few days ago Flurry released an updated version of their sdk to address this issue. That can also happen for other analytics platforms, like google.
Its not always using the AdSupport.framework usage reject the app. I think its the way you are using.
One of my app was using advertising identifier, but for solely different purpose. I was not using any third party ads.
The important thing is that you are avoiding Apple iAds but using third party ads, thats why your app may be rejected.