Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-public API usage: The app references non-public selectors: _terminateWithStatus #138

Closed
pwbs opened this issue May 11, 2017 · 10 comments

Comments

@pwbs
Copy link

pwbs commented May 11, 2017

Apparently Apple doesn't like the use of _terminateWithStatus in https://github.com/google/google-toolbox-for-mac/blob/master/UnitTesting/GTMIPhoneUnitTestDelegate.m

The email I just received:

Dear developer,

We have discovered one or more issues with your recent delivery for "XXX". To process your delivery, the following issues must be corrected:

Non-public API usage:

The app references non-public selectors in XXX: _terminateWithStatus:
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 [email protected]. 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

Then I did sed -i 's/_terminateWithStatus/_terminateWithStatusX/g' platforms/ios/Pods/GoogleToolboxForMac/UnitTesting/GTMIPhoneUnitTestDelegate.m and now Apple's happy with it...

I'm not sure what to do about it, but adding that X is probably not the right move.

@sergiocampama
Copy link
Contributor

That file is meant to be used only for tests, it should not be compiled and linked into an app and sent to Apple.

@pwbs
Copy link
Author

pwbs commented May 11, 2017

That file is meant to be used only for tests, it should not be compiled and linked into an app and sent to Apple.

Makes sense. Then I have to figure out how to avoid having it compiled and linked...

I'm sure other people will run into this trouble though.

@thomasvl
Copy link
Member

It has come up before (#130), but we haven't heard how folks added the dependency on their main app instead of just for tests.

@pwbs
Copy link
Author

pwbs commented May 11, 2017

I met this issue when I switched from cordova iOS 4.3 to 4.4.0 earlier today, so I'm guessing that the dependency has to be automatically generated by cordova (or one of the cordova plugins I use).

@ishaq-bhojani
Copy link

@pwbs Facing the same issue.
Did you find any solution for this?

@pwbs
Copy link
Author

pwbs commented May 17, 2017

@ishaq-bhojani since it's not meant to be linked anyway, what you can do is to simply delete it...

I didn't investigate why cordova puts it there and makes it be embedded in the app, nor how to fix cordova for it to stop doing it...

@RTK
Copy link

RTK commented May 23, 2017

I add the GoogleToolboxForMac via pod and got rejected for this issue as well. I modified the method's name locally but this is not the solution I am going for. Is there any way to solve this problem without manual deletion of the file?

@thomasvl
Copy link
Member

Since it sounds like the problem is with something else using this pod (cordova?), has anyone reported the problem to them? As far as I know, there isn't really something we can do as they are the ones forcing the dependency in non testing code.

@pwbs
Copy link
Author

pwbs commented May 23, 2017

I just opened an issue at Cordova's: https://issues.apache.org/jira/browse/CB-12843

@pwbs
Copy link
Author

pwbs commented May 26, 2017

Apparently it's coming from phonegap-plugin-push and it's being addressed...
phonegap/phonegap-plugin-push#1736 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants