Skip to content

Commit 8a66324

Browse files
authored
Merge pull request #352 from zaferatli/feature/mocklocationIos
Feature/mocklocation ios
2 parents aac33a8 + a117463 commit 8a66324

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

JailMonkey/JailMonkey.mm

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,18 @@ - (BOOL)canMockLocation{
323323
return YES;
324324
#endif
325325

326+
if (@available(iOS 15.0, *)) {
327+
CLLocationManager *locationManager = [[CLLocationManager alloc] init];
328+
CLLocation *location = locationManager.location;
329+
330+
if (location.sourceInformation != nil) {
331+
if (location.sourceInformation.isSimulatedBySoftware ||
332+
location.sourceInformation.isProducedByAccessory) {
333+
return YES;
334+
}
335+
}
336+
}
337+
326338
return [self isJailBroken];
327339
}
328340

0 commit comments

Comments
 (0)