[TIMOB-23924] iOS: Random app-rejection due to usage of non-public API
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-09-22T02:01:05.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.5.1 |
Components | iOS |
Labels | focus, private_api, rejection, symbols |
Reporter | Ivan Skugor |
Assignee | Hans Knöchel |
Created | 2016-09-19T11:16:15.000+0000 |
Updated | 2018-08-06T17:49:13.000+0000 |
Description
Hi. Recently my app got rejected from Apple. This was all right few weeks ago. I used 5.1.1.GA and I didn't change anything significant. I also tried to resubmit app with 5.5.0.GA but that didn't go through also.
Also, noticed this is not isolated issue as one more developer experienced the same issue.
Here is response from Apple:
Performance - 2.5.1
Your app uses or references the following non-public APIs:
focus:
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.
And more info about error in Ti SDK:
Thank you for your reply. Our team has re-reviewed this app to ensure our findings were accurate, we found this app contains references to the following selectors:
"focus:" was found in the method -[TiRootViewController manuallyRotateToOrientation:duration:]
Please take a look at this asap. Thanks.
I may have opened this issue in wrong project. Sorry :(
Apple seems to go crazy now..The method is one of our own methods. I have an open discussion with them and will ping this ticket as soon as I receive a list of possible API's they have problems with.
Thanks!
For now, please write Apple that it is no private API, but only a method that is called "focus". They can check [this line](https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiRootViewController.m#L1490) to validate.
Thanks. The other developer that run into this issue said he managed to submit app after commenting out that line in generated XCode project. Are you aware of any possible issues if that's done?
Well, it's the public
focus()
method that you are removing there. So when you are < iOS 8 and rotate the screen and a field is currently focussed, it won't refocus after the orientation change. So either Apple removed the selector from the (random) blacklist or we need to do method swizzling, which I really want to prevent. It would replace this:with
(cc [~cng]: I will make all PR's from master to 5.5.x. You can decide if you take all or only master and 6_0_X)
PR (master): https://github.com/appcelerator/titanium_mobile/pull/8408 PR (6_0_X): https://github.com/appcelerator/titanium_mobile/pull/8409 PR (5_5_X): https://github.com/appcelerator/titanium_mobile/pull/8410 Steps to test: 1. Create a new Titanium app 2. Submit the app to the App Store Expected behavior: *No rejection!*
Thanks. At the end I managed to submit app by letting Apple know it's not non-public method. :)
PRs merged.
Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.