Expensify / react-native-share-menu

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

Error Undefined symbol: _OBJC_CLASS_$_RNPermissionHandlerSpeechRecognition #85

Open duylinhdang1998 opened 4 years ago

duylinhdang1998 commented 4 years ago

I got an error like this when I run-ios in Xcode. Please help me. I follow the setup link in your library Here is image image

jefawks3 commented 4 years ago

I just installed the package and got the same error. This is how I fixed it; I'm not sure if it's right but it works for now.

The issue for me was that the react-native-permissions package was not included in the share extension target in my Pod file. After adding it, and other packages, I was able to finally compile.

For reference, this is my share extension target definition.

target 'PhotoprivyShareExtension' do
  use_unimodules!

  config = use_native_modules!
  use_react_native!(:path => config["reactNativePath"])

  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

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

  # Permissions
  permissions_path = '../node_modules/react-native-permissions/ios'

  pod 'Permission-BluetoothPeripheral', :path => "#{permissions_path}/BluetoothPeripheral.podspec"
  pod 'Permission-Calendars', :path => "#{permissions_path}/Calendars.podspec"
  pod 'Permission-Camera', :path => "#{permissions_path}/Camera.podspec"
  pod 'Permission-Contacts', :path => "#{permissions_path}/Contacts.podspec"
  pod 'Permission-FaceID', :path => "#{permissions_path}/FaceID.podspec"
  pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways.podspec"
  pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse.podspec"
  pod 'Permission-MediaLibrary', :path => "#{permissions_path}/MediaLibrary.podspec"
  pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone.podspec"
  pod 'Permission-Motion', :path => "#{permissions_path}/Motion.podspec"
  pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications.podspec"
  pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary.podspec"
  pod 'Permission-Reminders', :path => "#{permissions_path}/Reminders.podspec"
  pod 'Permission-Siri', :path => "#{permissions_path}/Siri.podspec"
  pod 'Permission-SpeechRecognition', :path => "#{permissions_path}/SpeechRecognition.podspec"
  pod 'Permission-StoreKit', :path => "#{permissions_path}/StoreKit.podspec"
end