react-native: Apple rejects React Native build with "ITMS-90338: Non-public API usage"

Description

Submitting a React Native app build to the Apple App Store results in a rejection email regarding “Non-public API usage”.

Dear Developer,

We identified one or more issues with a recent delivery for your app, "AppName" 1.0.0 (1.2.0). Please correct the following issues, then upload again.

ITMS-90338: Non-public API usage - The app references non-public selectors in AppName: centerY, hide:, isPassthrough, onSuccess:, permissionType, removeValuesForKeys:completion:, setLabelText:, show:, valueOffset, viewManager. 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/

Best regards,

The App Store Team

Version

0.68.1

Output of npx react-native info

System: OS: macOS 11.6.4 CPU: (8) arm64 Apple M1 Memory: 148.92 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.0.0 - ~/.nvm/versions/node/v16.0.0/bin/node Yarn: 1.22.17 - ~/.nvm/versions/node/v16.0.0/bin/yarn npm: 7.10.0 - ~/.nvm/versions/node/v16.0.0/bin/npm Watchman: 2022.02.28.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3 Android SDK: Not Found IDEs: Android Studio: Not Found Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild Languages: Java: Not Found npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.68.1 => 0.68.1 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

1:Archive App(Release scheme) 2:Upload the resulting .ipa file to App Store Connect via Transporter (available on the Apple App Store) 3:Receive an email from apple that the build was rejected.

Snack, code example, screenshot, or link to a repository

image

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 4
  • Comments: 50 (5 by maintainers)

Most upvoted comments

“The issue has been resolved on the app validation backend. Please try resubmitting. Sorry for the trouble.” by Developer Tools Engineer https://developer.apple.com/forums/thread/127678?page=6

As many others, the same thing is happening to us. No packages updated, just some minor javascript changes. Not using expo. We resolved the issue in debug mode by changing a few variable names but in release mode we are getting a notification about different ones and there are way more, doesn’t seem feasible to manually change them all. Glad to find this thread, at least we’re not alone! Seems like an Apple issue, there is a thread over there of a bunch of people with the same problem: https://developer.apple.com/forums/thread/127678. I submitted a report to them. Here’s hoping it gets fixed soon!

Hi,

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

Thanks.

Same issue here. We just got this error from Apple after building and submitting a new app. The weird thing is, we just submitted an app 2 days ago, and the only change is a couple of JS lines.

Still an issue. Even with blank new ejected Expo app. I’ve logged a report here https://github.com/facebook/react-native/issues/34716

I solved it once, but the problem occurred again. Is it just my problem?

Update the macOS to Mojave and Xcode to latest version.

This may be due to apple updating their policy. Saw a comment that suggested needing to log in to your apple developer account (separate from app store connect) and agree to the updated policy. Apparently submissions will work after this? I’m testing this now.

Today we received this message:

Dear Developer,

We identified one or more issues with a recent submission for TestFlight review for your app, “Move App Staging” 2.8.0 (44). Please correct the > following issues, then upload again.

ITMS-90338: Non-public API usage - The app references non-public selectors in ventasStaging: estimatedProgress, initWithFrame:configuration:, > isMainFrame, isPassthrough, navigationType, onSuccess:, relativeSize, removeValuesForKeys:completion:, setIsEnabled:, setNavigationDelegate:, > setProcessPool:, spanArray, spanArray_Count, underline, updateSettings:, userContentController, viewManager, websiteDataStore. 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/

Best regards,

The App Store Team

The weirdest thing is that nothing has been installed or updated in the app, only JS code has been modified since the last build.

React Native versions:

    "react": "17.0.2",
    "react-native": "0.66.2",

Expo versions:

    "expo": "43.0.4",
    "expo-camera": "12.0.3",
    "expo-document-picker": "10.1.0",
    "expo-file-system": "13.0.3",
    "expo-image-manipulator": "10.1.2",
    "expo-keep-awake": "10.0.1",
    "expo-screen-orientation": "4.0.3",
    "expo-sharing": "10.0.3",

yarn why expo-modules-autolinking

=> Found "expo-modules-autolinking@0.3.4"
info Reasons this module exists
   - "expo" depends on it
   - Hoisted from "expo#expo-modules-autolinking"
info Disk size without dependencies: "836KB"
info Disk size with unique dependencies: "1.58MB"
info Disk size with transitive dependencies: "2.99MB"
info Number of shared dependencies: 30

“The issue has been resolved on the app validation backend. Please try resubmitting. Sorry for the trouble.” by Developer Tools Engineer https://developer.apple.com/forums/thread/127678?page=6

Thanks for the callout, @BennSandoval.

Tried uploading again and found success.

Same here, builds are not rolling out…

Experiencing the same with React Native and everything was working as of yesterday for us.

Same on Flutter

@Tak-As could you use patch-package or modify node_modules/react-native locally for #33153 change and try to submit to app store again? because your private apis centerY, hide:, isPassthrough, onSuccess:, permissionType, removeValuesForKeys:completion:, setLabelText:, show:, valueOffset, viewManager do not have the private key events where the pr addressed. i am wondering #33153 may not able to fix your problem. at the same time, i also feel curious where the private apis coming from.

Hi there! Are you using expo-dev-client? Also, can you make sure you are using the latest version of the expo package - the latest as of writing is 45.0.4.