Skip to content

Commit

Permalink
fix(setLocation): deliver new location notifications immediately. (#97)
Browse files Browse the repository at this point in the history
By setting `deliverImmediately` option to be truthy.
  • Loading branch information
asafkorem authored Jul 13, 2022
1 parent b3b73a7 commit b17ca2e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions applesimutils/applesimutils/SetSimulatorLocation.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ + (void)clearLocationForSimulatorUDIDs:(NSArray<NSString *> *)udids {
/// Simulator app (without AppleSimUtils).
+ (void)postNewLocationNotification:(NSDictionary *)info {
auto notificationCenter = NSDistributedNotificationCenter.defaultCenter;
[notificationCenter postNotificationName:kLocationNotificationName object:nil userInfo:info];
[notificationCenter postNotificationName:kLocationNotificationName object:nil userInfo:info];

for (uint i = 0; i < 2; i ++) {
[notificationCenter postNotificationName:kLocationNotificationName object:nil userInfo:info
deliverImmediately:YES];
}
}

@end

0 comments on commit b17ca2e

Please sign in to comment.