[TIMOB-23929] Rename contextId to stop confusing Apple's private API scan
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-09-27T12:25:53.000+0000 |
Affected Version/s | Release 5.5.0 |
Fix Version/s | Release 6.0.0, Release 6.1.0, Release 5.5.1 |
Components | iOS |
Labels | n/a |
Reporter | Ingo Muschenetz |
Assignee | Christopher Williams |
Created | 2016-09-19T20:10:00.000+0000 |
Updated | 2016-11-17T18:52:44.000+0000 |
Description
Evidently, several people have received the following rejection letter from Apple:
The message from Apple was as follows:
_Performance - 2.5.1_
_Your app 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._
http://stackoverflow.com/questions/39573151/app-rejection-issue-2-5-1-apps-that-use-non-public-apis-will-be-rejected-since/39576096#39576096
I believe the required changes are minimal:
https://github.com/search?utf8=%E2%9C%93&q=ContextId+repo%3Aappcelerator%2Ftitanium_mobile&type=Code&ref=searchresults
It is not clear why run-on-main-thread would matter. Perhaps a different branch of code is executing?
5_5_X: https://github.com/appcelerator/titanium_mobile/pull/8402 6_0_X: https://github.com/appcelerator/titanium_mobile/pull/8400 master: https://github.com/appcelerator/titanium_mobile/pull/8401
The code that referenced the
contextId
field was all guarded by#ifdef
's that would only be true if run-on-main-thread was false. So that flag would directly impact this bug if the field's name is indeed the source of the issue.The PR is correct. Although I feel that TIMOB-23924 might not be the only other API that causes problems - referring to the Flowdock discussion.
We should/could merge it, have an affected person resubmit, and see if it goes away.
My app was rejected because of this. I rebuilt it with the nightly 5.5.1.v20160923122321 and resubmitted. It was rejected again, for the same use (contextId), so I don't think this is fixed.
[~cdr] Two notes:
We had an affected person complain to Apple and they reversed their rejection based on the faulty scan. You might try that.
What is the text of the rejection letter you got?
It looks like the build you submitted has not been built with the mentioned 5.5.1 build (verify with your tiapp.xml), because the property is called
krollContextId
now, notcontextId
any more.The rejection text is: bq. Performance - 2.5.1 bq. Your app uses or references the following non-public APIs: bq. contextId bq. 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. I complained to Apple initially, but they said that I would need to rebuild the app without this variable in it. Hans, is it possible to get the SDK version used to build an app from the ipa or xcarchive? Im 95% certain it was built with v20160923122321 as that is what I had in the tiapp.xml at the time I've resubmitted the app with run-on-main-thread set to false, waiting to see if that is accepted.
To be sure, I've just rebuilt the app again with the SDK nightly, but the string persists:
PR (titanium_debugger/master): https://github.com/appcelerator/titanium_debugger/pull/51
Can I access that fix somehow?
timob PRs: 5_5_X:https://github.com/appcelerator/titanium_mobile/pull/8434 6_0_X:https://github.com/appcelerator/titanium_mobile/pull/8435 master:https://github.com/appcelerator/titanium_mobile/pull/8436
[~emerriman] All PR's merged. The functional test includes testing the kroll-based debugger (run-on-main-thread disabled) by any debugging-operation, e.g. simple app-breakpoint. [~cdr] Grab the newest 5.5.1 build (which will possible be the GA-build) and submit with that one. The build should be there in ~ 25m from this comment.
Thanks. I've rebuilt with 5.5.1.GA and can't find contextId in the binary anymore. I've submitted the app to Apple.
Verified fixed, using: MacOS 10.12 (16A323) Studio 4.8.0.201611121409 Ti SDK 5.5.1.GA, 6.0.0.GA Appc NPM 4.2.9-1 Appc CLI 6.1.0-13 Alloy 1.9.4 Xcode 8.1 (8B62) contextId no longer appears in the binary or packaged apps. Tested by creating multiple apps with run-on-main-thread off and on, then submitting them to the store. All submissions passed.