feat: Enable iOS push notifications and improve APNS token retrieval.
This commit is contained in:
1 parent
b4bcc8f498
commit
1e70b9e09f
3 files changed
+10
-3
No files matched your search
@@ -62,11 +62,11 @@ class NotificationService {
|
||||
if (Platform.isIOS) {
|
||||
String? apnsToken = await _firebaseMessaging.getAPNSToken();
|
||||
int retries = 0;
|
||||
while (apnsToken == null && retries < 3) {
|
||||
while (apnsToken == null && retries < 10) {
|
||||
LoggerService.info(
|
||||
'Waiting for APNS token... (Attempt ${retries + 1}/3)',
|
||||
'Waiting for APNS token... (Attempt ${retries + 1}/10)',
|
||||
);
|
||||
await Future.delayed(const Duration(seconds: 1));
|
||||
await Future.delayed(const Duration(seconds: 2));
|
||||
apnsToken = await _firebaseMessaging.getAPNSToken();
|
||||
retries++;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user