Skip to content

Commit

Permalink
Look for the developer disk image using more patterns as well
Browse files Browse the repository at this point in the history
Xcode 8.3.3 contains the following directories in
Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport:
10.0			8.1			9.1
10.1			8.2			9.2
10.2			8.3			9.3
10.3.1 (14E8301)	8.4
8.0			9.0

Despite this, this version of Xcode can run code on iOS devices
running iOS 10.3.2 as well.

Therefore try with a pattern of "<version>.*", which for 10.3.2
matches when the last version component has been stripped, into 10.3.

This fixes the latest occurrances of github issue #171.
  • Loading branch information
mstorsjo committed Jul 4, 2017
1 parent 35c2c55 commit 62c6f09
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ios-deploy/ios-deploy.m
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,10 @@ CFStringRef copy_device_support_path(AMDeviceRef device, CFStringRef suffix) {
if (path == NULL) {
path = copy_xcode_path_for(deviceClassPath[i], CFStringCreateWithFormat(NULL, NULL, CFSTR("%@/%@"), version, suffix));
}

if (path == NULL) {
path = copy_xcode_path_for(deviceClassPath[i], CFStringCreateWithFormat(NULL, NULL, CFSTR("%@.*/%@"), version, suffix));
}
}

CFRelease(version);
Expand Down

0 comments on commit 62c6f09

Please sign in to comment.