React Native upgrade 0.73 Undefined symbols: _OBJC_CLASS_$_RCTEventDispatcher,

During the process of updating RN to 0.73. I am running into this issue on the app center ios pipeline.

ld: Undefined symbols:
  _OBJC_CLASS_$_RCTEventDispatcher, referenced from:
      __OBJC_$_CATEGORY_RCTEventDispatcher_$_Reanimated in libRNReanimated.a[15](RCTEventDispatcher+Reanimated.o)
       in libreact-native-video.a[14](RCTVideoManager-4f7ca5ff0fe771e512e596f87e56773d.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The following build commands failed:
    Ld /Users/runner/Library/Developer/Xcode/DerivedData/fluzclient-giqtbliqeqmefvddlqenjaszepez/Build/Intermediates.noindex/ArchiveIntermediates/fluzclient/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/ImageNotification.appex/ImageNotification normal (in target 'ImageNotification' from project 'fluzclient')
(1 failure)
##[error]Error: /usr/bin/xcodebuild failed with return code: 65

My podfile

# Resolve react_native_pods.rb with node to allow for hoisting
use_modular_headers!

def node_require(script)
  # Resolve script with node to allow for hoisting
  require Pod::Executable.execute_command('node', ['-p',
    "require.resolve(
      '#{script}',
      {paths: [process.argv[1]]},
    )", __dir__]).strip
end

node_require('react-native/scripts/react_native_pods.rb')
node_require('react-native-permissions/scripts/setup.rb')

ENV['SWIFT_VERSION'] = '5.7'

def fluz_pods
  pod 'react-native-orientation-locker', :path => '../node_modules/react-native-orientation-locker'
  pod 'react-native-branch', path: '../node_modules/react-native-branch'
  pod 'FullStory', :http => 'https://ios-releases.fullstory.com/fullstory-1.43.1-xcframework.tar.gz'
  pod 'CocoaLumberjack/Swift'
end

platform :ios, '14.0'
prepare_react_native_project!
setup_permissions([
  'AppTrackingTransparency',
  'Bluetooth',
  'Calendars',
  'CalendarsWriteOnly',
  'Camera',
  'Contacts',
  'FaceID',
  'LocationAccuracy',
  'LocationAlways',
  'LocationWhenInUse',
  'MediaLibrary',
  'Microphone',
  'Motion',
  'Notifications',
  'PhotoLibrary',
  'PhotoLibraryAddOnly',
  'Reminders',
  'SpeechRecognition',
  'StoreKit',
])

# 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['NO_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

def guard_pods_deployment_target(installer)
  # implements __apply_Xcode_12_5_M1_post_install_workaround with ios 12.0
  installer.pods_project.targets.each do |target|
    if target.name != "Braintree"
      # we skip Braintree packages for target upgrade
      # "error: 'unarchiveObjectWithData:' is deprecated: first deprecated in iOS 12.0"
      target.build_configurations.each do |config|
        #  "error: thread-local storage is not supported for the current target"
        # The most reliable known workaround is to bump iOS deployment target.
        # ensure IPHONEOS_DEPLOYMENT_TARGET is at least 14
        should_upgrade = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].split('.')[0].to_i < 14
        if should_upgrade
          config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14'
        end
      end
    end
    if target.name == "Braintree"
      # apply only to Braintree to prevent
      # "error: 'unarchiveObjectWithData:' is deprecated: first deprecated in iOS 12.0"
      target.build_configurations.each do |config|
        #  "error: thread-local storage is not supported for the current target"
        # The most reliable known workaround is to bump iOS deployment target.
        # ensure IPHONEOS_DEPLOYMENT_TARGET is at least 14.0
        should_upgrade = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].split('.')[0].to_i < 14.0
        if should_upgrade
          config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'
        end
      end
    end
    if target.name == 'Flipper'
      file_path = 'Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h'
      contents = File.read(file_path)
      unless contents.include?('#include <functional>')
        File.open(file_path, 'w') do |file|
          file.puts('#include <functional>')
          file.puts(contents)
        end
      end
    end
  end

  # But... doing so caused another issue in Flipper:
  #   "Time.h:52:17: error: typedef redefinition with different types"
  # We need to make a patch to RCT-Folly. @0.66.3
  # See https://github.com/facebook/flipper/issues/834 for more details.
  `sed -i -e  $'s/ && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_14_0)//' Pods/RCT-Folly/folly/portability/Time.h`
end

target 'fluzclient' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # 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}/.."
  )

  # Pods for fluzclient
  fluz_pods

  target 'fluzclientTests' do
    inherit! :complete
    # Pods for testing
  end
end



target 'fluzclient-staging' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # 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}/.."
  )

  # Pods for fluzclient
  fluz_pods
end

config = use_native_modules!

pre_install do |installer|
  installer.pod_targets.each do |pod|
    if pod.name.eql?('RNReanimated')
      def pod.build_type
        Pod::BuildType.static_library
      end
    end
  end
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == "React-Core.common-CoreModulesHeaders-RCTI18nStrings"
      target.remove_from_project
    end
    target.build_configurations.each do |config|
      config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'
    end
  end
  # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
  react_native_post_install(
    installer,
    config[:reactNativePath],
    :mac_catalyst_enabled => false
  )
  guard_pods_deployment_target(installer)
  installer.pods_project.targets.each do |target|
     target.build_configurations.each do |config|
       config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', '_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION']
     end
   end
end


target 'ImageNotification' do
  platform :ios, '14.0'
  pod 'Firebase/Messaging'
  pod 'Iterable-iOS-AppExtensions'
end

Many people say that it is related to use_framework and that adding a pre_install with a explicit type to static library would fix it but it did not for me. I am pretty sure that RNReanimated is what i need to target but am i wrong?

    pre_install do |installer|
     installer.pod_targets.each do |pod|
       if pod.name.eql?('RNReanimated')
         def pod.build_type
           Pod::BuildType.static_library
         end
       end
      end
    end
  • I have also tried removing use_modular_headers!
  • upgrading react-native-video but I end up getting a different error.
  • upgrading react-native-reanimated
  • adding RNReanimated to the ImageNotification target like below
target 'ImageNotification' do
  platform :ios, '14.0'
  pod 'Firebase/Messaging'
  pod 'Iterable-iOS-AppExtensions'
  pod 'RNReanimated'
end

New contributor

Thanh Lai is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật