Xcode error The maximum number of apps for free development profiles has been reached
In my case this guide worked; that is, in Xcode go to Window → Devices then under Installed Apps delete some of your apps and afterwards I could run my own apps on the device again.

I also rebooted the phone beforehand, but I assume that was not necessary.