1、Project Setting -> IOS -> automatic signing 勾上。
2、删除Provision文件:
Windows:C:\Users\<you>\AppData\Local\Apple Computer\MobileDevice\Provisioning Profiles
Mac : ~/Library/MobileDevice/Provisioning Profiles
进入Mac方法:Open finder on your mac, and click on Go -> Go to Folder ... Just paste this paste into the search bar and hit Open. It will show the list of provisioning profiles present in Xcode. Delete all provisioning profiles.
3、删除证书:
Windows:To be more specific: It's opening windows command line (Win+R), input "certmgr.msc". At least it works on win10. the certifications located in "Certificates->Personal->Certificates" in certmgr panel
Mac:keychin直接删除