Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question]: Issue "ITMS-90338: Non-public API usage" in app delivery #1519

Closed
1 task done
richardReitz opened this issue May 29, 2023 · 3 comments
Closed
1 task done

Comments

@richardReitz
Copy link

richardReitz commented May 29, 2023

I have a problem with app delivery to App Store Connect.
I will leave below the message I received from the error in my mail after to try upload app in store.

ITMS-90338: Non-public API usage - The app references non-public selectors in PlugIns/OneSignalNotificationServiceExtension.appex/OneSignalNotificationServiceExtension: _isKeyDown, _modifiedInput, _modifierFlags,The app references non-public selectors in MyApp: _isKeyDown, _modifiedInput, _modifierFlags. 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/


My Podfile:

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '12.4'
prepare_react_native_project!


$RNMapboxMapsVersion = '~> 10.11.1'
$RNMapboxMapsImpl = 'mapbox'

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
#   dependencies: {
#     ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
# flipper_config = ENV['nNO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled

linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
  use_frameworks! :linkage => linkage.to_sym
end

abstract_target 'appNameCommonPods' do
  config = use_native_modules!

  # Flags change depending on the env values.
  flags = get_default_flags()

  use_frameworks! :linkage => :static

  use_react_native!(
    :path => config[:reactNativePath],
    # Hermes is now enabled by default. Disable by setting this flag to false.
    # Upcoming versions of React Native may rely on get_default_flags(), but
    # we make it explicit here to aid in the React Native upgrade process.
    :hermes_enabled => flags[:hermes_enabled],
    :fabric_enabled => flags[:fabric_enabled],
    # Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable the next line.
    # :flipper_configuration => flipper_config,
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )
  $RNFirebaseAsStaticFramework = true
  
  pod 'react-native-branch', path: '../node_modules/react-native-branch'
  pod 'RNSha256', :path => '../node_modules/react-native-sha256'
  pod 'RNFS', :path => '../node_modules/react-native-fs'
  pod 'MapboxMaps', '10.11.1'
  pod 'rn-fetch-blob', :path => '../node_modules/rn-fetch-blob'
  permissions_path = '../node_modules/react-native-permissions/ios'
  pod 'Permission-Calendars', :path => "#{permissions_path}/Calendars"
  pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
  pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways"
  pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse"
  pod 'Permission-LocationAccuracy', :path => "#{permissions_path}/LocationAccuracy"
  pod 'react-native-fbsdk-next', :path => '../node_modules/react-native-fbsdk-next'
  pod 'Permission-MediaLibrary', :path => "#{permissions_path}/MediaLibrary"
  pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications"
  pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary"
  pre_install do |installer|
    $RNMapboxMaps.pre_install(installer)

    Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}

    installer.pod_targets.each do |pod|
        if pod.name.eql?('RNPermissions') || pod.name.start_with?('Permission-')
          def pod.build_type;
            Pod::BuildType.static_library # I assume you use CocoaPods >= 1.9
        end
      end
    end
  end

  target 'appName' do
    #Production-specific pods
    target 'appNameTests' do
      inherit! :complete
      # Pods for testing
    end
  end
  target 'appNameDevelopment' do
    #Development-specific pods
  end
  
  post_install do |installer|
    $RNMapboxMaps.post_install(installer)
    react_native_post_install(
      installer,
      # Set `mac_catalyst_enabled` to `true` in order to apply patches
      # necessary for Mac Catalyst builds
      :mac_catalyst_enabled => false
    )
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'No'
      end
    end
  end

  target 'OneSignalNotificationServiceExtension' do
    pod 'OneSignalXCFramework', '>= 3.0', '< 4.0'
  end
  target 'OneSignalNotificationServiceExtensionDev' do
    pod 'OneSignalXCFramework', '>= 3.0', '< 4.0'
  end
end

Any idea what this error could be?

One Signal version: 4.5.1.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jennantilla
Copy link
Contributor

Hi @richardReitz thanks for reaching out! We're digging into this and will get back to you as soon as possible.

@nan-li
Copy link
Contributor

nan-li commented Jun 2, 2023

Hi @richardReitz,
We don't have added code in OneSignalNotificationServiceExtension that reference any of these: _isKeyDown, _modifiedInput, _modifierFlags.

It looks like this same issue shows up for both OneSignalNotificationServiceExtension and MyApp.

It looks like this may be related to react native. Please see this thread and referenced GitHub issue: https://developer.apple.com/forums/thread/708191

@jennantilla
Copy link
Contributor

Closing issue as this appears to be a react native issue. @richardReitz let us know if you have any additional questions or concerns!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants