从 xcode 归档应用程序时出现此错误

While archving app from xcode getting this error

CodeSign /Users/macbook/Library/Developer/Xcode/DerivedData/appname-asdasdasd/Build/Intermediates.noindex/ArchiveIntermediates/appname/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/NotificationServiceExtension.appex
    cd /Users/macbook/Documents/Projects/
    export CODESIGN_ALLOCATE=/Users/macbook/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
    export 

PATH="/Users/macbook/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Users/macbook/Downloads/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    
Signing Identity:     "Apple Distribution:teamname”

Provisioning Profile: "org_notificationService_profile"
                      

    /usr/bin/codesign --force --sign 0746A1A86EB886A02E571C83E3 --entitlements /Users/macbook/Library/Developer/Xcode/DerivedData/appname-fadmxslohyadleahgtrunjqbwjgw/Build/Intermediates.noindex/ArchiveIntermediates/appname/IntermediateBuildFilesPath/appname.build/Release-iphoneos/NotificationServiceExtension.build/NotificationServiceExtension.appex.xcent --timestamp=none /Users/macbook/Library/Developer/Xcode/DerivedData/appname-fadmxslohyadleahgtrunjqbwjgw/Build/Intermediates.noindex/ArchiveIntermediates/appname/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/NotificationServiceExtension.appex

命令 CodeSign 失败,退出代码非零

创建了新的分发证书并再次清理和构建项目,但错误仍然相同 如果有人知道请告诉我

经过一番研究终于解决了。

更新 xcode13 后需要遵循的以下步骤:

希望对您有所帮助