iOS执行xcodebuild archive 命令时报下面的错误:Code Signing Error: Invalid trust settings. Restore system default trust settings for certificate "xx" in order to sign code with it.
Code Signing Error: Code signing is required for product type 'App Extension' in SDK 'iOS 15.2'
解决方式:
将证书信任方式改为系统默认(不要用始终信任)
1、打开钥匙串,找到报错的证书
2、双击证书,点击信任,选择【使用系统默认】