diff --git a/SimDeploy/SMSimulatorModel.m b/SimDeploy/SMSimulatorModel.m index 0d4b643..8cbf0d3 100644 --- a/SimDeploy/SMSimulatorModel.m +++ b/SimDeploy/SMSimulatorModel.m @@ -199,6 +199,15 @@ - (void)installApplication:(SMAppModel *)app upgradeIfPossible:(BOOL)shouldUpgra error = nil; } + // Create some initial subdirectories to mimic Xcode's setup + for (NSString *subdir in @[@"tmp", @"Documents", @"Library/Caches"]) { + NSString *tmpPath = [destinationGUIDPath stringByAppendingPathComponent:subdir]; + if (NO == [fm createDirectoryAtPath:tmpPath withIntermediateDirectories:YES attributes:nil error:&error]) { + NSLog(@"Error creating directory %@: %@", tmpPath, error); + error = nil; + } + } + // Invalidate old application list self.userApplications = nil;