Home > Mobile >  The app references non-public selectors callWithArguments:, estimatedProgress, evaluateScript:
The app references non-public selectors callWithArguments:, estimatedProgress, evaluateScript:

Time:06-08

I'm attempting to upload an app to App Store Connect, but I'm getting this error when I try:

The app references non-public selectors in Payload/MyApp.app/MyApp: callWithArguments:, estimatedProgress, evaluateScript:, getVersion, initWithFrame:configuration:, isMainFrame, navigationDelegate, setNavigationDelegate:, targetFrame, toDouble, toString, userContentController With error code STATE_ERROR.VALIDATION_ERROR.50 for id ad5e5650-abbe-4303-a5fe-defb4797451b

I've searched my code for callWithArguments, estimatedProgress, evaluateScript, etc. but none of those appear anywhere in my code or in my CocoaPods.

Questions about non-public selectors have cropped up from time to time and they've typically been due to third-party libraries using private iOS APIs.

How should developers diagnose issues like these in general? What API is causing this particular problem today?

CodePudding user response:

Faced the same issue with the same selectors. Upgrading Xcode to 13.4.1 fixed it.

CodePudding user response:

Message from Apple: "The issue has been resolved on the app validation backend. Please try resubmitting. Sorry for the trouble."

If you're seeing this issue in the future, here's how to address "non-public selectors" errors in general.

If you're very lucky, you may find that despite the scary error message in Xcode, Apple will accept your binary anyway, and it will appear in App Store Connect for you to submit it.

Barring that, you may be able to search your own source code to find references to these forbidden selectors. But, it's much more common to find that some third-party library (a CocoaPod or Swift package you're using) is responsible.

Typically the only way to diagnose the issue is to try removing third-party libraries from your code, one by one, until the error goes away. Then, once you've found the library responsible, file a bug against the library developer. Once the library fixes the issue, you'll have to upgrade to a newer version of the library that stops using private selectors.

  • Related