After you run Xcode, click Preferences in the menu ... Go to the Accounts tab and choose Add Apple ID here:
Sign in with your Apple ID in the pop-up dialog, and if you don't have one, you'll see a message like this when you log in successfully:
You can see that the free tag for iOS and Mac is shown below, and the previous version of Xcode will not be able to do anything if you don't have an account with the Apple Developer program.
The next thing to do is to generate a development certificate, select the item with free, and then click View Details in the popup dialog box:
Click the "+" button in the middle, select iOS development in the pop-up menu, and then wait a moment (normally), Xcode will help you build the certificate required for dev mode.
With the signing certificate basically almost, the rest is to open the iOS project to debug, and then on the project Target's General page of the team to select the Apple ID corresponding to the item, and then connect to the device, and so on when the device is ready, the first debugging needs to add provisioning Profile, before or to that turtle speed backstage, manual input device Udid generate profile and then download down the import, now just select the team under the issue next to the point fix, everything is done by Xcode, will eventually generate the next one of the corresponding app ID of the description file, then compile the linked project, run debugging can be
Xcode 7 How to free real-computer debug iOS app