公证mac app时处理You must first sign the relevant contracts online错误

昨天修改了一些客户端代码,在发布app前例行跑一遍脚本,对app做公证。结果执行xcrun altool --notarize-app时,报了内容为You must first sign the relevant contracts online. (1048)的错误。
Google了一番之后,大概明白了这个错误是咋出来的了。
苹果更新了一些协议条款,需要开发者接受条款后才能继续使用服务。但公证脚本中对应的开发者账户,还没来得及接受条款。导致执行xcrun altool相关命令时,服务器返回了You must first sign the relevant contracts online. (1048)错误。
了解了原因,解决起来也快。让开发者账户的拥有者登录一下 https://appstoreconnect.apple.com/agreements/# ,把所有条款都确认一遍。再执行公证流程就可以了。