apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.16k stars 990 forks source link

Apple App Store rejection due to non-public selectors #1239

Closed srkleiman closed 2 years ago

srkleiman commented 2 years ago

Issue Type

Description

Information

Today when I tried to build and submit an app that had been submitting fine I get:

App Store Connect Operation Error The app references non-public selectors in Payload/Baron Performance.app/Baron Performance: applicationNameForUserAgent, initWithFrame:configuration:, isMainFrame, navigationDelegate, navigationType, setNavigationDelegate:, setProcessPool:, targetFrame, userContentController

I upgraded to the latest Cordova CLI, Platforms, Xcode, no joy. Same error submitting via Xcode and or xcrun.

Other people are having this problem as well: https://developer.apple.com/forums/thread/127678

I believe Apple changed something that is causing Cordova apps to be rejected.

Command or Code

Environment, Platform, Device

MacOS 12.3.1 Xcode 3.4.1

Version information

Cordova 11.0.0 android 10.1.2 ios 6.2.0 cordova-plugin-splashscreen 6.0.1 cordova-plugin-statusbar 3.0.0

Checklist

dpogue commented 2 years ago

It sounds like this is affecting Cordova, Capacitor, Flutter, and ReactNative, and probably others as well.

Cordova iOS does not use any private APIs by default, and none of the Apache plugins do either, specifically to avoid running into this problem. (3rd party plugins might use private APIs, but we have no control over that)

This sounds like the issue is 100% on Apple's side, but I'll leave this open until we have some sort of resolution.

shankari commented 2 years ago

I got a similar error for an app built on a platform that has been used for multiple apps before (https://github.com/e-mission/e-mission-phone/)

ITMS-90338: Non-public API usage - The app references non-public selectors in NREL OpenPATH: applicationNameForUserAgent, dataTypes, initWithFrame:configuration:, isMainFrame, navigationType, setProcessPool:, targetFrame, transform:, userContentController. 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. For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/

I went through and searched for each supposedly private API listed, and all of them bar transform are related to the cordova libraries. Although, are they really flagging transform as a private API?!!

shankari commented 2 years ago

I then checked the first three methods above against the apple documentation and they seem to be documented, public APIs in the webkit framework.

It looks like Apple's "non-public API usage" is not accounting for the public API for the WKWebView code, so it is breaking consistently for CordovaLib.

@dpogue are the cordova maintainers already in contact with Apple? Or should I file a tech support ticket?

dpogue commented 2 years ago

@dpogue are the cordova maintainers already in contact with Apple? Or should I file a tech support ticket?

We have no direct contact with Apple, but I imagine they are getting lots of reports since this seems to affect almost every iOS app.

shankari commented 2 years ago

FYI:

Developer Technical Support will be supporting WWDC and won't be reviewing requests from June 4 to 12, 2022.

And of course they rolled out this feature on June 6.

🙄 🤦

paulocoutinhox commented 2 years ago

Hi,

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

Thanks.

shankari commented 2 years ago

I can confirm that it worked on resubmission.

dpogue commented 2 years ago

Glad to hear. I'm going to mark this issue as closed :)