Cycle inside Appname; building could produce unreliable results. Cycle details: → Target 'Appname': ExtractAppIntentsMetadata ○ Target 'Appname': CodeSign /Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Products/Debug-iphoneos/Appname.app/Frameworks/APGconnect.framework ○ Target 'Appname' has copy command from '/Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/SourcePackages/artifacts/apgconnect-swiftpackagemanager/APGconnect/APGconnect.xcframework/ios-arm64/APGconnect.framework' to '/Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Products/Debug-iphoneos/Appname.app/Frameworks/APGconnect.framework' ○ That command depends on command in Target 'Appname': script phase “Firebase Crashlytics” ○ Target 'Appname' has a command with output '/Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Products/Debug-iphoneos/Appname.app.dSYM' ○ Target 'Appname' has process command with output '/Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Products/Debug-iphoneos/Appname.app/Info.plist' ○ Target 'Appname' has copy command from '/Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/SourcePackages/artifacts/apgconnect-swiftpackagemanager/APGconnect/APGconnect.xcframework/ios-arm64/APGconnect.framework' to '/Users/fon/Library/Developer/Xcode/DerivedData/Appname-aepljzymlxbnxmekkzdewisujhhh/Build/Products/Debug-iphoneos/Appname.app/Frameworks/APGconnect.framework'

新建完widget extendsion 运行时报错,一开始我还以为是命名导致的循环。
折腾了一段时间之后无果,Google后发现了解决的方案。

只需要打开runner 的Build Phase , 将最后的Embed Foundation Extensions拖动到 Copy Bundle Resources下方之后重新运行即可。