The first is to find this problem is because in the real machine debugging, Xcode always found not connected to the real machine, repeatedly confirm the certificate installation and Xcode configuration is not a problem, because the other phone can be very well recognized. The reason for this problem is quickly found, because the SDK mismatch caused, the phone is not recognized iOS 7.1. So it's important to note that if Xcode does not recognize your device when it is being debugged, it is possible that the current SDK version is higher than your phone.
Here first, each version of Xcode will only be equipped with one version of the iOS SDK. For example, xCode6.2 is powered by the ios8.2 SDK, and each time a new SDK is released, a new version of Xcode is introduced. The main reason why only one version of the SDK is installed is that there will be about 1GB for one version of the SDK. So the question comes, think I now encounter the problem how to solve, is upgrade to iOS8.2? There are actually ways to make Xcode compatible with older versions of the SDK. And there's another benefit to testing your app's compatibility with earlier versions of iOS. Normally I subconsciously keep my phone from being upgraded, so I can test it on different iOS versions.
Specifically, how to make Xcode compatible with other iOS versions:
method One : in Xcode > Preferences > Downloads > IOS 7.1 Simulator, click Download installation directly;
This method does not always work, for example xCode6.2 only provides download iOS8.1. And the download speed is extremely slow. There is also an Apple bug, downloaded to the iOS7.1 SDK is actually stored under the xcode5.*. Some people say that this is not a bug, because a common directory can prevent duplicate downloads. So his problem is not the wrong download location, but not the recognition. 1
method Two : Extract the corresponding SDK version from the previous version of Xcode, this method is guaranteed to work. The specific steps are as follows:
1. Get SDK7.1 files: There are two ways
Mode A. If you've already pressed xcode5.*, then you just/applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks copy it directly. ,
Mode B. Or if you only have xcode5.* installation package, then open the DMG package (open with Image mounter), then right-click the Xcode icon and select "Show Package Contents", step by step to the directory: contents/ Developer/platforms/iphoneos.platform/developer/sdks.
2. copy files to/applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/
3, and then restart Xcode, and you'll find that there are other versions of the iOS SDK available for you to choose from;
In fact, this method can be applied to any version of Xcode. And, this is a necessary skill for each iOS development, an application developed must be compatible with the old version, must be used in the old version of the device debugging, the problem was discovered this morning. Currently iOS8.3 has been released and my plan is compatible with ios6.*,ios7.*,ios8.*. The real machine in hand must be guaranteed to have several versions at the same time, do not owe the hand to upgrade.
Debug ios7.1 under xcode6.2