iOS App Rejected : non-public APIs
Asked Answered
A

5

10

The same app has already been approved twice before but after some changes like set the image view and submitting the app again, Apple rejected my app for following errors:

Performance - 2.5.1

Your app uses or references the following non-public APIs:

setResult: nextStarIndex

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.

How can a user test his/her application if it contains Private API's?

I am not using setResult: and nextStarIndex code anywhere in my project so what should I do?

Autostrada answered 9/9, 2016 at 6:20 Comment(10)
Do you have any third party dependencies that might use a method named like this?Brobdingnagian
i am using facebook api and i don't know that fb is using this method name or not @BrobdingnagianAutostrada
That might be a problem, see github.com/googlevr/gvr-unity-sdk/issues/296Brobdingnagian
@Brobdingnagian i'm not using imageWithName anywhere in my project i have searched it instead of this method. + (UIImage*)imageWithImage:(UIImage*)image scaledToSize:(CGSize)newSize { UIGraphicsBeginImageContext( newSize ); [image drawInRect:CGRectMake(0,0,newSize.width,newSize.height)]; UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return newImage; }Autostrada
You should appeal the result with Apple. It seems that they are picking up incorrect private API usage.Lanna
@Lanna , How can a user test his/her application if it contains Private APIs.Autostrada
@Brobdingnagian How can a user test his/her application if it contains Private APIs.Autostrada
Do you mean how can you know if it uses private APIs? Normally a programmer will know when they have used private APIs because you need to do so deliberately. Apple will also check your app when you submit. It seems at the moment Apple is getting false positivesLanna
@Lanna yeah i know the APIs that i'm using but where is the error ? what things are missing or collide ? how can i resolve this problem ? please recommend somethingAutostrada
Just got rejected this morning. We had a minor bug release and didn't add these methods Apple is complaining about now. Performance - 2.5.1 Your app uses or references the following non-public APIs: submit: switchView:Afterlife
P
10

The last time I encountered this was because of a namespace collision between methods in my code and private methods in the Cocoa API. You can also use grep to find out exactly where you're using those selectors:

grep -R 'setResult:' *
Perr answered 12/9, 2016 at 14:17 Comment(0)
L
4

I had the same situation with you. Now, the app is ready for sale. I hope I will help you to solve that problem.

"Your app uses or references the following non-public APIs: cancelAction:, defaultInstance "

My solved Steps:

(1) grep -R 'defaultInstance' *

enter image description here the CrashReporterSDK matches so i remove it .

(2) grep -R 'cancelAction:' * it matches some project function names. I also resolve them.

(3) I suggest that before using "grep -R", you should remove the project's "build document files", so "grep -R" will give us more useful information.

finished

Leavis answered 25/9, 2016 at 2:42 Comment(0)
H
1

Run otool on the excutable.

Go to the build directory:

AppName/build/AppName.build/Release-iphoneos/AppName.build/Objects-normal/armv6/

and run

strings AppName | grep ‘setResult' to know which framework used that particular method.

Hiss answered 12/9, 2016 at 5:41 Comment(0)
T
1

If you don't find the reference by searching your project, the issue is most likeley in a compiled third party library. You can use "nm " to list symbols in compiled libraries.

One of my apps was rejected by the exact same cause. I updated my project with the latest Facebook SDK (at this time 4.15.1), and the app passed the review.

Transmundane answered 14/9, 2016 at 8:13 Comment(1)
I am also facing the same issue, got the below message from apple. Your app uses or references the following non-public APIs: 'ABLE.framework, _file' No where I am using this, kindly let me know how to findout in other libraries. My new version has got rejected because of this, but since my old version neither I added any new frameworks nor I updated the existing ones.Collogue
C
1

If you need check in your application only go to your project directory path in terminal and try below command.

    grep -R 'setResult:' .
Coonhound answered 28/2, 2018 at 14:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.