question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

Description

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

React Native version:

System:
    OS: macOS 10.15.7
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
    Memory: 194.50 MB / 8.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.16.0 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.14.11 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK:
      API Levels: 24, 25, 26, 27, 28, 29, 30
      Build Tools: 29.0.3, 30.0.3
      System Images: android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.6953283
    Xcode: 12.4/12D4e - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_275 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1 
    react-native: 0.64.0 => 0.64.0 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

  1. Follow the setup instructions for a new templatized app here for macOS -> iOS.
  2. Execute the following commands in the root of the project, replacing <APP> with the name of the test app:
xcodebuild clean -workspace <APP>.xcworkspace -scheme <APP>
xcodebuild archive -workspace <APP>.xcworkspace -scheme <APP> -archivePath archives/<APP>.xcarchive -configuration Release > /dev/null
xcodebuild -exportArchive -archivePath archives/<APP>.xcarchive -exportPath exports -exportOptionsPlist <APP>/ExportOptions.plist > /dev/null
  1. Upload the resulting .ipa file to App Store Connect via Transporter (available on the Apple App Store)
  2. Receive an email from apple that the build was rejected.

Expected Results

The build should show in the App Store Connect portal under its build version.

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

Here is the content of the rejection email I received: image

Although it lists many selectors, I’ve only found the following in React/React Native:

_isKeyDown, _modifiedInput, _modifierFlags, handleNotification:, onSuccess:, setCategoryID:

These selectors are disabling the ability to upload to the app store.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
itsmistadcommented, Jun 12, 2021

Make sure that you are archiving as Release and not Debug, that was the issue I was facing. The DEBUG flag was defined, causing the listed selectors to appear in the app.

0reactions
haitaoxcommented, Nov 10, 2021

@itsmistad we have both debug and release builds on TestFlight. debug builds are for QA/manager/marketing people. debug build has dev tools for testing/debugging. release build will be the last build to test before final release. I saw on another thread that people are already appealing to apple because this is not Apple’s private API, they just happened to share the same name.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apple rejects React Native build with "ITMS-90338 ... - GitHub
Description Submitting a React Native app build to the Apple App Store results in a rejection email regarding "Non-public API usage".
Read more >
ITMS-90338: Non-public API usage a… - Apple Developer
We tried to re-publish the application we currently have on your store (production) with different build number => App rejected with the same...
Read more >
Apple Rejects IOS App - ITMS-90338: Non-public API usage
I just submitted an update of my App to Apple and Apple Rejected the App. with the following message: ITMS-90338: Non-public API usage...
Read more >
Expo SDK 45 App store error - ITMS-90338: Non-public API ...
For those who struggling with this, this was a backend issue. I just got a message from apple: "The issue has been resolved...
Read more >
Tell HN: Apple rejecting cross platform apps ... - Hacker News
ITMS-90338 : Non-public API usage - The app references non-public selectors in App: authorizationCode, createRequest, estimatedProgress, identityToken, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found