Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23924] iOS: Random app-rejection due to usage of non-public API

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2016-09-22T02:01:05.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.5.1
ComponentsiOS
Labelsfocus, private_api, rejection, symbols
ReporterIvan Skugor
AssigneeHans Knöchel
Created2016-09-19T11:16:15.000+0000
Updated2018-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.

Comments

  1. Ivan Skugor 2016-09-19

    I may have opened this issue in wrong project. Sorry :(
  2. Hans Knöchel 2016-09-19

    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.
  3. Ivan Skugor 2016-09-19

    Thanks!
  4. Hans Knöchel 2016-09-19

    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.
  5. Ivan Skugor 2016-09-20

    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?
  6. Hans Knöchel 2016-09-21

    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:
       [kfvProxy focus:nil];
       
    with
       [kfvProxy performSelector:NSSelectorFromString([NSString stringWithFormat:@"%@c%@:", @"fo", @"us"]) withObject:nil];
       
    (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)
  7. Hans Knöchel 2016-09-21

    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!*
  8. Ivan Skugor 2016-09-21

    Thanks. At the end I managed to submit app by letting Apple know it's not non-public method. :)
  9. Chee Kiat Ng 2016-09-22

    PRs merged.
  10. Eric Merriman 2018-08-06

    Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.

JSON Source