Closed wwwguy closed 1 month ago
Did you request permissions?
Yes, I didn't include it in the repo to simplify things but when we use the following as a precursor to setting the badge value it does not work:
const result = await Badge.checkPermissions().then(async response => { console.log(JSON.stringify(response)); const set = async () => { await Badge.set(5); }; });
It does log that permission was granted:
{"display":"granted"}
But the app icon badge does not display.
Alright, i need to debug it. Your reproduction does not work. You just added a app.component.ts
file without any reference. Please provide a functional Minimal, Reproducible Example using this template in a public GitHub repository.
Ok no problem - I have updated the repo - https://github.com/wwwguy/cap-badge
You are not using the template I provided a link to. Angular is not needed to reproduce the issue, is it?
I'm just providing the minimal reproducible example code in use with Ionic Capacitor apps v 6.0. We can remove angular if you want (maybe it will work then?) but just reporting this as it used to work fine in previous versions.
As i said, please provide a Minimal, Reproducible Example using this template in a public GitHub repository.
Thanks anyway... it really does no good to strip it all the way down to such a minimal test environment that it has no reflection on actual use on a live iOS device through Ionic Capacitor w/Angular. We were just trying to help as we've used this plugin for many years and versions of Capacitor without any problems... yet now it no longer works on iOS. All good, we'll find another solution or just build our own. Be well.
The more code and dependencies your reproducible example has, the longer it will take me to understand and reproduce the problem. It should therefore be in your interest to make it as easy as possible for me to help you. It wouldn't be possible to offer more than 25 plugins for free if I didn't get support from the community. I am closing this issue as no minimal, reproducible example has been provided.
Plugin(s)
Version
6.0.0
Platform(s)
Current behavior
Following the the standard docs, everything works fine on Android but the app icon badge number is not changed on iOS.
Expected behavior
The app icon badge number should change on iOS when Badge.set() is called (and works fine on Android).
Reproduction
https://github.com/wwwguy/cap-badge
Steps to reproduce
Other information
The PrivacyInfo.xcprivacy file was created via xCode per the documentation;
Capacitor doctor
š Capacitor Doctor š
Latest Dependencies:
@capacitor/cli: 6.1.2 @capacitor/core: 6.1.2 @capacitor/android: 6.1.2 @capacitor/ios: 6.1.2
Installed Dependencies:
@capacitor/cli: 6.1.2 @capacitor/android: 6.1.2 @capacitor/core: 6.1.2 @capacitor/ios: 6.1.2
[success] iOS looking great! š [success] Android looking great! š
Before submitting