iOS Application rejected with reason non-public APIs

Hi,
I’ve application in Ionic, on submission on Store it got rejected saying I’m using some non-public APIs. Below is response received from them.

From Apple
2.5 - Apps that use non-public APIs will be rejected
2.5 Details

Your app still uses or references the non-public APIs, which is a violation of the App Store Review Guidelines. Specifically, your app includes a misuse of the UIWebBrowserView private class.

The use of non-public APIs is not permitted in 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

I feel some of plugin is using it. Kindly check following plugin list

cordova-plugin-camera 2.1.0 “Camera”
cordova-plugin-console 1.0.2 “Console”
cordova-plugin-datepicker 0.9.3 “DatePicker”
cordova-plugin-device 1.1.1 “Device”
cordova-plugin-dialogs 1.2.0 “Notification”
cordova-plugin-geolocation 2.1.0 “Geolocation”
cordova-plugin-inappbrowser 1.2.1 “InAppBrowser”
cordova-plugin-network-information 1.2.0 “Network Information”
cordova-plugin-splashscreen 3.2.0 “Splashscreen”
cordova-plugin-statusbar 2.1.1 “StatusBar”
cordova-plugin-whitelist 1.2.1 “Whitelist”
cordova-plugin-x-socialsharing 5.0.10 “SocialSharing”
cordova-plugin-x-toast 2.4.2 “Toast”
cordova.plugins.diagnostic 2.3.10 “Diagnostic”
ionic-plugin-keyboard 1.0.8 “Keyboard”
onesignal-cordova-plugin 1.11.2 “OneSignal Push Notifications”
org.pushandplay.cordova.apprate 1.1.7 “AppRate”

Also system info

ionic -v
1.7.14

ionic info

Your system information:

Cordova CLI: 6.0.0
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Version: 1.2.4
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
ios-deploy version: 1.8.4
ios-sim version: 5.0.4
OS: Mac OS X El Capitan
Node Version: v5.3.0
Xcode version: Xcode 7.2 Build version 7C68

I don’t understand which plugin/element is causing this issue. Can you guys help to understand or guide on nm tools

We are having the exact same issue. Apple rejected an app for using non-public API UIWebBrowserView. The plugin responsible appears to be ionic-plugin-keyboard within UIWebViewExtension.m file. This issue appears to have started today with Apple rejecting apps that use UIWebBrowserView. Waiting for reviewer to provide more information.

Hell Guys,

We are facing exact same issue and Apple rejected it yesterday only. I am looking into option of changing the plugin. Also will changing the class name and object name in xcode works?

Here is what I got reply from them

From Apple
2.5 - Apps that use non-public APIs will be rejected
Hello Vijay,

Thank you for your question. Specifically, we found that your app includes a category, “HackishAccessoryHiding”, for UIWebView that includes methods meant to programmatically access a displayed UIWebBrowserView object. If this is part of the Ionic framework, it would be appropriate to reach out to them if you cannot remove the at-issue code on your own.

Regards,
Vijay

This would probably be here:
https://github.com/driftyco/ionic-plugin-keyboard/blob/master/src/ios/UIWebViewExtension.m

Thanks! we have removed this plugin and submitted to Apple for review.

Hacker News thread on this forum post has some background information what exactly is (probably) happening: https://news.ycombinator.com/item?id=11310683

There is also a Github issue where additional reports of rejections were collected: https://github.com/driftyco/ionic-plugin-keyboard/issues/179

Sad! :unamused:

What behavior I need to expect removing Ionic Keyboard Plugin?

Do someone has some feedback about already approved apps? Should I fear about my app being pulled out?

one question, was your app already on the store and this was just an update or was this the first submission to the appstore ?

Oh no! Thanks for bringing this to our attention!
We’ll take care of this right away!

3 Likes

I don’t think there is any issue for already live apps but you need to keep this in mind when you update the version. My app went live without issues last week and when I updated new version yesterday it got rejected.

Hey everyone, I’ve just published version 2.0.0 of the plugin, which removes the hideKeyboardAccessoryBar method for the moment. I also published it as 1.0.9, so it’s within a valid semver range for people using config.xml to save their plugins. I think your app being rejected by the App Store takes precedence over semver semantics on this one.

We’ll add it back in once we can make sure that apps aren’t getting rejected. There’s no public API for removing the accessory bar as far as I know (I would love to be wrong!), so we’ll also be more clear that this is always a danger.

To update, do

cordova plugin rm ionic-plugin-keyboard
cordova plugin add ionic-plugin-keyboard

Thanks for your patience everyone, and sorry for the headache! :heart:

5 Likes

think you dropped a dash on the second command, in case others are trying to copy/paste:

cordova plugin rm ionic-plugin-keyboard
cordova plugin add ionic-plugin-keyboard
1 Like

Thanks, fixed it! :keyboard:

2 Likes

Question: Does the plugin update gracefully fail on the deprecated method, or do we need to go and clean up all of our references in the code base first?

My App got approved after I removed the keyboard plugin from my app!

1 Like

Great question - you don’t need to change anything. The JavaScript method is still there, but it now only prints a warning to the console and doesn’t make a call to native.

1 Like

Thank You, Ionic Team,

My First iOS Hybrid App got Approved from Apple and its been Released to Production.

Please continue the Goodwork.

1 Like

whats the recommended practice to programmatically make sure that the iOS version does not ship with a certain plugin while the android version definitely having it?

Is there a way to do this?

Use case:
Do not incude the useless backgroundMode plug in for iOS cause it is good only for android.

whats the recommended practice to programmatically make sure that the iOS version does not ship with it and therefore app-review team at apple won’t be able to use the excuse, sorry charlie but using this plugin is a cause for rejection.