App在所有Xcode版本<= 14.3.1上构建,但在Xcode 15上出现“内部循环”构建错误。

huangapple go评论60阅读模式
英文:

App builds with all Xcode versions <= 14.3.1 but with Xcode 15 gets a "Cycle inside" build error

问题

My app builds fine with Xcode 14.n, 13.n, 12.n, but when attempting to build it with Xcode 15 there's a build error:

> "Cycle inside MyApp; building could produce unreliable results."

The output below isn't giving me any clues that I can see about what the cause of the cycle is nor how to fix it, any ideas?

I've tried several things suggested here but with no success: link

Cycle inside MyApp; building could produce unreliable results.
Cycle details:
→ Target 'MyApp': ExtractAppIntentsMetadata
○ Target 'MyApp': CodeSign /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework
○ Target 'MyApp' has copy command from '/Users/me/Desktop/Checkouts/MyApp/theApp/MyApp/ios/3rdPartyFramework.framework' to '/Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework'
○ Target 'MyApp' has copy command from '/Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/CallExtension.appex' to '/Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/PlugIns/CallExtension.appex'
○ That command depends on command in Target 'MyApp': script phase “Add Git/CI Build Info”
○ Target 'MyApp' has process command with output '/Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Info.plist'
○ Target 'MyApp' has copy command from '/Users/me/Desktop/Checkouts/MyApp/theApp/MyApp/ios/3rdPartyFramework.framework' to '/Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework'

Raw dependency cycle trace:

target: -

node: ->

command: ->

node: /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Intermediates.noindex/ProjectA.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/ExtractedAppShortcutsMetadata.stringsdata ->

command: P0:target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:ExtractAppIntentsMetadata ->

node: ->

command: P0:::Gate target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--package-copy-files-phase ->

node: ->

command: P0:::Gate target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase11-copy-files ->

node: <CodeSign /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework> ->

command: P0:target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:CodeSign /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework ->

node: <Copy /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework> ->

CYCLE POINT ->

command: P0:target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:Copy /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework /Users/me/Desktop/Checkouts/MyApp/theApp/MyApp/ios/3rdPartyFramework.framework ->

node: ->

command: P0:::Gate target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase10--cp--copy-pods-resources ->

node: /Users/me/Library/Developer/Xcode/DerivedData/ProjectA.build/Debug-iphoneos/MyApp.build/InputFileList-F72A917A68CD9152103DBA60-Pods-MyApp-resources-Debug-input-files-037b34732b45cb31a2dcb00ffdfe9f5c-resolved.xcfilelist ->

command: P2:target-MyApp-2a7e5

英文:

My app builds fine with Xcode 14.n, 13.n, 12.n, but when attempting to build it with Xcode 15 there's a build error:

> "Cycle inside MyApp; building could produce unreliable results."

The output below isn't giving me any clues that I can see about what the cause of the cycle is nor how to fix it, any ideas?

I've tried several things suggested here but with no success: https://stackoverflow.com/questions/50709330/cycle-inside-building-could-produce-unreliable-results-xcode-error

