Capacitor Version
Capacitor Doctor
Latest Dependencies:
@capacitor/cli: 8.5.1
@capacitor/core: 8.5.1
@capacitor/android: 8.5.1
@capacitor/ios: 8.5.1
Installed Dependencies:
@capacitor/core: 8.4.0
@capacitor/android: 8.4.0
@capacitor/cli: 8.4.0
@capacitor/ios: 8.4.0
@capacitor/push-notifications: 8.0.3
[success] Android looking great! 👌
[error] Xcode is not installed
Other API Details
npm --version output: 11.12.1
node --version output: 24.16.0
Platforms Affected
Current Behavior
If we call register immediatly after having called unregister, we get the already existing token again.
This behaviour can be reproduced every second time this sequence is called.
await PushNotifications.addListener('registration', (token: Token) => {...});
await PushNotifications.unregister();
await PushNotifications.register();
Expected Behavior
We get a new Token everytime we call await PushNotifications.register();
Project Reproduction
https://stackblitz.com/edit/angular-4zsdop-napdpb7a?file=src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.component.html
Additional Information
The reproduction is only theoretical since a real setup requires a running Android System.
In our App we would like to give the User the option to exchange the existing token with a new one.
Capacitor Version
Capacitor Doctor
Latest Dependencies:
@capacitor/cli: 8.5.1
@capacitor/core: 8.5.1
@capacitor/android: 8.5.1
@capacitor/ios: 8.5.1
Installed Dependencies:
@capacitor/core: 8.4.0
@capacitor/android: 8.4.0
@capacitor/cli: 8.4.0
@capacitor/ios: 8.4.0
@capacitor/push-notifications: 8.0.3
[success] Android looking great! 👌
[error] Xcode is not installed
Other API Details
Platforms Affected
Current Behavior
If we call register immediatly after having called unregister, we get the already existing token again.
This behaviour can be reproduced every second time this sequence is called.
Expected Behavior
We get a new Token everytime we call
await PushNotifications.register();Project Reproduction
https://stackblitz.com/edit/angular-4zsdop-napdpb7a?file=src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.component.html
Additional Information
The reproduction is only theoretical since a real setup requires a running Android System.
In our App we would like to give the User the option to exchange the existing token with a new one.