Skip to content

Commit 2e13341

Browse files
committed
Fixes #125 - Uncaught Exception 'NSInvalidArgumentException'.
Updated other error messaging in LoadSimulatorFramework as well (same function as fix)
1 parent a110ec9 commit 2e13341

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Source/iPhoneSimulator.m

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,27 +71,27 @@ -(void) LoadSimulatorFramework:(NSString*) developerDir {
7171
NSBundle* dvtFoundationBundle =
7272
[NSBundle bundleWithPath:dvtFoundationPath];
7373
if (![dvtFoundationBundle load]){
74-
nsprintf(@"Unable to dvtFoundationBundle. Error: ");
74+
nsprintf(@"Unable to dvtFoundationBundle %@", dvtFoundationPath);
7575
exit(EXIT_FAILURE);
7676
return ;
7777
}
7878
NSString* devToolsFoundationPath = [developerDir stringByAppendingPathComponent:kDevToolsFoundationRelativePath];
7979
NSBundle* devToolsFoundationBundle =
8080
[NSBundle bundleWithPath:devToolsFoundationPath];
8181
if (![devToolsFoundationBundle load]){
82-
nsprintf(@"Unable to devToolsFoundationPath. Error: ");
82+
nsprintf(@"Unable to devToolsFoundationPath %@", devToolsFoundationPath);
8383
return ;
8484
}
8585
NSString* coreSimulatorPath = [developerDir stringByAppendingPathComponent:kCoreSimulatorRelativePath];
8686
if ([[NSFileManager defaultManager] fileExistsAtPath:coreSimulatorPath]) {
8787
NSBundle* coreSimulatorBundle = [NSBundle bundleWithPath:coreSimulatorPath];
8888
if (![coreSimulatorBundle load]){
89-
nsprintf(@"Unable to coreSimulatorPath. Error: ");
89+
nsprintf(@"Unable to coreSimulatorPath %@", coreSimulatorPath);
9090
return ;
9191
}
9292
}
9393
// Prime DVTPlatform.
94-
NSError* error;
94+
NSError* error = nil;
9595
Class DVTPlatformClass = [self FindClassByName:@"DVTPlatform"];
9696
if (![DVTPlatformClass loadAllPlatformsReturningError:&error]) {
9797
nsprintf(@"Unable to loadAllPlatformsReturningError. Error: %@",[error localizedDescription]);
@@ -103,10 +103,9 @@ -(void) LoadSimulatorFramework:(NSString*) developerDir {
103103
}
104104
NSBundle* simBundle = [NSBundle bundleWithPath:simBundlePath];
105105
if (![simBundle load]){
106-
nsprintf(@"Unable to load simulator framework. Error: %@",[error localizedDescription]);
106+
nsprintf(@"Unable to load simulator bundle %@", simBundlePath);
107107
return ;
108108
}
109-
return ;
110109
}
111110

112111
NSString* GetXcodeVersion() {

0 commit comments

Comments
 (0)