Today, while doing the real machine debugging, I encountered one of the following problems:
Could not locate device support files.
This is the IPhone 6s is running IOS 11.1 (15b93), and which may isn't supported by this version of Xcode.
It means that I upgraded my phone's iOS system to the latest version of version 11.1 before debugging, and my Xcode9 support was 11.0 of the highest version. This is not surprising, the handset must be pushed first, this is Apple's usual practice. So how do we deal with the problems above? Solutions
1. Copy an old SDK and rename it to the SDK version required for the true machine test;
In particular, find the path:/APPLICATIONS/XCODE.APP/CONTENTS/DEVELOPER/PLATFORMS/IPHONEOS.PLATFORM/DEVELOPER/SDKS/IPHONEOS.SDK (Hint: To find Xcode in the application, right-click-> Display package content, previous Xcode version of the iOS SDK some saved in the system root directory).
Duplicate a copy of IPHONEOS.SDK and name it iphoneos11.1.sdk. As shown in the following illustration:
2, add the true machine debugging package and content
Open path:
/applications/xcode.app/contents/developer/platforms/iphoneos.platform/devicesupport. I found 11.1 of the true package on the Cocoachina, the link address is as follows:
http://www.cocoachina.com/bbs/read.php?tid=1726904. Then we open the Devicesupport and copy it.
The idea is to create a new version of the 11.1 (15b93), and then copy the files downloaded from Cocoachina to this location.
3, modify the version number in the Sdksettings.plist file
According to/APPLICATIONS/XCODE.APP/CONTENTS/DEVELOPER/PLATFORMS/IPHONEOS.PLATFORM/DEVELOPER/SDKS/IPHONEOS.SDK In order to open the Sdksettings.plist file, the inside of all with the version of the numbers are modified to 11.1 can be. It's good to run again.