[Bug] DeleteTokenAsync receives a new token immediately in iOS
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- csharp, ios, unity
- Domain
- mobile-dev
Research direction
Reproduce on Unity 2020.3.23f1 with Firebase Unity SDK 8.6.2, targeting iOS with IL2CPP, using the Info.plist setting and DeleteTokenAsync sequence shown in the issue. Read the interaction between TokenRegistrationOnInitEnabled and DeleteTokenAsync; done means deleting the token does not immediately produce a new token or allow push delivery to continue, while Android behavior remains unchanged.
Written by the indexing model from the issue text.
Description
[REQUIRED] Please fill in the following fields:
- Unity editor version: 2020.3.23f1
- Firebase Unity SDK version: 8.6.2
- Source you installed the SDK: Unity Package Manager
- Problematic Firebase Component: messaging
- Other Firebase Components in use: app, installations
- Additional SDKs you are using: none
- Platform you are using the Unity editor on: Mac
- Platform you are targeting: iOS
- Scripting Runtime: IL2CPP
[REQUIRED] Please describe the issue here:
I've tried to handle push notification on/off in iOS.
I expected to delete FCM Token to turn push notification off.
Even though TokenRegistrationOnInitEnabled value is False, FCM token is received automatically and immediately after DeleteTokenAsync.
Log
FCM: new registration token received
FCM: Retrieve registration token
So. I could not delete FCM Token. It seems like refresh Token, not Delete.
After quit my app, Push Notification is still received.
Plz fix the logic where refresh automatically FCM token.
On Android, DeleteTokenAsync works well. It does not fetch the new token immediately after DeleteTokenAsync.
Relevant Code:
Here is my code.
// I've put this pair into my Info.plist:
// <key>FirebaseMessagingAutoInitEnabled</key><false/>
// So, 'Firebase.Messaging.FirebaseMessaging.TokenRegistrationOnInitEnabled' is False.
Firebase.Messaging.FirebaseMessaging.TokenReceived -= OnTokenReceived;
Firebase.Messaging.FirebaseMessaging.MessageReceived -= OnMessageReceived;
Firebase.Messaging.FirebaseMessaging.DeleteTokenAsync();
- Dominant language
- C#
- Stars
- 923
- Forks
- 456
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from firebase/quickstart-unity
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
firebase/quickstart-unity#1448 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
firebase/quickstart-unity#1432 · 1 comment ·
-
new
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
firebase/quickstart-unity#1411 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
firebase/quickstart-unity#1403 · 1 comment ·
-
Firebase or specific Android versions trigger app_clear_data on first_open, disrupting our funnel Opennew
Difficulty 4/5 3-5 days Newbie friendliness 25/100
firebase/quickstart-unity#1390 · 1 comment ·
All issues in firebase/quickstart-unity
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·