Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed crash when starting on ios13 devices while having xcode10 #427

Merged
merged 1 commit into from
Nov 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -593,8 +593,20 @@ static File findDeveloperImage(File dsDir, String productVersion, String buildVe
String.format("%s\\.%s \\(.*\\)", versionParts[0], versionParts[1]),
// 7.0
String.format("%s\\.%s", versionParts[0], versionParts[1]),
// 7.(*) -- forced anything after major to allow using older image with newer devices (e.g. 13.0 with 13.1 device)
String.format("%s\\.(.*\\)", versionParts[0])
//
// wildcard versions to allow newer devices to work with older sdk as long as major version matches
// 7.0.* (*)
String.format("%s\\.%s\\.\\d+ \\(.*\\)", versionParts[0], versionParts[1]),
// 7.0.*
String.format("%s\\.%s\\.\\d+", versionParts[0], versionParts[1]),
// 7.*.* (*)
String.format("%s\\.\\d+\\.\\d+ \\(.*\\)", versionParts[0]),
// 7.*.*
String.format("%s\\.\\d+\\.\\d+", versionParts[0]),
// 7.* (*)
String.format("%s\\.\\d+ \\(.*\\)", versionParts[0]),
// 7.*
String.format("%s\\.\\d+", versionParts[0])
};

File[] dirs = dsDir.listFiles();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,23 @@ public void testFindDeveloperImage() throws Exception {
File f613 = createDeveloperImage(dsDir, "6.1.3", false);
File f70_11A465 = createDeveloperImage(dsDir, "7.0 (11A465)");
File f703_11B508 = createDeveloperImage(dsDir, "7.0.3 (11B508)");

File f812_13B812 = createDeveloperImage(dsDir, "8.1.2 (13B812)");
File f92 = createDeveloperImage(dsDir, "9.2");
File f102 = createDeveloperImage(dsDir, "10.2 (14D123)");

assertEquals(f703_11B508, AppLauncher.findDeveloperImage(dsDir.toFile(), "7.0.3", "11B508"));
assertEquals(f61, AppLauncher.findDeveloperImage(dsDir.toFile(), "6.1.3", "10A123"));
assertEquals(f61, AppLauncher.findDeveloperImage(dsDir.toFile(), "6.1.1", "10A123"));
assertEquals(f612, AppLauncher.findDeveloperImage(dsDir.toFile(), "6.1.2", "10A123"));
assertEquals(f703_11B508, AppLauncher.findDeveloperImage(dsDir.toFile(), "7.0.3", "12C123"));
assertEquals(f70_11A465, AppLauncher.findDeveloperImage(dsDir.toFile(), "7.0.2", "12C123"));
// finding not exact match
assertEquals(f812_13B812, AppLauncher.findDeveloperImage(dsDir.toFile(), "8.1.3", "14C710"));
assertEquals(f812_13B812, AppLauncher.findDeveloperImage(dsDir.toFile(), "8.2", "14C710"));
assertEquals(f92, AppLauncher.findDeveloperImage(dsDir.toFile(), "9.3.3", "15C710"));
assertEquals(f92, AppLauncher.findDeveloperImage(dsDir.toFile(), "9.3", "15C710"));
assertEquals(f102, AppLauncher.findDeveloperImage(dsDir.toFile(), "10.3.5", "15C710"));
assertEquals(f102, AppLauncher.findDeveloperImage(dsDir.toFile(), "10.3", "15C710"));
}

}