Cycle inside MyApp; building could produce unreliable results.
Cycle details:
→ Target &#39;MyApp&#39;: ExtractAppIntentsMetadata
○ Target &#39;MyApp&#39;: CodeSign /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework
○ Target &#39;MyApp&#39; has copy command from &#39;/Users/me/Desktop/Checkouts/MyApp/theApp/MyApp/ios/3rdPartyFramework.framework&#39; to &#39;/Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework&#39;
○ Target &#39;MyApp&#39; has copy command from &#39;/Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/CallExtension.appex&#39; to &#39;/Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/PlugIns/CallExtension.appex&#39;
○ That command depends on command in Target &#39;MyApp&#39;: script phase “Add Git/CI Build Info”
○ Target &#39;MyApp&#39; has process command with output &#39;/Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Info.plist&#39;
○ Target &#39;MyApp&#39; has copy command from &#39;/Users/me/Desktop/Checkouts/MyApp/theApp/MyApp/ios/3rdPartyFramework.framework&#39; to &#39;/Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework&#39;
Raw dependency cycle trace:
target:  -&gt;
node: &lt;all&gt; -&gt;
command: &lt;all&gt; -&gt;
node: /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Intermediates.noindex/ProjectA.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/ExtractedAppShortcutsMetadata.stringsdata -&gt;
command: P0:target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:ExtractAppIntentsMetadata -&gt;
node: &lt;target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--package-copy-files-phase&gt; -&gt;
command: P0:::Gate target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--package-copy-files-phase -&gt;
node: &lt;target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase11-copy-files&gt; -&gt;
command: P0:::Gate target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase11-copy-files -&gt;
node: &lt;CodeSign /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework&gt; -&gt;
command: P0:target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:CodeSign /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework -&gt;
node: &lt;Copy /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework&gt; -&gt;
CYCLE POINT -&gt;
command: P0:target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:Copy /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework /Users/me/Desktop/Checkouts/MyApp/theApp/MyApp/ios/3rdPartyFramework.framework -&gt;
node: &lt;target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase10--cp--copy-pods-resources&gt; -&gt;
command: P0:::Gate target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase10--cp--copy-pods-resources -&gt;
node: /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Intermediates.noindex/ProjectA.build/Debug-iphoneos/MyApp.build/InputFileList-F72A917A68CD9152103DBA60-Pods-MyApp-resources-Debug-input-files-037b34732b45cb31a2dcb00ffdfe9f5c-resolved.xcfilelist -&gt;
command: P2:target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:WriteAuxiliaryFile /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Intermediates.noindex/ProjectA.build/Debug-iphoneos/MyApp.build/InputFileList-F72A917A68CD9152103DBA60-Pods-MyApp-resources-Debug-input-files-037b34732b45cb31a2dcb00ffdfe9f5c-resolved.xcfilelist -&gt;
node: &lt;target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase9--cp--embed-pods-frameworks&gt; -&gt;
command: P0:::Gate target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase9--cp--embed-pods-frameworks -&gt;
node: /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Intermediates.noindex/ProjectA.build/Debug-iphoneos/MyApp.build/InputFileList-7E0D6830477C665FCC1083CC-Pods-MyApp-frameworks-Debug-input-files-36820974ee8465975a73448c9644b936-resolved.xcfilelist -&gt;
command: P2:target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:WriteAuxiliaryFile /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Intermediates.noindex/ProjectA.build/Debug-iphoneos/MyApp.build/InputFileList-7E0D6830477C665FCC1083CC-Pods-MyApp-frameworks-Debug-input-files-36820974ee8465975a73448c9644b936-resolved.xcfilelist -&gt;
node: &lt;target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase8-upload-crashlytics&gt; -&gt;
command: P0:::Gate target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase8-upload-crashlytics -&gt;
node: &lt;target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase7-upload-debug-symbols-to-sentry&gt; -&gt;
command: P0:::Gate target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase7-upload-debug-symbols-to-sentry -&gt;
node: &lt;target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase6-crashlytics&gt; -&gt;
command: P0:::Gate target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase6-crashlytics -&gt;
node: &lt;target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase5-copy-files&gt; -&gt;
command: P0:::Gate target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase5-copy-files -&gt;
node: &lt;Copy /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/PlugIns/CallExtension.appex&gt; -&gt;
command: P0:target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:Copy /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/PlugIns/CallExtension.appex /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/CallExtension.appex -&gt;
node: &lt;target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase4-bundle-react-native-code-and-images&gt; -&gt;
command: P0:::Gate target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase4-bundle-react-native-code-and-images -&gt;
node: /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Intermediates.noindex/ProjectA.build/Debug-iphoneos/MyApp.build/Script-00DD1BFF1BD5951E006B06BC.sh -&gt;
command: P2:target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:WriteAuxiliaryFile /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Intermediates.noindex/ProjectA.build/Debug-iphoneos/MyApp.build/Script-00DD1BFF1BD5951E006B06BC.sh -&gt;
node: &lt;target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase3-add-git-ci-build-info&gt; -&gt;
command: P0:::Gate target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6--fused-phase3-add-git-ci-build-info -&gt;
node: &lt;execute-shell-script-2a7e5ca2b3fd2ca0faca1487721e3ae004c462d93c7eb2257aed820e07a8e286-target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6-&gt; -&gt;
command: P2:target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:PhaseScriptExecution Add Git/CI Build Info /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Intermediates.noindex/ProjectA.build/Debug-iphoneos/MyApp.build/Script-F64F322E29D3670D0018FC3B.sh -&gt;
node: /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Info.plist/ -&gt;
directoryTreeSignature: � -&gt;
directoryContents: /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Info.plist -&gt;
node: /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Info.plist -&gt;
command: P0:target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:ProcessInfoPlistFile /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Info.plist /Users/me/Desktop/Checkouts/MyApp/theApp/MyApp/ios/MyApp/CeqInfo.plist -&gt;
node: /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework -&gt;
command: P0:target-MyApp-2a7e5ca2b3fd2ca0faca1487721e3ae07ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:Copy /Users/me/Library/Developer/Xcode/DerivedData/ProjectA-frqscjhianktlvbxgbzostesljpn/Build/Products/Debug-iphoneos/MyApp.app/Frameworks/3rdPartyFramework.framework /Users/me/Desktop/Checkouts/MyApp/theApp/MyApp/ios/3rdPartyFramework.framework

