[iOS 17.4] Default value for DeviceActivityEvent's includesPastActivity should be set to true

Starting with iOS 17.4, the DeviceActivityEvent initializer includes a new parameter named includesPastActivity.

The default value for this parameter is set to false, whereas device activity events have behaved as though this parameter were set to true up until now.

This breaking change is a MAJOR ISSUE for developers who used device activity events in their apps before iOS 17.4 because their apps might not work the way they intended after the update. They'll have to release new app versions that specifically set includesPastActivityto true.

In my opinion, the default value for includesPastActivity should be true to avoid disrupting events scheduled on older versions of iOS.

I have filed an enhancement report (FB13573556) about this. I really hope this is changed before the official iOS 17.4 release.

Omg, thanks for sharing this @thomas_maht. I noticed this issue yesterday and have spent 4-5 hours trying to figure out why the event threshold was resetting.

+1

Thank you for bringing this up!

I posted (a much less clear explanation than this post) of encountering this issue: https://developer.apple.com/forums/thread/748542?page=1#782949022

Curious if there is a place where changes like this "includesPastActivity" in 17.4 can be tracked on a single website/feed/notes/whatever — this flag is not included in the official "iOS & iPadOS 17.4 Release Notes". How a dev can know what changed?

For me if I set the includesPastActivity to false it doesn't even seem to work sometimes. The process responsible for firing the events seems to not take in account app usage.

I've filed a feedback report: FB15220094. It contains a more detailed explanation of the issue with logs showing exactly what is happening.

[iOS 17.4] Default value for DeviceActivityEvent's includesPastActivity should be set to true
 
 
Q