Hi,
Problem: Even after successful schedule creation I am not getting call backs(intervalDidStart, intervalDidEnd) to my extension
I have created DeviceActivityMonitor extension by creating call Directory Extension and updated info plist with the value (com.apple.deviceactivity.monitor-extension) and updated principal class value too.
I try running the extension on my demo app which has the below code,
let schedule = DeviceActivitySchedule(
intervalStart: DateComponents(hour: 10, minute: 30),
intervalEnd: DateComponents(hour: 12, minute: 15),
repeats: true,
warningTime: nil)
do {
let center = DeviceActivityCenter()
center.stopMonitoring([.daily])
try center.startMonitoring(.daily, during: schedule)
print("Schedule created")
print(center.activities)
} catch {
print(error)
}
}
My extension has the below code,
override func intervalDidStart(for activity: DeviceActivityName) {
super.intervalDidStart(for: activity)
print("Entered Did Start")
}
override func intervalDidEnd(for activity: DeviceActivityName) {
super.intervalDidEnd(for: activity)
print("Entered Did End")
}
Please guide me to find out the issue.
Thanks in advance.
Post
Replies
Boosts
Views
Activity
Hi Team,
I am creating test app with screen time API, after the successful authorization(as child), I tried to turn off screen time under the option available in App.
Please find the steps below to repro the crash,
Open Settings App after successful authorization
Search for the App you have authorized
Try turn off the "Screen Time Restriction Settings", it'll turn off
Now go to your app
Again open the settings app and try to enable the "Screen Time Restriction Settings"
Now settings app will get crash.
Device : iPad Pro(10.5 inch), iPadOS 16.0 beta
Hi Team,
I have created single app project with Family controls capabilities and added respected framework. Once it's done I am not able to see App scheme in Active scheme area. When I try to run the project, Choose app to run pop-up getting shown.
Any help on this please?
Hi,
I am trying to use screen time along with MDM, unfortunately I'm not able to install MDM profile.
Is there any rules saying MDM and screen time can't co-exist?
Thanks