【问题标题】:After installing react-native-firebase/app it's Build will failed in react-native ios安装 react-native-firebase/app 后,它的 Build 将在 react-native ios 中失败
【发布时间】:2022-09-24 05:51:10
【问题描述】:

在使用use_frameworks! 安装react-native-firebase/app@15.3.0react-native-0.68.1 并在项目的podfile 中删除flipper 后,但是当我运行npx react-native run-ios 时,它的构建失败

以下构建命令失败: ld /Users/userName/Library/Developer/Xcode/DerivedData/-gvnovwrlbjvxedcquaumtvgvdgmn/Build/Products/Debug-iphonesimulator/react-native-razorpay/react_native_razorpay.framework/react_native_razorpay 正常(在目标\'react-native-razorpay\'来自项目\'Pods\') (1 次失败),该项目还包含 react-native-razorpay 之前添加的 ..现在如何删除错误并且构建将成功而不会发生任何崩溃,请帮助我是 react-native 的新手 我的 podfile 看起来像``` #use_modular_headers!

require_relative \'../node_modules/react-native/scripts/react_native_pods\' require_relative \'../node_modules/@react-native-community/cli-platform-ios/native_modules\'

平台:ios,\'12.0\' 安装! \'cocoapods\', :deterministic_uuids => false

目标\'DussriShadi\'做

使用_frameworks!

配置 = use_native_modules!

标志根据 env 值而变化。

标志 = get_default_flags()

使用_react_native!( :path => config[:reactNativePath], # 在 iOS 上启用 hermes,将 false 更改为 true 然后安装 pod :hermes_enabled => 标志[:hermes_enabled], :fabric_enabled => 标志[:fabric_enabled], # 应用程序根目录的绝对路径。 :app_path => \"#{Pod::Config.instance.installation_root}/..\" )

目标 \'DussriShadiTests\' 做 继承! :完全的 # 豆荚

结尾

启用翻转器。

请注意,如果您有 use_frameworks!启用,Flipper 将无法工作并且

你应该禁用下一行。

#use_flipper!()

post_install 做 |安装程序| react_native_post_install(安装程序) __apply_Xcode_12_5_M1_post_install_workaround(安装程序) 结尾 结尾

  • 您是否尝试过清理构建文件夹。也许还可以尝试删除并重新安装 pod。由于错误与DerivedData 文件夹有关,还请尝试删除xcode 的派生数据文件夹
  • 尝试 1:移除 POD 并再次安装 POD。 ///// 或 //// 尝试 2:从您的 DERIVEDDATA 文件夹中清除所有数据,进一步移除 POD 并再次安装 POD。
  • 我从 RN 应用程序和 RNFirebase 的全新香草安装中得到了同样的结果。尝试了各种版本的 RN 并按照说明进行操作。我的 14.9 项目运行良好。
  • 是的,在 react-native-firebase v14 中很好。但在 v15+ 中不行

标签: ios firebase react-native react-native-firebase


【解决方案1】:

这对我有用

"@react-native-firebase/app": "^15.6.0",
"@react-native-firebase/messaging": "^15.6.0",
"react": "18.1.0",
"react-native": "0.70.1"
  1. 首先将其添加到 podfile 中:

      pod 'Firebase', :modular_headers => true
      pod 'FirebaseCoreInternal', :modular_headers => true
      pod 'GoogleUtilities', :modular_headers => true
      pod 'FirebaseCore', :modular_headers => true
    

    介于两者之间

       flags = get_default_flags()
    

       use_react_native!(
    
    1. 然后删除 podfile.lock。

    2. 然后做:

        cd ios
        pod deintegrate
        pod cache clean --all
        npm cache verify
        yarn cache clean
        pod install --repo-update
      
    3. 然后清理 XCode 下的构建文件夹 -> 产品 -> 清理构建文件夹。

    4. 然后从 XCode 中运行。

【讨论】:

    猜你喜欢
    • 2022-07-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-02
    • 1970-01-01
    • 1970-01-01
    • 2017-09-09
    • 1970-01-01
    相关资源
    最近更新 更多