Build phases:

App在所有Xcode版本<= 14.3.1上构建,但在Xcode 15上出现“内部循环”构建错误。

答案1

得分: 1

TL;DR: 如果您不需要将Info.plist列为“Input File”到您的Run Script构建阶段,请删除它。这对我解决了问题。


我几乎完全遇到了相同的问题。对我来说,导致问题的是Run Script构建阶段(对于您来说是“Add Git/CI Build Info”),其中有两个项目被定义为“Input Files”。其中一个是$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)

显然,这使它依赖于称为“ProcessInfoPlistFile”的编译步骤 - 您可以在您贴出的文本的第100-102行上看到,节点...Info.plist依赖于命令...ProcessInfoPlistFile。而且您可以在接下来的一行(第104行)上看到,ProcessInfoPlistFile依赖于节点...3rdPartyFramework.framework。 (我不知道为什么会这样。) (我可能颠倒了依赖关系的方向...我觉得这个日志输出非常难以理解。)

所以这就是循环依赖的原因。 ExtractAppIntentsMetadata最终需要将3rdPartyFramework.framework复制到您的应用程序中,这需要处理您的Info.plist,这又需要将3rdPartyFramework.framework复制到您的应用程序中。

英文:

TL;DR: if you don't need your Info.plist to be listed as an "Input File" to your Run Script build phase, remove it. That resolved the problem for me.


I had nearly exactly the same problem. For me, the Run Script build phase that was causing the problem (for you it's "Add Git/CI Build Info") had two items defined as "Input Files". One of them was $(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH).

Apparently that makes it dependent on a compilation step called "ProcessInfoPlistFile" - you can see on lines 100–102 of your pasted text, the node ...Info.plist has a dependency on the command ...ProcessInfoPlistFile. And you can see on the following line (104) that ProcessInfoPlistFile has a dependency on the node ...3rdPartyFramework.framework. (I have no idea why this is the case.) (I may have the directions of the dependencies inverted...I find this log output super difficult to understand.)

So that's why there's a cyclical dependency. ExtractAppIntentsMetadata eventually requires 3rdPartyFramework.framework to be copied into your app, which requires your Info.plist to be processed, which requires 3rdPartyFramework.framework to be copied into your app.

huangapple
  • 本文由 发表于 2023年6月15日 00:47:11
  • 转载请务必保留本文链接:https://go.coder-hub.com/76475865-2.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定