简体   繁体   中英

Would apple allow this this non-public method?

I am using some non-public method to better control the slide effects of my application, for example:

[self dismissModalViewControllerWithTransition:2];

After trying to upload my App with the Application Loader I got the message that I can not use such non-public methods. I found in stackoverflow a nice workaround here: How does Apple know you are using private API?

So, I've adapted my code:

int tvalue = 2;
objc_msgSend(self, sel_getUid("dismissModalViewControllerWithTransition:"), tvalue);

After changing the code, the Application Loader did accept my binary. So here my question: can I get any problems when the App gets revised by apple?

Thanks in advance.

You cannot. Your app was not rejected because Apple could not track properly your code. Skip using non-public methods.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM