How to resolve app validation "The app references non-public selectors in Payload/MyApp.app/MyApp: _setAlwaysRunsAtForegroundPriority:"?

11,281

Solution 1

Expanding on @Véger Lóránd answer:

The bug was re-introduced in the 4.1.1 version. Installing the latest version will get your app rejected. The solution for now is:

cordova plugin rm cordova-plugin-ionic-webview
cordova plugin add [email protected]

Solution 2

I got a similar problem:

ITMS-90338: Non-public API usage - The app references non-public selectors in MyAppName: _setAlwaysRunsAtForegroundPriority:.

And the issue was caused by the following plugin: cordova-plugin-ionic-webview

To solve the issue update to the latest version with the following commands:

cordova plugin rm cordova-plugin-ionic-webview
cordova plugin add cordova-plugin-ionic-webview@latest

You can read more about it here: https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/209

Solution 3

This worked

The problem is related to webview.

cordova plugin rm cordova-plugin-ionic-webview
cordova plugin add cordova-plugin-ionic-webview@latest

Solution 4

this is only security warning caused by webview. you can ignore

Solution 5

rejected on Appstore now. July 3th 2019. Message:

We identified one or more issues with a recent delivery for your app, "appname. Please correct the following issues, then upload again. ITMS-90338: Non-public API usage - The app references non-public selectors in Sonnenbraeu: _setAlwaysRunsAtForegroundPriority:. 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 ...

I removed the complete line of _setAlwaysRunsAtForegroundPriority: as described above from code. Also the references to it. And yes, the app got released. BUT I don't know exactly the consequence of removing the property which sets the browser to foreground priority mode. I don't think its a good solution, its just a provisoric workaround to get released.

Share:
11,281

Related videos on Youtube

Adam Cox
Author by

Adam Cox

Hello. I'm a software developer currently open for contract hire in the Greater Toronto Area (Canada). See my resume for work history details.

Updated on June 04, 2022

Comments

  • Adam Cox
    Adam Cox almost 2 years

    Just days ago I successfully upload Ionic app to Apple Store, and on this day I am receiving validation warning:

    The app references non-public selectors in Payload/something.app/something: _setAlwaysRunsAtForegroundPriority:

    While I was unable to resolve, I was able to upload app to App Store.

    Does anyone know where it is documented or have any insights on how to resolve?

    Thanks.

    • Khurshid Ansari
      Khurshid Ansari about 5 years
      Have you got solution? I am also facing same problem.
    • Khurshid Ansari
      Khurshid Ansari about 5 years
      can you reply. I am not able to upload in app store.
    • Adam Cox
      Adam Cox about 5 years
      Question updated. No resolve, but was able to upload at the time of getting this "warning". Still looking for answer on long-term resolution...
    • Khurshid Ansari
      Khurshid Ansari about 5 years
      Yes, I also uploaded.
  • Nasenbaer
    Nasenbaer almost 5 years
    rejectod on Appstore now. We identified one or more issues with a recent delivery for your app, "appname. Please correct the following issues, then upload again. ITMS-90338: Non-public API usage - The app references non-public selectors in Sonnenbraeu: _setAlwaysRunsAtForegroundPriority:. 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 ...
  • Véger Lóránd
    Véger Lóránd almost 5 years
    @Nasenbaer I'm also get rejected from app store because of this, any solution?
  • Joaquín L. Robles
    Joaquín L. Robles almost 5 years
    I'll leave the reference to the issue in GitHub here: github.com/ionic-team/cordova-plugin-ionic-webview/issues/20‌​9