Hi folks!
Please help me to clarify some things related to Screen Time API.
What the keys differences between individual and child authorization? With individual type of auth user can do sign-out from iCloud and delete the app. What else differentiate this type of users?
Can we use DeviceActivityEvent for remote control with individual auth?
Can the parental or guardian see/get the statistic of apps usage?
Is the individual auth available to all users or just those who are in the Apple's family?
I'll really appreciate any help and answer! Thank you in advance!
Managed Settings
RSS for tagSet restrictions for certain settings, such as locking accounts in place, preventing password modification, filtering web traffic, and shielding apps.
Posts under Managed Settings tag
105 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Hello! I believe there is a bug: ShieldConfigurationDataSource extension does not update when the app to be blocked is already open and the ManagedSettingsStore.shield.applications is set to the app that is already open. The shield comes up but has a stale ShieldConfiguration not reflecting the current state of the app is used.
I've been able to replicate the issue in an independent app "OffScreen". If you start a blocking time range from 10:00-10:15, it will say "No Twitter until 10:15" and then open Twitter at 10:15. If there is another blocking time range from 10:16-10:31, the app will be open until 10:16 when the shield will reactivate and it will still say "No Twitter until 10:15" when is should say "No Twitter until 10:31".
thanks!
When I tap on one of the buttons in the ShieldAction extension I want to close the shield and open the parent app instead of the shielded app. Is there any way of doing this using the Screen Time API?
class ShieldActionExtension: ShieldActionDelegate {
override func handle(action: ShieldAction, for application: ApplicationToken, completionHandler: @escaping (ShieldActionResponse) -> Void) {
// Handle the action as needed.
let store = ManagedSettingsStore()
switch action {
case .primaryButtonPressed:
//TODO - open parent app
completionHandler(.defer)
case .secondaryButtonPressed:
//remove shield
store.shield.applications?.remove(application)
completionHandler(.defer)
@unknown default:
fatalError()
}
}
}
I've followed along with the Screen Time API demos (https://developer.apple.com/videos/play/wwdc2021/10123/)
Also followed along with this guide, which is essentially the same:
https://www.folio3.com/mobile/blog/screentime-api-ios/
I'm able to restrict access to apps/categories with the FamilyActivityPicker and FamilyActivitySelection.
I can set a DeviceActivitySchedule, and then use DeviceActivityCenter to start monitoring it.
I can tell that the schedule is working, because MyMonitor:intervalDidStart() does get called, and it works except for the restricting of apps/categories/webCategories.
It's as if MyModel does not have any values set from within MyMonitor. I've confirmed that MyModel does have the correct FamilyActivitySelection apps etc, everywhere else in my Target, before and after the MyMonitor:intervalDidStart() gets called.
MyMonitor is in a separate target called MonitorExtension, that I created using the Device Activity Monitor Extension template. But I made sure to set the Target Membership of MyModel to both my main target, and my extension target.
I have set NSExtensionPrincipalClass to $(PRODUCT_MODULE_NAME).MyMonitor, as suggested.
I have added MyModel.swift to the Compiled Sources in my extensions Build Phases.
I have edited my apps build scheme, to make sure the extension target is also built.
One more interesting thing is that debugger breakpoints and print statements do not work from within my extension. I've even tried caching a string from within MyMonitor:intervalDidStart, and tried to retrieve it afterwards in my main target, but it is nil.
Still, I've confirmed that intervalDidStart was actually called by adding any removing store.application.denyAppInstallation = true, and having it work correctly.
I've spent so much time on this problem, any help would be massive..
Here are the files I've referenced:
import UIKit
import MobileCoreServices
import ManagedSettings
import DeviceActivity
class MyMonitor: DeviceActivityMonitor {
let store = ManagedSettingsStore()
override func intervalDidStart(for activity: DeviceActivityName) {
super.intervalDidStart(for: activity)
let model = MyModel.shared
let applications = model.selectionToDiscourage.applicationTokens
let categories = model.selectionToDiscourage.categoryTokens
let webCategories = model.selectionToDiscourage.webDomainTokens
if applications.isEmpty {
print("No applications to restrict")
} else {
store.shield.applications = applications
}
if categories.isEmpty {
print("No categories to restrict")
} else {
store.shield.applicationCategories = ShieldSettings.ActivityCategoryPolicy.specific(categories, except: Set())
}
if webCategories.isEmpty {
print("No web categories to restrict")
} else {
store.shield.webDomains = webCategories
}
store.dateAndTime.requireAutomaticDateAndTime = true
store.account.lockAccounts = true
store.passcode.lockPasscode = true
store.siri.denySiri = true
store.appStore.denyInAppPurchases = true
store.appStore.maximumRating = 200
store.appStore.requirePasswordForPurchases = true
store.media.denyExplicitContent = true
store.gameCenter.denyMultiplayerGaming = true
store.media.denyMusicService = true
store.application.denyAppInstallation = true
}
override func intervalDidEnd(for activity: DeviceActivityName) {
super.intervalDidEnd(for: activity)
store.shield.applications = nil
store.shield.applicationCategories = nil
store.shield.webDomains = nil
store.dateAndTime.requireAutomaticDateAndTime = false
store.account.lockAccounts = false
store.passcode.lockPasscode = false
store.siri.denySiri = false
store.appStore.denyInAppPurchases = false
store.appStore.maximumRating = 1000
store.appStore.requirePasswordForPurchases = false
store.media.denyExplicitContent = false
store.gameCenter.denyMultiplayerGaming = false
store.media.denyMusicService = false
store.application.denyAppInstallation = false
}
}
import Foundation
import FamilyControls
import DeviceActivity
import ManagedSettings
class MyModel: ObservableObject {
static let shared = MyModel()
let store = ManagedSettingsStore()
private init() {}
var selectionToDiscourage = FamilyActivitySelection() {
willSet {
let applications = newValue.applicationTokens
let categories = newValue.categoryTokens
let webCategories = newValue.webDomainTokens
store.shield.applications = applications.isEmpty ? nil : applications
store.shield.applicationCategories = ShieldSettings.ActivityCategoryPolicy.specific(categories, except: Set())
store.shield.webDomains = webCategories
}
}
func initiateMonitoring(scheduleStart: DateComponents, scheduleEnd: DateComponents) {
let schedule = DeviceActivitySchedule(intervalStart: scheduleStart, intervalEnd: scheduleEnd, repeats: true, warningTime: nil)
print(scheduleStart)
print(scheduleEnd)
let center = DeviceActivityCenter()
do {
try center.startMonitoring(.daily, during: schedule)
}
catch {
print ("Could not start monitoring \(error)")
}
store.dateAndTime.requireAutomaticDateAndTime = false
store.account.lockAccounts = false
store.passcode.lockPasscode = false
store.siri.denySiri = false
store.appStore.denyInAppPurchases = false
store.appStore.maximumRating = 1000
store.appStore.requirePasswordForPurchases = false
store.media.denyExplicitContent = false
store.gameCenter.denyMultiplayerGaming = false
store.media.denyMusicService = false
store.application.denyAppInstallation = false
}
}
extension DeviceActivityName {
static let daily = Self("daily")
}
import SwiftUI
import FamilyControls
struct AppPicker: View {
@StateObject var model = MyModel.shared
@State var isPresented = false
var body: some View {
Button("Select Apps to Discourage") {
isPresented = true
}
.familyActivityPicker(isPresented: $isPresented, selection: $model.selectionToDiscourage)
}
}
Hi, we are facing on a strange behaviour since iOS 16.
In a registration view, we have two text field to insert password (password textfield and confirm password text field).
Suggest strong password is abilitate (from iCloud... password & keychain).
When user tap on password text field, can choose between strong password or text custom password. If user choose custom password, can text his own password as usually. But when he tap the second text field (confirm password) Apple fill in automatic both text field, cleaning the first text field...
So user entry in a loop where he text password and when go next, previous textfield be cleaned and both text field filled with a new suggestion.
Searching on the web we don't find any solution to it. Also because we try just to set text fields as .password or .newPassword. But this behaviour is always the same.
Maybe is it a bug of iOS 16?
How we can allow user to chose a custom password if the system fill always in automatic the password text fields, every time he tap on them?
currently when I try to set several schedules to the same activity the latest schedule I set is the only one
I understand I can have only 1 schedule for activity. ?
I thought about setting a new schedule on the intervalDidEnd but, I get no interval did start if the current time is in the middle of the interval I set
For example, now it is 15:00, and my previous interval started at 14:00 and ends at 16:00 but the user sets a new interval from 14:30 - 16:40
I call the deviceActivityCenter.stopMonitoring([someActivityName]) and get noIntervalDidEnd event
Then I set the new interval successfully with deviceActivityCenter.startMonitoring(someActivityName, during: deviceActivitySchedule)
and get no intervalDidStartEvent
So how can I achieve several intervals?
If I had gotten the events of the start and end it would be possible
Thanks for the help
Hi there,
In rare cases (about 0.2% of the time?), I'm seeing calls to startMonitoring on an instance of DeviceActivityCenter throw an error with localizedDescription "couldn’t communicate with a helper application."
I am certain I am passing valid parameters to the startMonitoring call because sometimes a naive retry after a few seconds succeeds. Similarly, I am certain that FamilyControls permissions have been granted by the user.
Was hoping to get more color from the systems team on what some causes of this error are and if it is avoidable by the programmer.
Hi,
I'm trying to make use of the Device Activity Labels where you supply an ApplicationToken. I can successfully get it to show the icon + title of the Application (twitter in my case) but I cannot get the styling to work.
// Works
.labelStyle(.iconOnly)
.labelStyle(.titleOnly)
.border(...)
![]("https://developer.apple.com/forums/content/attachment/9660b578-a36f-4d5a-ae18-653a207aa5ab" "title=Screenshot 2023-03-12 at 12.57.34 PM.png;width=1218;height=844")
// Does NOT work
.font(.largeTitle)
.foregroundColor(.blue)
I have checked the same style (or just modifiers) against a standard Label and they actually do work in the code below.
// This is an application token. Some style not applied.
Label(targetApp)
.labelStyle(MyStyle())
// Showing the same style using a simple label. All styles correctly applied.
Label("Twitter", systemImage: "video.square.fill")
.labelStyle(MyStyle())
Is changing the font + color of the title for this Label(_ applicationToken:) supported?
Hi,
I'm having trouble understanding what is the correct DateComponents format for the DeviceActivityCenter.startMonitoring to work as expected.
Here's how it behaves with my setup:
The schedule interval is set for 15 minutes (the minimum).
On intervalDidStart I set the shields
shield.applicationCategories = .all(except: exclCat)
shield.webDomainCategories = .all(except: exclWeb)
On intervalDidEnd I clear the settings
shield.applicationCategories = nil
shield.webDomainCategories = nil
Different behavior with different DeviceActivitySchedule intervals. In the below examples I'll refer to hour, minute and second components as time components, and the calendar, timeZone, year, month, day, hour, minute and second components as date and time components.
Also, with all combinations below no errors are thrown when calling the startMonitoring method.
A. ❌ The start interval has time components, while the end interval has date and time components:
The intervalDidStart is not triggered.
DeviceActivitySchedule(schedule: <USDeviceActivitySchedule: 0x28354a5e0>
IntervalStart: <NSDateComponents: 0x2839c7f40> {
Hour: 9
Minute: 24
Second: 55
IntervalEnd: <NSDateComponents: 0x2839c7f70> {
Calendar: <CFCalendar 0x2818f9090 [0x1e4fb1d10]>{identifier = 'gregorian'}
TimeZone: Asia/Manila (GMT+8) offset 28800
Calendar Year: 2023
Month: 5
Leap Month: 0
Day: 15
Hour: 9
Minute: 39
Second: 55
Repeats: 0
WarningTime: (null))
B. ❌ The start interval has date and time components, while the end interval has time components:
Here, the opposite of the above example happens — the intervalDidStart is triggered, but the intervalDidEnd is not.
C. ❌ Both intervals have time components:
The intervalDidStart is not triggered.
D. ✅ Only hour, minute, and second components for both start and end intervals:
Callbacks are called as expected.
DeviceActivitySchedule(schedule: <USDeviceActivitySchedule: 0x282e80450>
IntervalStart: <NSDateComponents: 0x2822f39f0> {
Hour: 9
Minute: 12
Second: 15
IntervalEnd: <NSDateComponents: 0x2822f3a00> {
Hour: 9
Minute: 27
Second: 15
Repeats: 0
WarningTime: (null))
So it seems that the correct and working version is with the time components only.
However, from the documentation, the maximum schedule interval is a week.
So if I need to set the schedule starting from a certain time of day A and ending in a certain time of day B, what should the DateComponents look like?
Thanks for you help!
I created a ShieldConfigurationExtension in Xcode 14.3 with File > New > Target > ShieldConfigurationExtension. This created the extension with all the necessary Info.plist values (correct NSExtensionPrincipalClass, etc.), with the extension included in embedded content in the host app target.
No matter what I try, the extension is not getting invoked when I shield applications from my host app. The custom UI does not show as the shield, and looking at the debugger, an extension process is never invoked.
I am shielding categories like this:
let managedSettings = ManagedSettingsStore()
...
managedSettings.shield.applicationCategories = .all()
And my extension code overrides all the ShieldConfigurationDataSource functions.
class ShieldConfigurationExtension: ShieldConfigurationDataSource {
override func configuration(shielding application: Application) -> ShieldConfiguration {
return ShieldConfiguration(
backgroundBlurStyle: UIBlurEffect.Style.systemThickMaterial,
backgroundColor: UIColor.white,
icon: UIImage(systemName: "stopwatch"),
title: ShieldConfiguration.Label(text: "You are in a Present Session", color: .yellow)
)
}
override func configuration(shielding application: Application, in category: ActivityCategory) -> ShieldConfiguration {
return ShieldConfiguration(
backgroundBlurStyle: UIBlurEffect.Style.systemThickMaterial,
backgroundColor: UIColor.white,
icon: UIImage(systemName: "stopwatch"),
title: ShieldConfiguration.Label(text: "You are in a Present Session", color: .yellow)
)
}
override func configuration(shielding webDomain: WebDomain) -> ShieldConfiguration {
return ShieldConfiguration(
backgroundBlurStyle: UIBlurEffect.Style.systemThickMaterial,
backgroundColor: UIColor.white,
icon: UIImage(systemName: "stopwatch"),
title: ShieldConfiguration.Label(text: "You are in a Present Session", color: .yellow)
)
}
override func configuration(shielding webDomain: WebDomain, in category: ActivityCategory) -> ShieldConfiguration {
return ShieldConfiguration(
backgroundBlurStyle: UIBlurEffect.Style.systemThickMaterial,
backgroundColor: UIColor.white,
icon: UIImage(systemName: "stopwatch"),
title: ShieldConfiguration.Label(text: "You are in a Present Session", color: .yellow)
)
}
}
What am I missing?
Our app uses Cordova with a Cordova Local Webserver plugin. This plugin uses the url http://localhost: with a randomly chosen port. Some of the devices that our app runs on are MDM configured and have Content Filters enabled which only allows a finite list of website URLs to be accessed. This configuration has always worked in the past. Starting with the release of iPadOS 16.5, our app now hangs because the content filters are now preventing access to http://localhost. We've tried adding http://localhost, plus any derivative of that URL (i.e. http://localhost:, http://localhost:*, etc.) to the Allowed Website list, but this does not help.
Wondering if anyone else has encountered this issue.
I'm having trouble with my DeviceActivityMonitorExtension. The intervalDidStart function is not being called when the scheduler is created. Does anyone have an idea why this is?
let schedule = DeviceActivitySchedule(
intervalStart: DateComponents(hour: 15, minute: 23),
intervalEnd: DateComponents(hour: 16, minute: 55),
repeats: true
)
class MySchedule {
static public func setSchedule() {
let center = DeviceActivityCenter()
center.stopMonitoring([.daily])
do {
try center.startMonitoring(.daily, during: schedule)
} catch {
print("Error monitoring schedule: ", error)
}
}
}
class DeviceActivityMonitorExtension: DeviceActivityMonitor {
override func intervalDidStart(for activity: DeviceActivityName) {
super.intervalDidStart(for: activity)
SelectedApps.shared.setRestrictions()
}
private let _SelectedApps = SelectedApps()
class SelectedApps: ObservableObject{
@Published var selection: FamilyActivitySelection
let store = ManagedSettingsStore()
init() {
if let savedSelection = UserDefaults.standard.object(forKey: "savedSelection") as? Data {
let decoder = JSONDecoder()
if let loadedSelection = try? decoder.decode(FamilyActivitySelection.self, from: savedSelection) {
selection = loadedSelection
} else {
selection = FamilyActivitySelection(includeEntireCategory: true)
}
} else {
selection = FamilyActivitySelection(includeEntireCategory: true)
}
}
class var shared: SelectedApps {
return _SelectedApps
}
func setRestrictions(){
let applications = selection
store.shield.applications = applications.applicationTokens.isEmpty ? nil : applications.applicationTokens
store.shield.applicationCategories = applications.categoryTokens.isEmpty
? nil
: ShieldSettings.ActivityCategoryPolicy.specific(applications.categoryTokens)
}
I am creating a custom shield UI for when an app is blocked. have an AppDelegate file where my @UIApplicationMain is run
I pasted in the ShieldConfiguration code from the WWDC21 Meet Screen Time demo inside my app:
class MyShieldConfiguration: ShieldConfigurationDataSource {
override func configuration(shielding application: Application) -> ShieldConfiguration {
return ShieldConfiguration(
title: ShieldConfiguration.Label(text: "Doxo", color: UIColor.blue),
subtitle: ShieldConfiguration.Label(text: "heyhey")
)
}
}
but after calling store.shield.applications = ....
the default restricted screen is being shown instead of the one I configured above
Where am I supposed to put MyShieldConfiguration ?
I added the extension via targets. And I added code in the intervalDidStart() override to print and send a notification.
But it never seems to run. Am I supposed to do any other steps after adding the extension?
// Make sure that your class name matches the NSExtensionPrincipalClass in your Info.plist.
class DeviceActivityMonitorExtension: DeviceActivityMonitor {
func getSelectionFromUserDefaults() -> FamilyActivitySelection {
let defaults = UserDefaults.standard
if let encodedData = defaults.data(forKey: "ScreenTimeSelection") {
let decoder = PropertyListDecoder()
if let selection = try? decoder.decode(FamilyActivitySelection.self, from: encodedData) {
return selection
}
}
return FamilyActivitySelection()
}
override func intervalDidStart(for activity: DeviceActivityName) {
super.intervalDidStart(for: activity)
print("HERE!")
let content = UNMutableNotificationContent()
content.title = "Feed the cat"
content.subtitle = "It looks hungry"
content.sound = UNNotificationSound.default
// show this notification five seconds from now
let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 5, repeats: false)
// choose a random identifier
let request = UNNotificationRequest(identifier: UUID().uuidString, content: content, trigger: trigger)
// add our notification request
UNUserNotificationCenter.current().add(request)
let selection = getSelectionFromUserDefaults()
let applications = selection.applicationTokens
let categories = selection.categoryTokens
let webCategories = selection.webDomainTokens
let store = ManagedSettingsStore()
store.shield.applications = applications.isEmpty ? nil : applications
store.shield.applicationCategories = ShieldSettings.ActivityCategoryPolicy.specific(categories, except: Set())
store.shield.webDomainCategories = ShieldSettings.ActivityCategoryPolicy.specific(categories, except: Set())
}
Say a user wants to restrict their schedule for a certain app's usage every day. For sake of example, lets say they want to block Fruit Ninja usage during certain times of the day, and they've downloaded Fruit Ninja on iPhone and iPad. Is there a way to sync Family Controls / ManagedSettings settings between iOS and iPad, like a user can create a unified account that monitors Fruit Ninja usage across both devices (without having to set up separate configs on each device?)
I'm thinking of something like syncing ApplicationTokens, but I don't think this would work since I imagine the hashes will be different for the same app on different devices.
I'm trying to modify a ShieldConfigurationExtension, but am having trouble adding an icon. I have tried directly adding a png to the ShieldConfiguration extension folder and creating a UIImage from it, but it doesn't seem to work. Am I working with images within an extension properly?
This code displays the default configuration
override func configuration(shielding application: Application, in category: ActivityCategory) -> ShieldConfiguration {
// Customize the shield as needed for applications shielded because of their category.
let image = UIImage(named: "icon")
return ShieldConfiguration( icon: image)
}
This code properly displays a customized configuration
return ShieldConfiguration( title: ShieldConfiguration.Label(text: "test", color: .white))
Able to access corporate mail attachment in unmanaged apps even after the restriction profile (“allowOpenFromManagedToUnmanaged”) has been installed in the device.
Followed the following steps able to reproduce this issue
Logged in with a personal mail account in iOS device in Mail app.
Pushed an MDM profile with Email configuration to an iOS device. Now this account is in managed space
Pushed a Restriction profile which has the key “allowOpenFromManagedToUnmanaged” to “false”. This restricts unmanaged apps to open attachments from managed space.
Now when I send a email with an attachment to this managed mail account from personal account (Mail is sent from another device, not managed device)
On receiving the email in managed mail account, Able to open the attachment in unmanaged apps.
The restriction seems not to be working when the personal mail account is present in the mail app along with the corporate mail account and the attachment received in a corporate mail account is treated to be in unmanaged space.
The restriction works fine when the personal mail account is removed from mail app.
Kindly confirm whether this is the expected behaviour.
Hey 👋
I have an app that uses Device Activity Monitor. For the previous releases there was no problem. However I made some improvements in my app and send it to review. Review team getting following crash log but I couldn't find the issue. It's working both in my simulator and a real devices.(iPhone, iPad). I removed some logs from here because of character limitations.
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: FRONTBOARD 2343432205
<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:scene-create watchdog transgression: application<>:15592 exhausted real (wall clock) time allowance of 19.97 seconds
ProcessVisibility: Foreground
ProcessState: Running
WatchdogEvent: scene-create
WatchdogVisibility: Foreground
WatchdogCPUStatistics: (
"Elapsed total CPU time (seconds): 7.760 (user 4.070, system 3.690), 5% CPU",
"Elapsed application CPU time (seconds): 0.111, 0% CPU"
) reportType:CrashLog maxTerminationResistance:Interactive>
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x1d8256ca4 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x1d8269b74 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0x1d8269e4c mach_msg_overwrite + 540
3 libsystem_kernel.dylib 0x1d82571e8 mach_msg + 24
4 libdispatch.dylib 0x1a108320c _dispatch_mach_send_and_wait_for_reply + 548
5 libdispatch.dylib 0x1a108359c dispatch_mach_send_with_result_and_wait_for_reply + 60
6 libxpc.dylib 0x1f8fa9218 xpc_connection_send_message_with_reply_sync + 240
7 Foundation 0x193f6ff18 __NSXPCCONNECTION_IS_WAITING_FOR_A_SYNCHRONOUS_REPLY__ + 16
8 Foundation 0x193f032c4 -[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:] + 2192
9 Foundation 0x193f01ac0 -[NSXPCConnection _sendSelector:withProxy:arg1:] + 116
10 Foundation 0x193f019f8 _NSXPCDistantObjectSimpleMessageSend1 + 60
11 FamilyControls 0x1e772388c 0x1e76ee000 + 219276
12 FamilyControls 0x1e7722b0c 0x1e76ee000 + 215820
13 libdispatch.dylib 0x1a1067eac _dispatch_client_callout + 20
14 libdispatch.dylib 0x1a10696ec _dispatch_once_callout + 32
15 FamilyControls 0x1e7722d18 0x1e76ee000 + 216344
16 MyApp 0x102314bfc AppUsagesViewModel.init(dependencies:) + 510972 (AppUsagesViewModel.swift:29)
17 MyApp 0x1022b2b00 closure #1 in MainTabBarController.setupTabbar() + 109312 (MainTabBarController.swift:55)
18 MyApp 0x1022b3904 specialized Sequence.compactMap<A>(_:) + 112900 (<compiler-generated>:0)
19 MyApp 0x1022b2750 MainTabBarController.setupTabbar() + 108368 (MainTabBarController.swift:47)
20 MyApp 0x1022b29a8 @objc MainTabBarController.viewDidLoad() + 108968 (<compiler-generated>:0)
21 UIKitCore 0x19bf381f4 -[UITabBarController initWithNibName:bundle:] + 156
22 MyApp 0x1022b3a7c specialized static MainTabBarController.build(_:) + 113276 (MainTabBarController.swift:96)
23 MyApp 0x102313f80 specialized AppDelegate.application(_:didFinishLaunchingWithOptions:) + 507776 (AppDelegate.swift:45)
24 MyApp 0x1023132d8 @objc AppDelegate.application(_:didFinishLaunchingWithOptions:) + 504536 (<compiler-generated>:17)
As far as I understood from the log the crash is happened right there AppUsagesViewModel.swift:29. I have a following variable in that line.
private let parentalControls = AuthorizationCenter.shared
What could be the reason of that crash? If someone can help me I really appreciate it. Thanks!
I am trying to develop an application that can enforce Screen Time restrictions on the target device, however I get stuck at the part where I have scheduled callbacks for my class that implements the extension for DeviceActivityMonitor.
For debugging, I first attach to the app extension target process via Debug > Attach to Process > Process Name. But after scheduling monitoring that receives a callback immediately, the process exits with the following error:
Thread 1: EXC_RESOURCE (RESOURCE_TYPE_MEMORY: high watermark memory limit exceeded) (limit=6 MB)
Is the maximum allowed memory for Device Activity Monitor extensions really just 6 MB, or am I doing something wrong? If it is indeed the case, is there any way to increase it? 6 MB seems quite restrictive to me.
I'm from Vietnam, and I opened a business account for my company, but it's taken 3 months already, and it's still being processed :)) what's wrong with Apple? How a startup company can survive to waiting for an account to release the product?
I don't know how long it takes, but it's too funny.