Post

Replies

Boosts

Views

Activity

Premature DeviceActivityEvent Triggering
Our app monitors device usage and applies a shield when the set time limit is reached. Multiple DeviceActivitySchedules can be present, each with different time limits. To display notifications at 50% of the total limit for each DeviceActivitySchedule, we set a warning time at half of the total time. However, we occasionally receive premature event callbacks. For example, consider a schedule from 13:00 to 13:30 with a single event threshold at 10 minutes and a warning time of 5 minutes. The 'eventDidReachThreshold' callback is delivered prematurely, along with the 'eventWillReachThresholdWarning' callback, at 13:10. Additionally, in some cases, when one DeviceActivitySchedule ends and the next begins immediately, DeviceActivityEvents registered for the new DeviceActivitySchedule are delivered prematurely along with the schedule start callback. For example, consider there are two DeviceActivitySchedules from 12:00 to 13:00 and from 13:00 to 14:00, each with a limit of 10 minutes and a warning time of 5 minutes. When the first schedule ends and the next begins at 13:00, the 'eventDidReachThreshold' callbacks for the events registered in the second schedule are delivered prematurely, along with the 'intervalDidStart' callback.
1
0
73
10h
Inconsistency in the DeviceActivityEvent callbacks
We are using the Apple ScreenTime API for monitoring the usage of device. As mentioned in the documentation (https://developer.apple.com/documentation/familycontrols), we are getting the family controls authorisation from the user. We also have added the ‘DeviceActivityMonitor’ app extension (https://developer.apple.com/documentation/deviceactivity/deviceactivitymonitor) to receive the schedule and event callbacks. We have a requirement in which we have to notify the user for every 15 minutes usage of the device in the specified interval. He can optionally select individual categories or applications for the 15 minutes notification. For monitoring the usage for individual categories or applications, we obtain the token by presenting the FamilyActivityPicker as discussed in this documentation https://developer.apple.com/documentation/familycontrols/familyactivitypicker. For simplicity in testing during the development phase, we reduced the 15 minutes to 2 minutes. The events callbacks are expected to be delivered as soon as the threshold is reached but there are some inconsistencies with the event threshold callbacks. Sometimes the event callbacks are deferred and delivered together, sometimes the event callbacks are not delivered at all, sometimes a few event callbacks are missed etc.
3
2
658
Jun ’24
Family controls - unable to delete the app
We are developing an application that utilizes the Screen Time API. As outlined in Apple's documentation on family controls (https://developer.apple.com/documentation/familycontrols/), we obtain authorization using 'AuthorizationCenter.shared.requestAuthorization(for: .child)'. As mentioned in the documentation, once the app is authorized for family controls, users should not be able to delete the app without providing the parent iCloud credentials. In some unknown cases, the prompt to enter the parent iCloud credentials when deleting the app is not appearing, preventing users from uninstalling the app. Note: The device had an active internet connection when the issue occurred. Device details: iPad 9, iPadOS 15.6.1
0
0
374
Nov ’23
Able to delete the app without parent iCloud account
We are developing an application that utilizes the Screen Time API. As outlined in Apple's documentation on family controls(https://developer.apple.com/documentation/familycontrols/), we are obtaining authorization as follows: Task(priority: .high) {                 do {                     try await AuthorizationCenter.shared.requestAuthorization(for: .child)                     NSLog("Authorization State ~ AUTHORIZED")                 }catch let error {                     NSLog("Authorization ERROR: \(error.localizedDescription)")                 }             } As mentioned in the documentation, once the app is authorized for family controls, the user should not be able to delete the app without giving the parent iCloud credentials. When deleting the app, the prompt for entering the parent iCloud credentials is shown sometimes and in some unknown cases, the prompt is not shown and the app is deleted without requiring the parent’s iCloud account.
1
0
529
Sep ’23
Ask to Buy not working with Network extension
We are working on an app that uses network extension(https://developer.apple.com/documentation/networkextension) with content filter. Our app filters both browser and socket flows. The NEFilterProviderConfiguration has both ‘filterBrowsers’ and ‘filterSockets’ set to true as given below. NEFilterManager.shared().loadFromPreferences { error in if let error { NSLog("Preferences load error: \(error.localizedDescription)") return } let newFilterConfig = NEFilterProviderConfiguration() newFilterConfig.filterBrowsers = true newFilterConfig.filterSockets = true NEFilterManager.shared().providerConfiguration = newFilterConfig //enabling content filter NEFilterManager.shared().isEnabled = true //saving the preference NEFilterManager.shared().saveToPreferences { error in if let error { NSLog("Preference save error: \(error.localizedDescription)") return } } } In the context of Family Sharing, we have established a group comprising one parent and two children, aged 4 and 15, and have enabled the 'Ask to Buy' feature for both children. When attempting to install an app from the App Store on a device linked to one of the child's iCloud accounts, a pop-up appears, guiding us to initiate the app installation request. However, upon initiating the request from the child's device, we expected the app installation notification to appear on the Apple device associated with the parent's iCloud account. Unfortunately, the notification is not received on the parent's device. It's worth noting that app installation request notifications are displayed on the parent's device if we set the 'filterSockets' parameter of the NEFilterProviderConfiguration to false. NEFilterDataProvider All the flows received in the ‘NEFilterDataProvider’ are allowed. override func handleNewFlow(_ flow: NEFilterFlow) -> NEFilterNewFlowVerdict { return .allow() } Child Device details: iPad (8th generation), iPadOS 16.7
5
1
754
Sep ’23