Expensify / react-native-share-menu

A module for React Native that adds your app to the share menu of the device
MIT License
652 stars 237 forks source link

'openURL:options:completionHandler:' is unavailable: not available on iOS #272

Closed stoicaandrei closed 1 year ago

stoicaandrei commented 1 year ago

I am trying to run my build and I get this error 'openURL:options:completionHandler:' is unavailable: not available on iOS

Did anyone manage to make it work on ios 13 build?

I would appreciate any help guiding me in the right direction. Here is my Podfile

require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
require File.join(File.dirname(`node --print "require.resolve('react-native/package.json')"`), "scripts/react_native_pods")

platform :ios, '13.0'
install! 'cocoapods',
  :deterministic_uuids => false

prepare_react_native_project!
use_frameworks!

target 'mesh' do
  config = use_native_modules!

  use_expo_modules!
  $RNFirebaseAsStaticFramework = true
  $RNFirebaseAnalyticsWithoutAdIdSupport = true
  use_react_native!(:path => config[:reactNativePath])

  post_install do |installer|
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => false
    )
    __apply_Xcode_12_5_M1_post_install_workaround(installer)

    # This is necessary for Xcode 14, because it signs resource bundles by default
    # when building for devices.
    installer.target_installation_results.pod_target_installation_results
      .each do |pod_name, target_installation_result|
      target_installation_result.resource_bundle_targets.each do |resource_bundle_target|
        resource_bundle_target.build_configurations.each do |config|
          config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
          config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'
        end
      end
    end
  end

  post_integrate do |installer|
    begin
      expo_patch_react_imports!(installer)
    rescue => e
      Pod::UI.warn e
    end
  end
end

target 'ShareExtension' do
  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
  pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'

  pod 'RNShareMenu', :path => '../node_modules/react-native-share-menu'
end