Can't build project to personal device

I was previously able to build my app on my personal iPhone. The license expires after one week so I need to reload it onto my phone every 7 days. So the process worked a week ago and it just stopped working when I tried it today. It still works in the simulator but fails to build to a connected device.


First I get this error when my device is not plugged in:


Failed to create provisioning profile.

There are no devices registered in your account on the developer website. Plug in and select a device to have Xcode register it.


When I plug in my device it automatically tries to register it and gives me this extremely useless error message:


An unexpected error occurred. Please try again. If the problem persists, please contact Apple Developer Program Support. https://developer.apple.com/support


I think this may be related to the new update to Xcode, but I have no idea how to check that.


I have XCode Version 10.2

Mac Version 10.14.2

iPhone Version 12.2

Replies

I've tried restarting the xcode, the mac, the iphone.

I've tried emptying DerivedData

I tried deleting and recreating my development team