为什么 Expo iOS 构建失败?...ExpoModulesCore 的一些东西

dja*_*dev 7 react-native expo

大家好,我有一个 expo 管理应用程序,我想使用一个名为 Notifee 的通知库,它有一个 expo 插件。该插件添加了 Expo Go 不支持的本机代码,因此我被迫进入裸工作流程并构建本机 iOS 和 Android 文件夹。

我正在通过运行来构建 iOS 包expo run:ios。由于 ExpoModulesCore 的原因,构建失败:

 The following build commands failed:
   CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'ExpoModulesCore' from project 
 'Pods')
Run Code Online (Sandbox Code Playgroud)

所以我做了一些研究,发现 Stackoverflow 上其他人也有同样的问题。我尝试更改 pod 文件并更新 ExpoModulesCore, pod update ExpoModulesCore正如这个答案所示 /sf/answers/4977301381/

更新 ExpoModulesCore 并重新构建后,我收到一个额外的错误:

The following build commands failed:
        PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/kevin/Library/Developer/Xcode/DerivedData/Addressbook-gmgtddiltntfosevknuexadcwkpt/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-BC35D93E0A296DC41D8D893483CBC12F.sh (in target 'FBReactNativeSpec' from project 'Pods')
        CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'ExpoModulesCore' from project 'Pods')
(2 failures)
Run Code Online (Sandbox Code Playgroud)

那么为什么会发生这种情况呢?

我看到一些关于 Xcode 版本 13 无法工作的信息,只有 12 版本?

Expo版本不兼容吗?

真的很想弄清楚这里发生了什么

Bac*_*tan 1

也许已经太晚了。如果您使用 React Native 0.64.4,请在 package.json 上添加或更改 expo-module-core 版本为 ^0.6.5。

  • 删除node_modules文件夹和yarn.lock(如果您使用yarn)
  • 使用yarn重新安装node_modulesyarn install
  • pod deintegrate使用和pod installios 文件夹将 node_modules 与 pod 同步。
  • npx install-expo-modules使用根项目安装 expo 模块。
  • 然后使用构建iosyarn run ios

也许您需要在这里看到类似的问题: http: //bataxdev.com/reactnative/unable-to-find-a-spesification-for-expomodulescore