In Xcode, how can I register a device to test on it, without having a paid Apple Developer account?

MarcG picture MarcG · Aug 6, 2018 · Viewed 8.9k times · Source

I am trying to test an app in a real device, using XCode 9.

In Xcode > General > "Automatically manage signing" I get this error: 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.

I have tried physically plugging in an iPod, an iPad and an iPhone. They all show up in iTunes, and also in XCode under Windows > "Devices and Simulators", but XCode simply doesn't register anything.

I also tried to go to the website to register the devices manually, but it seems I cannot even access this website without having a paid Apple developer account?

I do NOT have a paid Apple developer account, but I do have the Apple ID. I know that I can test in a real device without an account because in this page https://developer.apple.com/support/compare-memberships/ under Benefits and Resources the Sign in with Apple ID column has Test on Device checked.

Please, how can I solve this?

Answer

MarcG picture MarcG · Aug 6, 2018

At the top of the Xcode window, from left to right, after the Run and the Stop buttons, there is another button which displays the tooltip "Set the active scheme" when you hover the mouse over it.

This button lets you choose a simulator. But once your device is plugged in it also let you select that device. Once you select your device, the problem disappears.

Note to those using Xcode to run code developed for Google's Flutter: You probably must also select Product > Run in Xcode, before you are able to go the device to trust the certificate, under the device's General > Device Management.