Managed Settings

RSS for tag

Set restrictions for certain settings, such as locking accounts in place, preventing password modification, filtering web traffic, and shielding apps.

Posts under Managed Settings tag

104 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Usage time tracking is being killed by jetsam
Brief & History Since iOS 17.4 and up we experience a lot of flakyness when it comes to DeviceActivity event thresholds. After a lot of testing and investigations inside system logs and filing countless bug reports we found a reproducible way why the event thresholds are not getting properly called. Findings Apparently when the device reaches near to max memory something called jetsamkills processes left and right. This means that the UsageTrackingAgent that (we think) is responsible for tracking the usage time of the device gets killed and doesn't recover until significant memory is freeing up on the device. How to test it yourself Use a slightly older device with ~ 3 or 4 GB of RAM Open a game or two that is meomry intensive (like Fishing Clash, yes..) and observe In the console logs you see something that only happens then: Process UsageTrackingAgent [39307] killed by jetsam reason highwater This happens often but recovers itself when the UsageTrackingAgent exceeds their 6MB memory limit. Yet the log looks like this: Process UsageTrackingAgent [39307] killed by jetsam reason per-process limit Once you kick the game, the memory is free and sometimes the event thresholds are calling in again. Defeating the purpose However this defeats the purpose of tracking usage time and shielding perhaps the playing app from being played after a certain amount of time! Feedback Assistant Ticket Here is the ticket with sysdiagnose, step by step and more information: FB13884981 Please fix this ASAP, this is such a pain for production users and their kids EVERY DAY.
0
2
58
17h
Tunnel Communication Failures Post-Update
Hello, We are experiencing intermittent tunnel communication failures in iOS devices following internal application updates or fresh installations. This issue occurs specifically with VMware Workspace ONE Advanced (includes AirWatch) - On Premise and Workspace ONE Tunnel. Our enterprise mobility management platform provides comprehensive tools for managing corporate-owned and BYOD devices across various operating systems. Detailed Information: Applications Involved: VMware Workspace ONE Advanced (On-Premise): Manages and secures devices and applications. Workspace ONE Tunnel: Enables per-app VPN services, routing traffic from specific managed applications through our VPN. Problem Context: After a recent update, and notably after introducing deeplinking capabilities which required making our public DNS changes to host the Apple-app-site-association file, iOS devices are not routing application traffic through the Workspace ONE Tunnel correctly. Instead, applications are bypassing VPN configurations and connecting directly to public networks, jeopardizing data security. This behavior is inconsistent and varies across devices. To illustrate, I have attached a diagram (Diagram 1) that shows the flow of traffic during the issue compared to normal operations. Timeline and Troubleshooting Steps Taken: Initial Report Date: February 2024, following the iOS update 17.3.1 and post-deeplinking modifications. VMware Involvement: Multiple troubleshooting sessions, including log analysis and configuration reviews. VMware indicated the issue might not be directly related to their platform as the tunnel functions normally post-device restart. Logs Reviewed: Application logs, network traces, and device management logs. No errors directly linked to VMware solutions were found. The logs showing the issue occurrence and after a device restart are included (see Logs Set A and Logs Set B). Additional Information: Devices Affected: Various iOS devices, total fleet approximately 1500 units. Inconsistencies: The issue manifests inconsistently across different organizational groups (OGs) and is not tied to a specific app version or device model. Developer Notes: The issue does not occur when applications are deployed via Xcode during testing phases. It only arises when apps are updated in a live environment. Request for Assistance: We request Apple’s assistance in investigating potential iOS-specific causes or configurations contributing to this issue, particularly in the context of the deeplinking changes. A joint troubleshooting session is proposed to further diagnose and address the problem. Prompt support in resolving this issue, given its impact on our operations, would be greatly appreciated. Attachments: Diagram 1&2: Traffic Routing During Issue vs. Normal Operation Diagram 3: Our App communications diagram Logs Set A: Device Logs When Issue Occurs Logs Set B: Device Logs After Restart (Set A) After restart - no issue .log https://drive.google.com/file/d/1Q2COgXkMa3KnN1N-ggZKwYhHP7KC-Hwy/view?usp=sharing (Set B) before restart.log https://drive.google.com/file/d/1uS9kAV6zJyRvVRQoWQNKdWBBR7sxM6Js/view?usp=sharing Any suggestions? Thank you!
1
0
57
2d
System Preferences Profile not working in latest macOS (Ventura)
https://developer.apple.com/documentation/devicemanagement/systempreferences The Above documentation of "System Preferences" says deprecated. I assume that some of the panes are not working in latest OS due to this deprecation. My query is , Is there any other alternative to Disable or Enabled Preference Panes which was attained by SystemPreferences Payload. I couldn't find any. Is it entirely stopped and in latest OS's ,it wont allowed to restrict those panes?
1
0
195
1w
Cant delete ABM account
Recently i created an ABM account and seemed to work fine. all of the sudden we cannot log in anymore and we get a notification that this apple ID is deactivated (but it is active). when i want to reset password, deactivate or delete this user in ABM, i get an INTERNAL_ERROR message with no further explination. i can delete and deactivate other users but not this one. The log file is not realy any use since it sais 'SUB_STATUS, COMLETED_WITH_FAILURE". Any idea how i can resolve this?
0
0
126
3w
Cant able to set lock screen independent of Wallpaper in Mac
In older versions of macOS, such as those predating Mac OS Sonoma, users had the ability to set the Lock Screen independently from their desktop wallpaper. However, with the introduction of Mac OS Sonoma, this feature seems to have been altered or removed altogether. Currently, there appears to be no option to set the Lock Screen image separately; instead, only changing the desktop wallpaper, changes the Lock Screen image. This change raises questions about whether it is a deliberate alteration in the setting flow or if it could potentially be a bug in the system. Users may wonder if this adjustment is intended to streamline the interface or if there are plans to reintroduce the ability to customize the Lock Screen image independently of the wallpaper in future updates.
1
0
182
3w
Device Activity Monitor Extension behaves randomly - any idea?
Hello, I'm working on an app that makes use of Screen Time features by leveraging the Family Controls, Device Activity and Managed Settings frameworks. The main app works fine by shielding/unshielding apps with a toggle. When it comes to monitoring the time intervals with the Device Activity Monitor (DAM) extension (e.g. lock X apps for Y minutes), I'm experiencing several issues. To shield/unshield apps and kick off the monitoring I perform the following instructions: let timeInMinutes = 15 let startDate = Date(timeIntervalSinceNow: 1.0) // padding added to avoid invalid DAM ranges < 15 mins. let endDate = startDate.addingTimeInterval(timeInMinutes * 60.0) let components: Set<Calendar.Component> = [.day, .month, .year, .hour, .minute, .second] let calendar = Calendar.current let intervalStart = calendar.dateComponents(components, from: startDate) let intervalEnd = calendar.dateComponents(components, from: endDate) let schedule = DeviceActivitySchedule(intervalStart: intervalStart, intervalEnd: intervalEnd, repeats: false) try deviceActivityCenter.startMonitoring(.definiteShield, during: schedule) let managedSettingsStore = ManagedSettingsStore() managedSettingsStore.shield.applications = selection.applicationTokens // `selection` being an instance of `FamilyActivitySelection` The main pain points are: After this code is performed, I would expect the Device Activity Monitor extension to start, or at least to start once I go to background. To check whether the DAM extension is running or not, I attach to the extension process manually (Product > Attach to Process by PID or Name). But I can see the extension correctly running only after 3-4 attempts of calling startMonitoring. Even when the DAM extension runs, intervalDidStart and intervalDidEnd methods in the extension are called quite randomly - most of the times not being called at all - thus making the extension hugely unaffordable. Please note: I already ask for Screen Time permissions during the onboarding by calling AuthorizationCenter.shared.requestAuthorization(for: .individual), so by the time the user shields the apps, these permissions are already granted. I already have Family Control entitlements for development and distribution, and for both the main target and the DAM extension target. In the intervalDidEnd method, I simply call ManagedSettingsStore().clearAllSettings() and DeviceActivityCenter().stopMonitoring(). This looks like to be enough to stay way below the 6MB memory limit. Am I doing something wrong, is there a way to fix this, or is just the Device Activity framework that is unstable?
1
0
315
May ’24
Customise Restricted Screen
I'm working on creating a locker app to lock the selected applications. After locking app, when you try to open the app a screen appears with the below message. Icon Restricted You can not use Facetime because it is restricted OK Button. How to customise this screen, another locker app is able to customise it and on a button click it redirects to their app to unlock it. also is there a way to get locked app names?
1
0
246
May ’24
Multiple Parents does not work with ScreenTime API iOS
I am developing a parent child control app using Screen time API and Family Control. I created two apps, one for parent and another for child. I want to see child device's activity report on parent app. This functionality works when there is only one parent/organiser. I am trying to add multiple parents to access device activity report using screen time API. I created a family group where I am the organiser (Dad), added another account as parent (Mom) and two child accounts. On the child's device I installed the app, authorised the app for parental approval (Dad) and screen time restrictions. When using the parent app as Mom, I am unable to fetch the child device's activity report.
0
0
275
Apr ’24
Screen Time API is completely UNRELIABLE!
I've been working with the Screen Time API for almost 6 months now. I found out it's completely unreliable, testing on iOS 17.4, the DeviceActivityReport is not showing, the DeviceActivityMonitor more often than not does not fire intervalDidStart. It's very frustrating. Has anyone found out a workaround? We all know there has to be something we're doing wrong, since apps like Opal and Jono does not present those types of issues. Let's please unite our forces and find a solution. How to use this API should not be a secret!
5
3
385
Apr ’24
FamilyActivityPicker on Simulator not populating apps.
I'm looking to make an app using the ScreenTime API and the Managed Settings Framework. I'm experimenting with the FamilyActivityPicker, but when i open it from the simulator i see only categories with no applications. Without being able to select applications, i cannot test properly the app. I can't install it on a real device to test it because i do not have a paid Apple Developer account and therefore can't access the capability if i select my Free Developer Account in order to install it on my iPhone.
0
1
261
Apr ’24
MacOS Reset Passcode not working- Urgent
I have tried to deploy passwordpolicy script using pwpolicy pwpolicy -n /Local/Default -setglobalpolicy "usingHistory=5 canModifyPasswordforSelf=1 maxMinutesUntilChangePassword=129600 requiresAlpha=1 requiresNumeric=1 minChars=8 passwordCannotBeName=1 requiresMixedCase=1 requiresSymbol=1" sudo defaults write /Library/Preferences/com.apple.loginwindow PasswordExpirationDays 14 errcode=$? if [ "$errcode" -ne 0 ]; then echo "" echo "Failed to apply with errorcode $errcode" 1>&2 echo "" exit 1 fi echo "Password Policy applied successfully" 1>&2 After deploying, on next login, It prompted for login, On entering password, It shows wrong password. When I tried to reset the password, It is not accepting the password. Instead It prompts again and again. Like this , I have got 300 mac machines struck in login page. I tried to run these two commands via a app running in root pwpolicy -u "$user" -clearaccountpolicies pwpolicy -clearaccountpolicies After Running this, I can able to loggin for first time. When tried to login second or successive times, It is failing with wrong password or sometimes no error instead of a jumping prompt in password page. When tried to change password after a login after clearpolicy command, It is not accepting the admin's password (Which was used to login the current session). Please help on this issue. As it does have a serious impact.
0
0
316
Apr ’24
Issues with Family Activity Selection in Screen Time API for Flutter Parental Control App
I am developing a parental control app using Flutter and platform channels to integrate with the Screen Time API on iOS. The app has two interfaces - one for the parent and one for the child. I have set up Family Sharing correctly and installed the app on both the parent's and child's devices. However, I am encountering some issues with the Family Activity Selection feature. It's worth noting that I am a Flutter developer with limited knowledge of Swift and iOS development, so if my issues stem from a mistake I made, please forgive me. The problems I am facing are as follows: When calling the family activity selection, the list of apps shown in the apps sheet is from the parent's device, and no apps from the child's device are displayed. I have double-checked that Family Sharing and other necessary configurations are set up correctly, including the family control capability. Even if I select apps on the parent's device, the selected apps are not returned in the result. The returned array is empty. Additionally, there is no close or done button on the sheet, and drag-to-dismiss is not working either. This might be an issue with the way I have written the code (most of the native code was generated by AI assistants like Claude and GPT, as I am a Flutter developer with limited knowledge of Swift and iOS development). I have tested other parental control apps that use the Screen Time API and observed the same issue, where the parent's apps are shown on the parent's device instead of the child's apps. For more context, I have provided the relevant code snippet below: import Flutter import FamilyControls import ManagedSettings import SwiftUI class FamilyActivityHandler: NSObject, FlutterPlugin { // ... private func openFamilyActivityPicker(result: @escaping FlutterResult) { let store = ManagedSettingsStore() let selection = FamilyActivitySelection() // Adjusting for UIWindowScene for iOS 15 and later guard let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene, let window = windowScene.windows.first else { result(FlutterError(code: "NO_WINDOW_SCENE", message: "No window scene found", details: nil)) return } let viewController = UIHostingController(rootView: FamilyActivityPicker(selection: .constant(selection))) viewController.modalPresentationStyle = .formSheet window.rootViewController?.present(viewController, animated: true, completion: nil) DispatchQueue.main.async { let applications = selection.applicationTokens let categories = selection.categoryTokens let webDomains = selection.webDomainTokens store.shield.applications = applications.isEmpty ? nil : applications store.shield.applicationCategories = ShieldSettings.ActivityCategoryPolicy.specific(categories, except: Set()) store.shield.webDomains = webDomains // Custom method to generate descriptive strings for tokens let applicationsDescription = applications.map { token in // Implement a custom description method or use an identifier property "\(token)" } let categoriesDescription = categories.map { token in // Implement a custom description method or use an identifier property "\(token)" } let webDomainsDescription = webDomains.map { token in // Implement a custom description method or use an identifier property "\(token)" } let resultDict: [String: Any] = [ "applications": applicationsDescription, "categories": categoriesDescription, "webDomains": webDomainsDescription ] result(resultDict) } } } I would greatly appreciate any guidance or insights from the community on how to resolve these issues and properly implement the Family Activity Selection feature using the Screen Time API in a Flutter app with platform channels. Thank you in advance for your help!
0
0
304
Apr ’24
Issues with Family Activity Selection in Screen Time API for Flutter Parental Control App
I am developing a parental control app using Flutter and platform channels to integrate with the Screen Time API on iOS. The app has two interfaces - one for the parent and one for the child. I have set up Family Sharing correctly and installed the app on both the parent's and child's devices. However, I am encountering some issues with the Family Activity Selection feature. It's worth noting that I am a Flutter developer with limited knowledge of Swift and iOS development, so if my issues stem from a mistake I made, please forgive me. The problems I am facing are as follows: When calling the family activity selection, the list of apps shown in the apps sheet is from the parent's device, and no apps from the child's device are displayed. I have double-checked that Family Sharing and other necessary configurations are set up correctly, including the family control capability. Even if I select apps on the parent's device, the selected apps are not returned in the result. The returned array is empty. Additionally, there is no close or done button on the sheet, and drag-to-dismiss is not working either. This might be an issue with the way I have written the code (most of the native code was generated by AI assistants like Claude and GPT, as I am a Flutter developer with limited knowledge of Swift and iOS development). I have tested other parental control apps that use the Screen Time API and observed the same issue, where the parent's apps are shown on the parent's device instead of the child's apps. For more context, I have provided the relevant code snippet below: import Flutter import FamilyControls import ManagedSettings import SwiftUI class FamilyActivityHandler: NSObject, FlutterPlugin { // ... private func openFamilyActivityPicker(result: @escaping FlutterResult) { let store = ManagedSettingsStore() let selection = FamilyActivitySelection() // Adjusting for UIWindowScene for iOS 15 and later guard let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene, let window = windowScene.windows.first else { result(FlutterError(code: "NO_WINDOW_SCENE", message: "No window scene found", details: nil)) return } let viewController = UIHostingController(rootView: FamilyActivityPicker(selection: .constant(selection))) viewController.modalPresentationStyle = .formSheet window.rootViewController?.present(viewController, animated: true, completion: nil) DispatchQueue.main.async { let applications = selection.applicationTokens let categories = selection.categoryTokens let webDomains = selection.webDomainTokens store.shield.applications = applications.isEmpty ? nil : applications store.shield.applicationCategories = ShieldSettings.ActivityCategoryPolicy.specific(categories, except: Set()) store.shield.webDomains = webDomains // Custom method to generate descriptive strings for tokens let applicationsDescription = applications.map { token in // Implement a custom description method or use an identifier property "\(token)" } let categoriesDescription = categories.map { token in // Implement a custom description method or use an identifier property "\(token)" } let webDomainsDescription = webDomains.map { token in // Implement a custom description method or use an identifier property "\(token)" } let resultDict: [String: Any] = [ "applications": applicationsDescription, "categories": categoriesDescription, "webDomains": webDomainsDescription ] result(resultDict) } } } I would greatly appreciate any guidance or insights from the community on how to resolve these issues and properly implement the Family Activity Selection feature using the Screen Time API in a Flutter app with platform channels. Thank you in advance for your help!
0
0
257
Apr ’24
Background Safari Tab contributing to DeviceActivityMonitor usage threshold?
I am currently debugging an issue with DeviceActivityMonitor where the threshold is reached even though the target app (e.g. Instagram) is not being used actively. I noticed that the device with the unexpected behavior had the instagram.com website opened in the Safari web browser (among hundreds of other tabs). That tab was not actively used either (not in foreground, Safari app neither used). However, I was wondering if it can happen that this website is contributing towards the threshold as well even though it is in background and not used? Otherwise I cannot explain myself this strange behavior.
0
0
251
Apr ’24
Is there a way to convert AppToken to String?
Hello, I am working on a screen time manager that can block certain apps. I want this to work by allowing a certain number of 5-minute sessions per day. For each app the user selects, I would like to store the number of sessions remaining for that app in a dictionary. Currently, I am storing them in a dictionary of type <AppToken: Int>. However, I would like to store this dictionary to UserDefaults, and it doesn't seem like it is possible to store the type AppToken to UserDefaults. I was wondering how I could go about storing the AppTokenas a String and maybe saving to UserDefaults as a <String: Int> instead? Thanks.
0
0
219
Apr ’24