Bug in DeviceActivity

I am developing an app using DeviceActivity.

let schedule =  DeviceActivitySchedule(
            intervalStart: DateComponents(hour : 0, minute : 0, second: 1),
            intervalEnd: DateComponents(hour : 23, minute : 59, second: 59),
            repeats: true 
)

I found that on the second day, intervalDidStart(for: DeviceActivityName) gets called multiple times.

I also tried

let schedule =  DeviceActivitySchedule(
            intervalStart: DateComponents(hour : 0, minute : 0, second: 1),
            intervalEnd: DateComponents(hour : 23, minute : 59, second: 59),
            repeats: false 
)

and started monitoring for the next day in the intervalDidEnd(for: DeviceActivityName) method.

but , intervalDidStart(for: DeviceActivityName) still gets called multiple times.

How should I resolve this issue?

Bug in DeviceActivity
 
 
Q