NedaaDevs / nedaa

Muslims prayer times app in Flutter
3 stars 1 forks source link

Issue with WorkManager for Local Notifications on iOS #51

Open burhanaksendir opened 2 weeks ago

burhanaksendir commented 2 weeks ago

As-salamu alaykum brothers,

First of all, thank you for this useful project. I'm working with WorkManager for local notifications on Android, but it doesn't seem to work on iOS. Have you encountered this issue as well? I would greatly appreciate any assistance you can provide on this matter.

Amjad50 commented 2 weeks ago

Walaikumassalam.

Can you share what's the issue you are facing? Is this Nedaa issue or is this another project?

burhanaksendir commented 2 weeks ago

@Amjad50 Thanks. I downloaded your project and tested it on iOS and Android devices. The workmanager you used works flawlessly on Android. However, I did not see it working on iOS. Is there any extra configuration I need to do?

F2had commented 2 weeks ago

@Amjad50 Thanks. I downloaded your project and tested it on iOS and Android devices. The workmanager you used works flawlessly on Android. However, I did not see it working on iOS. Is there any extra configuration I need to do?

do you mean that worker manager is not triggering the job in the background? if so, if I am not mistaken while implementing this I read that background jobs on ios works depending on how often the user interacts with your app, so its not granted to always trigger. you can read about it here. And for us the only way we tested it was using xcode with simulating background fetch here. if you know of a way we can enhance on this or you can please do so.

burhanaksendir commented 2 weeks ago

@F2had Yes, I'm referring to implementing a periodic task in the background on the iOS side to update local notifications every 2 days. Thank you for your response. I managed to get it working as desired in the end. I've submitted a PR

F2had commented 2 weeks ago

@F2had

Yes, I'm referring to implementing a periodic task in the background on the iOS side to update local notifications every 2 days. Thank you for your response. I managed to get it working as desired in the end. I've submitted a PR

@burhanaksendir Glad you managed to do it & thank you Burhan for the PR. Will check it out once I get on my laptop.

burhanaksendir commented 2 weeks ago

@F2had Thanks. Please follow these steps:
flutter clean flutter pub get, and flutter build ios.

Then try testing again.