I would like to upload a React Native app to the app store. It works on simulator and real device, but when I create an archive and try to upload it, I got the following E-mail:
Dear Developer, We identified one or more issues with a recent delivery for your app, "APP NAME" 3.2.6 (18). Please correct the following issues, then upload again. ITMS-90338: Non-public API usage
- The app references non-public symbols in APP NAME: _SSL_CTX_set_options, _SSL_session_reused. 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
This is an old legacy project ported from React native 0.55 with the following dependencies:
"@react-native-community/async-storage": "1.9.0", "@react-native-community/cli-debugger-ui": "3.0.0", "@react-native-community/masked-view": "0.1.10", "@react-native-community/push-notification-ios": "1.10.1", "@react-navigation/bottom-tabs": "5.4.2", "@react-navigation/native": "5.3.0", "@react-navigation/stack": "5.3.3", "@voximplant/react-native-foreground-service": "3.0.2", "create-react-class": "^15.7.0", "crypto-js": "^3.1.9-1", "moment": "2.17.1", "patch-package": "6.2.2", "react": "17.0.2", "react-native": "0.68.5", "react-native-ble-manager": "8.4.3", "react-native-code-push": "6.2.0", "react-native-config": "^1.2.1", "react-native-device-info": "5.5.5", "react-native-exception-handler": "2.10.8", "react-native-gesture-handler": "1.10.3", "react-native-htmlview": "0.15.0", "react-native-linear-gradient": "2.5.6", "react-native-localize": "1.4.0", "react-native-push-notification": "8.1.1", "react-native-reanimated": "1.8.0", "react-native-restart": "0.0.15", "react-native-rss-parser": "1.4.0", "react-native-safe-area-context": "^1.0.0", "react-native-screens": "2.7.0", "react-native-splash-screen": "3.2.0", "react-native-svg": "12.1.0", "react-native-swiper": "1.6.0", "react-native-vector-icons": "6.6.0", "realm": "10.24.0"
My Podfile is:
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '11.0'
target 'targetname' do
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => false
)
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
use_flipper!()
post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
I tried to clean the XCode and the Archive uses Release config.
How could I find the package causing this error?
CodePudding user response:
I found a solution. In short: My quickfix was to remove the use_flipper! from my podfile.
I describe the whole method, maybe I can help to somebody else with similar issues.
- I searched every files for "SSL_CTX_set_options". It was defined in OpenSSL-Universal under ios/Pods. It means that my Podfile installed OpenSSL-Universal.
- Checked my Podfile, it contains two require_relative statements, I checked their targets.ó for anything related to SSL.
- node_modules/react-native/scripts/react_native_pods contains the definition of use_flipper! function (this was called from my podfile) and it installs OpenSSL-Universal. This is what caused this mess.
flipper is used for debugging, so it would be a better idea to call the use_flipper! function in debug mode.
After this, I still got a warning during uploading my archive:
The app references non-public selectors in Payload/AppName.app/AppName: getAuthorizationStatus:, isPassthrough, onSuccess:, removeValuesForKeys:completion:
The uploaded archive can be tested with Testflight (I assume that it can be uploaded to AppStore, too). I didn't try to fix this issue, but you can find further information in this link: The app references non-public selectors ins Payload/App.app/App...