The solution is to create a new Apple Developer account. In XCode go to Signing & Capabilities, in the team drop-down select "Add an account..." and sign into your new account. Press Run in XCode. It will come up with the same message but go to Settings > General > VPN & Device Management and trust the app under "Developer App". This didn't appear before.
Topic:
App & System Services
SubTopic:
Core OS
Tags: