Skip to content

Commit

Permalink
Setup device with the new clientId after validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
maratal committed Jan 14, 2024
1 parent e22d9b5 commit 1873d81
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Source/ARTPushActivationState.m
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ @implementation ARTPushActivationPersistentState
} else if ([local apnsDeviceToken]) {
[machine sendEvent:[ARTPushActivationEventGotPushDeviceDetails new]];
}
[machine.rest setupLocalDevice_nosync];
[machine registerForAPNS];
#endif

return [ARTPushActivationStateWaitingForPushDeviceDetails newWithMachine:machine logger:logger];
Expand All @@ -116,10 +118,6 @@ - (ARTPushActivationState *)transition:(ARTPushActivationEvent *)event {
return self;
}
else if ([event isKindOfClass:[ARTPushActivationEventCalledActivate class]]) {
#if TARGET_OS_IOS
[self.machine.rest setupLocalDevice_nosync];
#endif
[self.machine registerForAPNS];
return validateAndSync(self.machine, event, self.logger);
}
return nil;
Expand Down

0 comments on commit 1873d81

Please sign in to comment.