React Native IOS 运行错误 - (在项目“Pods”的目标“RNFBMessaging”中)

问题描述 投票:0回答:1

我的 Android 应用程序没有任何问题,我成功完成了所有步骤并发布了我的应用程序。

但是我在 IOS 模拟器中运行该应用程序时遇到错误。

如果您能帮助我解决这个问题,我会很高兴。谢谢

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, '13.0'
install! 'cocoapods', :deterministic_uuids => false

production = ENV["PRODUCTION"] == "1"

target 'cmsio' do
  config = use_native_modules!

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

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :production => production,
    :hermes_enabled => flags[:hermes_enabled],
    :fabric_enabled => flags[:fabric_enabled],
    :flipper_configuration => FlipperConfiguration.enabled,
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

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

  pod 'RNFBMessaging', :path => '../node_modules/@react-native-firebase/messaging'
  pod 'react-native-google-maps', :path => '../node_modules/react-native-maps'
  pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary"
  pod 'Permission-LocationAccuracy', :path => "#{permissions_path}/LocationAccuracy"
  pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways"
  pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse"
  pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications"  

  pod 'Firebase', :modular_headers => true
  pod 'FirebaseCore', :modular_headers => true
  pod 'Firebase/Messaging', :modular_headers => true
  pod 'FirebaseCoreInternal', :modular_headers => true
  pod 'GoogleUtilities', :modular_headers => true
  pod 'Google-Mobile-Ads-SDK'
  
  $RNFirebaseAsStaticFramework = true
  $RNGoogleMobileAdsAsStaticFramework = true

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

  post_install do |installer|
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
  end
end

错误信息

The following build commands failed:
    CompileC /Users/sirket/Library/Developer/Xcode/DerivedData/cmsio-doadelmxvtbipqeduigsnvnzbamx/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNFBMessaging.build/Objects-normal/x86_64/RNFBMessagingSerializer.o /Users/sirket/Desktop/android/cmsio/node_modules/@react-native-firebase/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'RNFBMessaging' from project 'Pods')
(1 failure)

能够运行应用程序

ios react-native react-native-firebase podfile
1个回答
0
投票

你的 podfile 里有这个吗?

use_frameworks! :linkage => :static

以及 AppDelegate.m 中

  [FIRApp configure];

您可以参考这里https://rnfirebase.io/

© www.soinside.com 2019 - 2024. All rights reserved.