Skip to content

Commit

Permalink
Merge pull request #23 from shankari/revert_broken_fix
Browse files Browse the repository at this point in the history
Add a more principled fix for the transition notify crash
  • Loading branch information
shankari authored Apr 4, 2020
2 parents 2d577c7 + 88cc83f commit ea62c2a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/ios/BEMTransitionNotifier.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,7 @@ - (void)pluginInitialize
- (void)fireGenericTransitionFor:(NSString*) transition withUserInfo:(NSDictionary*) userInfo {
[LocalNotificationManager addNotification:[NSString stringWithFormat:@"Received platform-specific notification %@", transition] showUI:FALSE];

TripDiaryStateMachine* instance = [TripDiaryStateMachine instance];
if (instance == NULL) {
[LocalNotificationManager addNotification:@"Unable to access state machine instance, must be recursive call on startup, bailing"];
return;
}
if ([TripDiaryStateMachine instance].currState == kWaitingForTripStartState &&
([transition isEqualToString:CFCTransitionExitedGeofence] ||
if (([transition isEqualToString:CFCTransitionExitedGeofence] ||
[transition isEqualToString:CFCTransitionVisitEnded])) {
NSDictionary* autogenData = [self getTripStartData];
return [self postNativeAndNotify:TRIP_STARTED withData:autogenData];
Expand Down

0 comments on commit ea62c2a

Please sign in to comment.