1

Our app uses react-native-purchases@3.3.3. After including the library and uploading the build the app got rejected by Apple for non-public API usage. The message is:

Non-public API usage - The app references non-public selectors in app: configure, constants, isAnonymous, isPassthrough, removeValuesForKeys:completion:, resetWithCompletionBlock:.

isAnonymous is a method in react-native-purchases. Some of the other names are just normal public things in @react-native-community/async-storage

We cannot use react-native-purchases versions newer than 3.3.3 because it is incompatible with our react and react-native dependencies.

Here are our dependencies:

  "dependencies": {
    "@react-native-community/async-storage": "^1.5.0",
    "babel-plugin-transform-es2015-block-scoping": "6.15.0",
    "react": "^16.8.3",
    "react-native": "^0.59.10",
    "react-native-camera": "^2.11.2",
    "react-native-device-info": "^2.2.2",
    "react-native-google-analytics-bridge": "^7.1.0",
    "react-native-image-view": "^2.1.5",
    "react-native-keyboard-aware-scroll-view": "^0.8.0",
    "react-native-navigation": "^2.22.3",
    "react-native-purchases": "3.3.3",
    "react-native-qrcode-svg": "^6.0.3",
    "react-native-svg": "^11.0.1",
    "react-native-view-pdf": "^0.9.1",
    "react-native-webview": "^6.3.1"
  }

What should we do to resolve the issue?

Ivan Bulanov
  • 55
  • 1
  • 5
  • 1
    Those don't look like private api to me. Have you tried submitting a new build? Sometimes there are glitches on Apple's side. `isAnonymous` is still in 4.0.0 so even if you could upgrade that wouldn't resolve the problem (if it is the problem). Many people would use that library so I expect it would be reported to revenuecat if it was an issue. – Paulw11 Jan 27 '21 at 19:39
  • We submitted the build several times. Sometimes a rejection letter comes back. Other times there is no feedback at all and the build is not listed in TestFlight. – Ivan Bulanov Jan 28 '21 at 06:23
  • You can try appealing to Apple but similar issues with react that I can find online have seen Apple insist that the private api report is correct. Unfortunately issues like this is why many find react is more trouble than the benefit of being cross platform – Paulw11 Jan 28 '21 at 08:49
  • Thanks @Paulw11. I did contact their technical support and hope that they toggle some switch on their side or offer a proper solution. – Ivan Bulanov Jan 28 '21 at 10:39

1 Answers1

0

In the end it turned out to be a problem with XCode project. Due to the age of the project and many modifications the file got corrupted somehow. Re-creating XCode project made things work again.

Ivan Bulanov
  • 55
  • 1
  • 5