Skip to content

Commit 940234e

Browse files
authored
Merge pull request #60 from fr0l/xcode11Location
Fix location of com.apple.locationd.plist for Xcode 11
2 parents 8aadcc7 + 993aa83 commit 940234e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

applesimutils/applesimutils/SetLocationPermission.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ static void startStopLocationdCtl(NSString* simulatorId, BOOL stop)
2020
devTools = [[SimUtils developerURL] URLByAppendingPathComponent:@"Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/LaunchDaemons/com.apple.locationd.plist"];
2121
}
2222

23+
if ([fileManager fileExistsAtPath:devTools.path] == NO)
24+
{
25+
devTools = [[SimUtils developerURL] URLByAppendingPathComponent:@"Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/LaunchDaemons/com.apple.locationd.plist"];
26+
}
27+
2328
NSTask* rebootTask = [NSTask new];
2429
rebootTask.launchPath = [SimUtils xcrunURL].path;
2530
rebootTask.arguments = @[@"simctl", @"spawn", simulatorId, @"launchctl", stop ? @"unload" : @"load", devTools.path];

0 commit comments

Comments
 (0)