Build failed on the RN 0.71.3 [IOS]
react-native: 0.71.3 react-native-share-menu: 6.0.0
Can't build an ios app on the react-native 0.71.3
Build error:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_FKUserDefaultsPlugin", referenced from:
objc-class-ref in libReact-Core.a(RCTAppSetupUtils.o)
"_OBJC_CLASS_$_FlipperClient", referenced from:
objc-class-ref in libReact-Core.a(RCTAppSetupUtils.o)
"_OBJC_CLASS_$_FlipperKitLayoutPlugin", referenced from:
objc-class-ref in libReact-Core.a(RCTAppSetupUtils.o)
"_OBJC_CLASS_$_FlipperKitNetworkPlugin", referenced from:
objc-class-ref in libReact-Core.a(RCTAppSetupUtils.o)
"_OBJC_CLASS_$_FlipperKitReactPlugin", referenced from:
objc-class-ref in libReact-Core.a(RCTAppSetupUtils.o)
"_OBJC_CLASS_$_SKDescriptorMapper", referenced from:
objc-class-ref in libReact-Core.a(RCTAppSetupUtils.o)
"_OBJC_CLASS_$_SKIOSNetworkAdapter", referenced from:
objc-class-ref in libReact-Core.a(RCTAppSetupUtils.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Try adding flipper_configuration to the use_react_native in the share extension target of your pod file
target 'ShareExtension' do
use_react_native!(:flipper_configuration => flipper_config)
@scottnash doesn't work for me. Can you maybe share your complete Podfile? Maybe I am missing something. Thanks
@karuzo17 did you remember to rerun pod install after making the change?
I fixed this error by adding this to my target 'share_extension_name' do
config = use_native_modules!
# use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks']
# use_frameworks! :linkage => ENV['USE_FRAMEWORKS'].to_sym if ENV['USE_FRAMEWORKS']
# Flags change depending on the env values.
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
:hermes_enabled => podfile_properties['expo.jsEngine'] == nil || podfile_properties['expo.jsEngine'] == 'hermes',
:fabric_enabled => flags[:fabric_enabled],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/..",
# Note that if you have use_frameworks! enabled, Flipper will not work if enabled
# :flipper_configuration => flipper_config
:flipper_configuration => !ENV['CI'] ? FlipperConfiguration.enabled(["Debug"], { 'Flipper' => '0.184.0' }) : FlipperConfiguration.disabled,
)
For anyone who maybe meet this problem too.
react-native: 0.72.1 react-native-share-menu: 6.0.0
Can't build an ios app on the react-native 0.72.1
Build error:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_FKUserDefaultsPlugin", referenced from:
objc-class-ref in libReact-Core.a(RCTAppSetupUtils.o)
"_OBJC_CLASS_$_FlipperClient", referenced from:
objc-class-ref in libReact-Core.a(RCTAppSetupUtils.o)
"_OBJC_CLASS_$_FlipperKitLayoutPlugin", referenced from:
objc-class-ref in libReact-Core.a(RCTAppSetupUtils.o)
"_OBJC_CLASS_$_FlipperKitNetworkPlugin", referenced from:
objc-class-ref in libReact-Core.a(RCTAppSetupUtils.o)
"_OBJC_CLASS_$_FlipperKitReactPlugin", referenced from:
objc-class-ref in libReact-Core.a(RCTAppSetupUtils.o)
"_OBJC_CLASS_$_SKDescriptorMapper", referenced from:
objc-class-ref in libReact-Core.a(RCTAppSetupUtils.o)
"_OBJC_CLASS_$_SKIOSNetworkAdapter", referenced from:
objc-class-ref in libReact-Core.a(RCTAppSetupUtils.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have fixed this error by adding this to my target 'share_extension_name' do
target 'share_extension_name' do
use_react_native!(
:hermes_enabled => true,
:flipper_configuration => flipper_config,
)
pod 'RNShareMenu', :path => '../node_modules/react-native-share-menu'
# Manually link packages here to keep your extension bundle size minimal
end
Try adding flipper_configuration to the use_react_native in the share extension target of your pod file
target 'ShareExtension' do use_react_native!(:flipper_configuration => flipper_config)
That fixed it for me on RN 0.72.4
Try adding flipper_configuration to the use_react_native in the share extension target of your pod file
target 'ShareExtension' do use_react_native!(:flipper_configuration => flipper_config)
This seemed to help me as well
Try adding flipper_configuration to the use_react_native in the share extension target of your pod file
target 'ShareExtension' do use_react_native!(:flipper_configuration => flipper_config)
This worked for me as well 👍 Can we update the instructions? :D https://github.com/Expensify/react-native-share-menu/pull/310