我正在尝试为我当前的 iOS 应用程序创建一个手表应用程序,但即使我没有在手表目标中导入任何框架或依赖项,它也会给我这个错误:
Cycle in dependencies between targets 'Insightfull' and 'Insightfull WatchKit Watch App'; building could produce unreliable results.
Cycle path: Insightfull → Insightfull WatchKit Watch App → Insightfull
Cycle details:
→ Target 'Insightfull' has copy command from '/Users/rohanrocks/Library/Developer/Xcode/DerivedData/Insightfull-fdmnpootxbwpoaeqfjfhyzrrrstx/Build/Products/Debug-watchsimulator/Insightfull WatchKit Watch App.app' to '/Users/rohanrocks/Library/Developer/Xcode/DerivedData/Insightfull-fdmnpootxbwpoaeqfjfhyzrrrstx/Build/Products/Debug-iphonesimulator/Insightfull.app/Watch/Insightfull WatchKit Watch App.app'
→ Target 'Insightfull WatchKit Watch App': CodeSign /Users/rohanrocks/Library/Developer/Xcode/DerivedData/Insightfull-fdmnpootxbwpoaeqfjfhyzrrrstx/Build/Products/Debug-watchsimulator/Insightfull WatchKit Watch App.app
○ Target 'Insightfull WatchKit Watch App': CodeSign /Users/rohanrocks/Library/Developer/Xcode/DerivedData/Insightfull-fdmnpootxbwpoaeqfjfhyzrrrstx/Build/Products/Debug-watchsimulator/Insightfull WatchKit Watch App.app
→ Target 'Insightfull' has process command with output '/Users/rohanrocks/Library/Developer/Xcode/DerivedData/Insightfull-fdmnpootxbwpoaeqfjfhyzrrrstx/Build/Products/Debug-iphonesimulator/Insightfull.app/Info.plist'
Raw dependency cycle trace:
target: ->
node: <all> ->
command: <all> ->
node: /Users/rohanrocks/Library/Developer/Xcode/DerivedData/Insightfull-fdmnpootxbwpoaeqfjfhyzrrrstx/Build/Intermediates.noindex/Insightfull.build/Debug-iphonesimulator/Insightfull.build/Objects-normal/arm64/ExtractedAppShortcutsMetadata.stringsdata ->
command: P0:target-Insightfull-d9c2816c65a02dfabbbe7a71547e5f047f09f7f4df4f256fc32431abdfd4c27a-:Debug:ExtractAppIntentsMetadata ->
node: <target-Insightfull-d9c2816c65a02dfabbbe7a71547e5f047f09f7f4df4f256fc32431abdfd4c27a--fused-phase2-copy-files> ->
command: P0:::Gate target-Insightfull-d9c2816c65a02dfabbbe7a71547e5f047f09f7f4df4f256fc32431abdfd4c27a--fused-phase2-copy-files ->
node: <target-Insightfull-d9c2816c65a02dfabbbe7a71547e5f047f09f7f4df4f256fc32431abdfd4c27a--fused-phase1-copy-files> ->
command: P0:::Gate target-Insightfull-d9c2816c65a02dfabbbe7a71547e5f047f09f7f4df4f256fc32431abdfd4c27a--fused-phase1-copy-files ->
node: <Copy /Users/rohanrocks/Library/Developer/Xcode/DerivedData/Insightfull-fdmnpootxbwpoaeqfjfhyzrrrstx/Build/Products/Debug-iphonesimulator/Insightfull.app/Watch/Insightfull WatchKit Watch App.app> ->
CYCLE POINT ->
command: P0:target-Insightfull-d9c2816c65a02dfabbbe7a71547e5f047f09f7f4df4f256fc32431abdfd4c27a-:Debug:Copy /Users/rohanrocks/Library/Developer/Xcode/DerivedData/Insightfull-fdmnpootxbwpoaeqfjfhyzrrrstx/Build/Products/Debug-iphonesimulator/Insightfull.app/Watch/Insightfull WatchKit Watch App.app /Users/rohanrocks/Library/Developer/Xcode/DerivedData/Insightfull-fdmnpootxbwpoaeqfjfhyzrrrstx/Build/Products/Debug-watchsimulator/Insightfull WatchKit Watch App.app ->
node: /Users/rohanrocks/Library/Developer/Xcode/DerivedData/Insightfull-fdmnpootxbwpoaeqfjfhyzrrrstx/Build/Products/Debug-watchsimulator/Insightfull WatchKit Watch App.app/ ->
directoryTreeSignature: � ->
node: /Users/rohanrocks/Library/Developer/Xcode/DerivedData/Insightfull-fdmnpootxbwpoaeqfjfhyzrrrstx/Build/Products/Debug-watchsimulator/Insightfull WatchKit Watch App.app/_CodeSignature ->
command: P0:target-Insightfull WatchKit Watch App-d9c2816c65a02dfabbbe7a71547e5f048c10c4a4d72020b16b4193f3d32cfebb-:Debug:CodeSign /Users/rohanrocks/Library/Developer/Xcode/DerivedData/Insightfull-fdmnpootxbwpoaeqfjfhyzrrrstx/Build/Products/Debug-watchsimulator/Insightfull WatchKit Watch App.app ->
node: /Users/rohanrocks/Library/Developer/Xcode/DerivedData/Insightfull-fdmnpootxbwpoaeqfjfhyzrrrstx/Build/Products/Debug-iphonesimulator/Insightfull.app/ ->
directoryTreeSignature: � ->
node: /Users/rohanrocks/Library/Developer/Xcode/DerivedData/Insightfull-fdmnpootxbwpoaeqfjfhyzrrrstx/Build/Products/Debug-iphonesimulator/Insightfull.app/Info.plist ->
command: P0:target-Insightfull-d9c2816c65a02dfabbbe7a71547e5f047f09f7f4df4f256fc32431abdfd4c27a-:Debug:ProcessInfoPlistFile /Users/rohanrocks/Library/Developer/Xcode/DerivedData/Insightfull-fdmnpootxbwpoaeqfjfhyzrrrstx/Build/Products/Debug-iphonesimulator/Insightfull.app/Info.plist /Users/rohanrocks/Xcode/Insightfull/Insightfull/Info.plist ->
node: /Users/rohanrocks/Library/Developer/Xcode/DerivedData/Insightfull-fdmnpootxbwpoaeqfjfhyzrrrstx/Build/Products/Debug-iphonesimulator/Insightfull.app/Watch/Insightfull WatchKit Watch App.app ->
command: P0:target-Insightfull-d9c2816c65a02dfabbbe7a71547e5f047f09f7f4df4f256fc32431abdfd4c27a-:Debug:Copy /Users/rohanrocks/Library/Developer/Xcode/DerivedData/Insightfull-fdmnpootxbwpoaeqfjfhyzrrrstx/Build/Products/Debug-iphonesimulator/Insightfull.app/Watch/Insightfull WatchKit Watch App.app /Users/rohanrocks/Library/Developer/Xcode/DerivedData/Insightfull-fdmnpootxbwpoaeqfjfhyzrrrstx/Build/Products/Debug-watchsimulator/Insightfull WatchKit Watch App.app
如果我需要提供任何其他信息,请告诉我
Xcode 版本 16.1 (16B40)
macOS 红杉 15.2 Beta 1
M3 Macbook Pro(2023 年 11 月)
修复依赖循环错误:
检查依赖关系: 在 Insightfull 和 Insightfull WatchKit Watch App 目标的构建阶段中,确保它们没有被列为彼此的依赖项。
验证复制文件阶段: 从 Insightfull 目标下的复制文件或嵌入应用程序扩展阶段删除 Insightfull WatchKit 手表应用程序。
清除导出数据: 在 Xcode → 设置 → 位置中删除 Insightfull 的派生数据。
检查Info.plist: 确保两个目标的 Info.plist 文件不会相互引用。 重建项目以查看是否可以解决循环问题。