I have an array of activities that need to be run at a specific time. The run in a background helper app. The array is sorted on date/time.
At 12:08:51 I add a new item in the array.. to run at 12:12. Upon creation the array is sorted again and the closest is added as an activity to a NSBackgroundActivityScheduler.
However it runs at creation and a few times more before 12:12. The next automation Normal doesn't run at creation as activity (activity Normal is already in the array of activities).
Why is this happening? And how can I fix it?
Log: 12:12:15.664819+0200 Next Automation Normal on 2021-04-15 08:50:00 +0000
Code: }
1
0
1.3k