在<Target>内循环;建设可能会产生不可靠的结果。Xcode 15 反应本机

Muh*_*man 0 xcode ios react-native expo xcode15

我使用的"react-native": "0.72.3"是 Xcode 14,一切都运行良好,但是当我将 Xcode 更新到Xcode 15时。然后它给出如下错误

\n

注意:我使用的是 Live Activity 和 Dynamic Island 小部件扩展以及两个通知小部件扩展。

\n
Showing Recent Messages\nCycle inside <Target>; building could produce unreliable results.\nCycle details:\n\xe2\x86\x92 Target \'<Target>\': ExtractAppIntentsMetadata\n\xe2\x97\x8b Target \'<Target>\' has copy command from \'/Users/apple/Library/Developer/Xcode/DerivedData/<Target>-hifbytcglbabrcgbkmfgnzgmwpmj/Build/Products/Debug-iphoneos/LiveActivityDynamicIslandExtension.appex\' to \'/Users/apple/Library/Developer/Xcode/DerivedData/<Target>-hifbytcglbabrcgbkmfgnzgmwpmj/Build/Products/Debug-iphoneos/<Target>.app/PlugIns/LiveActivityDynamicIslandExtension.appex\'\n\xe2\x97\x8b That command depends on command in Target \'<Target>\': script phase \xe2\x80\x9c[CP-User] [RNFB] Core Configuration\xe2\x80\x9d\n\xe2\x97\x8b Target \'<Target>\' has process command with output \'/Users/apple/Library/Developer/Xcode/DerivedData/<Target>-hifbytcglbabrcgbkmfgnzgmwpmj/Build/Products/Debug-iphoneos/<Target>.app/Info.plist\'\n\xe2\x97\x8b Target \'<Target>\' has copy command from \'/Users/apple/Library/Developer/Xcode/DerivedData/<Target>-hifbytcglbabrcgbkmfgnzgmwpmj/Build/Products/Debug-iphoneos/LiveActivityDynamicIslandExtension.appex\' to \'/Users/apple/Library/Developer/Xcode/DerivedData/<Target>-hifbytcglbabrcgbkmfgnzgmwpmj/Build/Products/Debug-iphoneos/<Target>.app/PlugIns/LiveActivityDynamicIslandExtension.appex\'\n
Run Code Online (Sandbox Code Playgroud)\n

在此输入图像描述

\n

Muh*_*man 6

如果您使用 Firebase 软件包,那么您可以尝试Firebase解决方案,否则您可以尝试其他解决方案

Firebase 解决方案

当您使用这样的 Firebase pod 时,就会发生这种情况Podfile

  pod 'nanopb', :modular_headers => true
  pod 'FirebaseSessions', :modular_headers => true
  pod 'Firebase', :modular_headers => true
  pod 'FirebaseCore', :modular_headers => true
  pod 'FirebaseCoreExtension', :modular_headers => true
  pod 'FirebaseInstallations', :modular_headers => true
  pod 'GoogleDataTransport', :modular_headers => true
  pod 'FirebaseCrashlytics', :modular_headers => true
  pod 'GoogleUtilities', :modular_headers => true
  pod 'CleverTap-iOS-SDK', :modular_headers => true
Run Code Online (Sandbox Code Playgroud)

解决方案1:

你可以选择任一Manual方式或 do Patch Packageway

手动的:

如果你想使用:modular_headers => truepod 那么你可以尝试这个解决方案

  1. ProjectTarget -> Build Phases
  2. 扩张[RNFB] Core Configuration
  3. 将输入文件替换为$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)from$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)

在此输入图像描述 4. 进入[CP_user][RNFB] Crashlytics ConfigurationBuildPhase并展开它

  1. ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}作为输入文件 删除在此输入图像描述
  2. 运行构建

封装补丁

  1. 安装补丁包
  2. 应用两个补丁,如下所示

@react-native-firebase+app+18.3.0.patch

diff --git a/node_modules/@react-native-firebase/app/react-native.config.js b/node_modules/@react-native-firebase/app/react-native.config.js
index 8502984..de75804 100644
--- a/node_modules/@react-native-firebase/app/react-native.config.js
+++ b/node_modules/@react-native-firebase/app/react-native.config.js
@@ -10,7 +10,7 @@ module.exports = {
             name: '[RNFB] Core Configuration',
             path: './ios_config.sh',
             execution_position: 'after_compile',
-            input_files: ['$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)'],
+            input_files: ['$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)'],
           },
         ],
       },
Run Code Online (Sandbox Code Playgroud)

@react-native-firebase+crashlytics+18.3.0.patch

diff --git a/node_modules/@react-native-firebase/crashlytics/react-native.config.js b/node_modules/@react-native-firebase/crashlytics/react-native.config.js
index 5f6c5f1..0fc785f 100644
--- a/node_modules/@react-native-firebase/crashlytics/react-native.config.js
+++ b/node_modules/@react-native-firebase/crashlytics/react-native.config.js
@@ -24,7 +24,6 @@ module.exports = {
             path: './ios_config.sh',
             execution_position: 'after_compile',
             input_files: [
-              '${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}',
               '$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)',
             ],
           },

Run Code Online (Sandbox Code Playgroud)
  1. pod install通过命令安装pod
  2. 运行构建。

解决方案2

如果你不想用的:modular_headers => true

  1. 'use_frameworks! :linkage => :static'在你的 Podfile 中启用这一行
  2. pod install在终端中运行命令
  3. 运行构建

其他解决方案

解决方案一:

在构建阶段,将Embed Frameworks构建阶段移至Run script. 运行构建。

在此输入图像描述

解决方案2:

在构建阶段中,将Run Script构建阶段移动到列表的末尾。运行构建。 在此输入图像描述

解决方案3:

在构建阶段,将“Embed Foundation Extensions”构建阶段移至“[CP] Embed Pods Frameworks”之上。运行构建。

在此输入图像描述

解决方案4:

  1. 在 Xcode 中,转到File -> Workspace Settings
  2. 点击Advanced按钮
  3. 选择Legacy单选按钮
  4. 运行构建