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

81 Posts

Post

Replies

Boosts

Views

Activity

Device Activity Report Not showing any information
All After about 20 hours straight of working on this and having scrapped it twice I am realizing I should have asked everyone here for help. I am just trying to get device activity report extension to work inside an existing app. I have been heavily using family controls, managedsettings and deviceactivity and decided it would be nice to output some of the app usage so the User (parent) can see their children's app usage. I installed the target via xcode, confirmed group names match, and think I have it embedded correctly but when I run the app and call the view within the extension to show minutes used by any apps it just shows no time has been used. In addition, when I put print statements into the extension they do not show up in console. I have confirmed the main app target->Build phases->Link binary with Libraries has: ManagedSettings.framework FamilyControls.Framework DeviceActivity.framework I have confirmed in xcode that the main app target->Build phases -> Embed Foundation Extensions has: ShieldConfiguration.appex ShieldActionExtension.appex DeviceActivityMonitor.appex I have confirmed in xcode that the main app target->Build phases-> Embed ExtensionKit Extensions has: UsageReportExtension.appex I have used the apps I am trying to show data for extensively in the last 36 hours. Here is my UsageReportExtension info.plist EXAppExtensionAttributes EXExtensionPointIdentifier com.apple.deviceactivityui.report-extension .entitlement com.apple.developer.family-controls com.apple.security.application-groups group.com.jrp.EarnYourTurnMVP2.data Here is the file in the app (timebankview.swift) calling the extension/showing the extension view(AppUsageReportView.swift) import DeviceActivity import ManagedSettings struct TimeBankView: View { @EnvironmentObject private var appState: AppState @State private var reportInterval: DateInterval = { let calendar = Calendar.current let now = Date() let yesterdayDate = calendar.date(byAdding: .day, value: -1, to: now) ?? now return DateInterval(start: yesterdayDate, end: now) }() private var reportFilter: DeviceActivityFilter { let selection = appState.screenTimeController.currentSelection return DeviceActivityFilter( segment: .daily(during: reportInterval), users: .children, devices: .all, applications: selection.applicationTokens, categories: selection.categoryTokens // webDomains: selection.webDomains // Add if needed ) } var body: some View { ZStack { Color.appTheme.background(for: appState.isParentMode) .edgesIgnoringSafeArea(.all) ScrollView { VStack(spacing: 20) { Text("Time Bank") DeviceActivityReport(.childUsageSummary, filter: reportFilter) Here is AppUsageReportView.swift import SwiftUI struct AppUsageReportView: View { let config: DetailedAppUsageConfiguration // Use the detailed config var body: some View { VStack { Text("App Usage Details") Text("Total Screen Time: \(config.totalDurationFormatted)") if config.applicationsUsed.isEmpty { Text("No specific app usage data available for the selected period/filter.") } else { Text("Apps Used:") List { ForEach(config.applicationsUsed) { appInfo in HStack { Image(systemName: "app.dashed") Text(appInfo.appName) .lineLimit(1) Text(appInfo.durationFormatted) Here is AppUsageReportScene.swift: import SwiftUI import ManagedSettings struct AppInfo: Identifiable, Hashable { let id = UUID() let appName: String let durationFormatted: String } struct DetailedAppUsageConfiguration { var totalDurationFormatted: String = "Calculating..." var applicationsUsed: [AppInfo] = [] } struct AppUsageReportScene: DeviceActivityReportScene { let context: DeviceActivityReport.Context = .childUsageSummary let content: (DetailedAppUsageConfiguration) -> AppUsageReportView func makeConfiguration(representing data: DeviceActivityResults<DeviceActivityData>) async -> DetailedAppUsageConfiguration { var config = DetailedAppUsageConfiguration() var appDurations: [String: TimeInterval] = [:] var totalAggregatedDuration: TimeInterval = 0 let formatter = DateComponentsFormatter() formatter.allowedUnits = [.hour, .minute, .second] formatter.unitsStyle = .abbreviated formatter.zeroFormattingBehavior = .pad var segmentCount = 0 var categoryCount = 0 var appCount = 0 for await activityData in data { // Check segments var tempSegmentCount = 0 for await segment in activityData.activitySegments { segmentCount += 1 tempSegmentCount += 1 totalAggregatedDuration += segment.totalActivityDuration var tempCategoryCount = 0 for await categoryActivity in segment.categories { categoryCount += 1 tempCategoryCount += 1 var tempAppCount = 0 for await appActivity in categoryActivity.applications { appCount += 1 tempAppCount += 1 let appName = appActivity.application.localizedDisplayName ?? "Unknown App" let duration = appActivity.totalActivityDuration appDurations[appName, default: 0] += duration }}} } config.totalDurationFormatted = formatter.string(from: totalAggregatedDuration) ?? "N/A" config.applicationsUsed = appDurations .filter { $0.value >= 1 .map { AppInfo(appName: $0.key, durationFormatted: formatter.string(from: $0.value) ?? "-") } .sorted { lhs, rhs in let durationLHS = appDurations[lhs.appName] ?? 0 let durationRHS = appDurations[rhs.appName] ?? 0 return durationLHS > durationRHS } if !config.applicationsUsed.isEmpty { for (index, app) in config.applicationsUsed.enumerated() { } } else { } return config }} UsageReportExtension.swift struct UsageReportExtension: DeviceActivityReportExtension { init() { print("🚀 [UsageReportExtension] Extension initialized at \(Date())") print("🔍 [UsageReportExtension] Process info: \(ProcessInfo.processInfo.processName) PID: \(ProcessInfo.processInfo.processIdentifier)") } var body: some DeviceActivityReportScene { let _ = print("📊 [UsageReportExtension] Building report scenes at \(Date())") TotalActivityReport { totalActivity in print("🕰️ [TotalActivityReport] Creating view with data: \(totalActivity)") return TotalActivityView(totalActivity: totalActivity) }}}
3
0
252
Apr ’25
How to change my app seller name and company name?
In the latest submission, we encountered a problem that the seller name and company name of our app are not compliant. However, changing the company name is too troublesome because the company has other businesses. We want to apply for a new company for the app. Does anyone know how to change the seller name and company name of the current app to the name of the new company?
0
0
41
Apr ’25
iOS 18.4 (?) FamilyActivityPicker regression: presenting SFSafariViewController on top bugs
If I present "SFSafariViewController" when a "FamilyActivityPicker" is visible, it will automatically dismiss the "SFSafariViewController" and crash the "FamilyActivityPicker." I'm assuming the cause of the bug is that each is in a separate process (aside from the app), and there's some hacks to try to stop "FamilyActivityPicker" from crashing, and this is causing the new bug because "SFSafariViewController" is also in a separate process. (I'm not 100% if its just in 18.4 or iOS 18 overall...) (I'll try to file a feedback soon, but its 100% reproducible for me across multiple devices on iOS 18.4)
6
0
157
Apr ’25
DisabledSystemSettings in 2025 year. Is there a method to hide individual items in System Settings that is not Deprecated?
Hi, Is there a method to hide individual items in System Settings that is not Deprecated? It needs some of the settings set and hidden for the end user. I found the DisabledSystemSettings key however it is marked as Deprecated and does not include all the new items, especially those related to Apple Intelligence. Is there any method other than “Restrictions” that does not hide and only set individual settings ? It needs to hide items in system settings :)
0
2
169
Apr ’25
Verify Identity
We'd like to give account holder role to another person in our team and when I tried to verify my account and post id photos in Developer app, I always got the next answer: 'Unable to Send Information, Your information could not be sent due to a connection error' with 2 buttons (try, cancel). I tried it many times with same result. I don't know what is wrong.
0
0
44
Apr ’25
Label with ApplicationToken cannot be styled?
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?
6
2
2.4k
Mar ’25
Issue with Parent selecting child's apps using Family Controls API
I'm trying to accomplish the features in this video where the child device requests permission from parent to control scren time. Then the parent can choose apps on the childs phone from their phone. Everything on the childs device is working exactly like in the video. However, on the parents phone, when the FamilyActivityPicker appears, it's only the apps on the parents phone and when an app is selected, nothing changes in the FamilyActivitySelection. I found this forum post describe the same issue I am having. I have a physical device logged in the child and a simulator running as the parent. Why can't I see the child's apps on the parents phone? Is it cause I'm running one of them on a simulator?
2
0
439
Mar ’25
[iOS 18 Beta 4] DeviceActivityMonitor extension is more likely to deadlock
Hi there, My app uses all the Screen Time API's with individual FamilyControls authorization. I've been using the API's for over 2 years (since they came out). In iOS 18 Beta (maybe started in Beta 3?), I've been experiencing random issues. I tracked it down to where it seems like DeviceActivityMonitor extension is more likely to deadlock in iOS 18. To reproduce: when DeviceActivityMonitorExtension.intervalDidEnd gets called, IF you call DeviceActivityCenter.startMonitoring for that SAME DeviceActivityName from the DeviceActivityMonitorExtension , the startMonitoring call deadlocks (if I pause debugger, it does not advance past DeviceActivityCenter.startMonitoring). The bug is reported in FB14664238. It also contains a sample project where you can reproduce this. I also note in the comment section that this is not the only way to encounter this problem. My application code (which is a lot more complicated) seems to deadlock on calling DeviceActivityCenter.activities. As a result, there seems to be an "overall trend" where, due to some changes, DeviceActivityMonitor extension is more likely to deadlock. The steps are not reproducible on iOS 17.6. This is built using Xcode 17.4. Thank you! 🙏
1
3
734
Mar ’25
Location Permission Management for Parental Control Apps with Screen Time Authorization
Apple Feedback Ticket: FB16804936 Background We develop a parental control application called Adora Kids (https://apps.apple.com/us/app/adora-kids/id6443787669) that requires "Location Always" permission to function properly. Our app has Screen Time authorization and provides monitoring services for parents. Issue We are experiencing a recurring problem where child users receive the system notification "Adora accessed your location in the background" every few days. This frequently results in children disabling location permissions, which prevents our app from functioning as intended. Current Approach and Limitations We have explored using Content & Privacy Restrictions for Location Services as a potential solution, but have encountered two significant limitations: These restrictions cannot be accessed programmatically via the ManagedSettings framework (unlike AppStoreSettings and other restrictions). The current implementation is "all-or-nothing" - enabling location restrictions blocks permission changes for ALL apps on the device, preventing children from granting legitimate location access to other applications. Questions Is there a way to programmatically access and manage Content & Privacy Restrictions for Location Services through the ManagedSettings framework that we might have overlooked? Are there any recommended approaches for apps with Screen Time authorization to prevent users from changing specific permissions (particularly location) while still allowing them to manage permissions for other apps? Does Apple have plans to implement app-specific permission locking for apps with Screen Time authorization in future iOS releases? Are there any alternative approaches or workarounds that other developers have successfully implemented for this use case? Any guidance from the developer community or Apple engineers would be greatly appreciated. This is a critical functionality issue affecting the reliability of our parental control service. Thank you in advance for your assistance.
0
3
210
Mar ’25
Using ManagedSettings.ApplicationSettings.blockedApplications to "hide" apps is causing App Review rejection
I'm currently running into an issue during the App Store review process where my reviewer isn't liking how the Screen Time API is being used to hide apps. For some context, my app uses the Managed Settings and Device Activity frameworks in the Screen Time API to allow users to set restrictions on their personal devices and save those restrictions into a preference object that they can switch between. This was detailed as my app's primary purpose in my Family Controls & Personal Device Usage Entitlement Request, which was approved last year. After around a year of working on this app, it's finally done and ready for submission to the App Store. However, my App Reviewer recently rejected the app with this single complaint: Guideline 2.5.1 - Performance - Software Requirements The app uses public APIs in an unapproved manner, which does not comply with guideline 2.5.1. Specifically, your app uses ScreenTime API to hide apps. Since there is no accurate way of predicting how an API may be modified and what effects those modifications may have, unapproved uses of public APIs in apps is not allowed. Next Steps Please revise the app to ensure that documented APIs are used in the manner prescribed in the documentation. All I'm doing is passing a set of Application objects to ManagedSettings.ApplicationSettings.blockedApplications, I'm not doing anything special. The documentation for this API itself states: The system hides blocked applications and prevents the user from launching them. In my reply, I let the reviewer know Regarding Guideline 2.5.1, I believe my use of the Screen Time API appears to align with Apple's documented intended functionality. The specific API I'm using, ManagedSettings.ApplicationSettings.blockedApplications, is explicitly documented by Apple as: "The system hides blocked applications and prevents the user from launching them." This is why I used the term "hide" in my app's marketing and functionality descriptions - I was directly referencing Apple's own terminology for this feature. The documentation clearly indicates this is an approved capability of this API. The source for this documentation can be found here: https://developer.apple.com/documentation/managedsettings/applicationsettings/blockedapplications-swift.property. I've also provided a screenshot of this documentation below. Despite providing a link to the documentation and a screenshot that shows the text from Apple explicitly stating "The system hides blocked applications", the App Reviewer just copy-and-pasted the same text in their reply and rejected the app. I should also note that we don't have control over how the system handles the Application set we pass into ManagedSettings.ApplicationSettings.blockedApplications, the system will always try to "hide" these apps as specified in the documentation. We can't change this behavior. Has anyone else faced this sort of rejection before? Is using ManagedSettings.ApplicationSettings.blockedApplications now considered an illegal use of the API? Or are we not allowed to use the words noted in the documentation of this API? The app rejection suggested I "consult with fellow developers and Apple engineers on the Apple Developer Forums." Any guidance here would be much appreciated as I continue to appeal this. For any Apple staff members reading this post, I can provide the Submission ID of the App Review privately if needed to help resolve this issue.
1
4
663
Mar ’25
How to identify apps in FamilyActivitySelection?
Questions I am developing a social screen time application that enables users to create “sprints” and set sprint goals—essentially time limits on usage for selected applications. For this functionality, users select the apps they wish to manage using the FamilyActivitySelection interface (from the FamilyControls framework). However, our backend needs to distinguish each application uniquely (for example, via the app’s bundle identifier) in order to correctly map and enforce user-defined sprint goals. Unfortunately, we are encountering an issue where retrieving the bundle identifier directly from the FamilyActivitySelection is returning nil. As a result, we are unable to globally identify the selected apps. Could you please advise if there is an alternative method or property available in the FamilyControls API that would allow us to uniquely identify the apps? Alternatively, is there another approach recommended by Apple for obtaining a global identifier for applications selected via FamilyActivitySelection? Thank you for your time and assistance. I look forward to your guidance on how to resolve this issue. Code The following is the print statement I used to check if bundleIdentifier is nil after I stored user's selections to the variable selection using familyActivityPicker: for app in selection!.applications { let bundleId = app.bundleIdentifier ?? "Unknown Bundle ID" let token = app.token let localizedDisplayName = app.localizedDisplayName ?? "Unknown Localized Display Name" print("Selected app bundle identifier: \(bundleId)") print("localizedDisplayName: \(localizedDisplayName)") } Console log result I received from the print statement above: Selected app bundle identifier: Unknown Bundle ID localizedDisplayName: Unknown Localized Display Name
4
0
385
Mar ’25
How to remotely disable or block apps on a child’s device using FamilyControls and DeviceActivity API?
After reading Apple documentation (FamilyControls, DeviceActivity, ManagedSettings, ManagedSettingsUI, ScreenTime) and testing the API, I do not find a way to get the child's device apps on the parent device in order to block them or disable them for a certain time. Is there a way of doing it? Or can it only be done locally on the child device?
2
0
476
Mar ’25
DurationUntilRemoval MDM property
Hello, I have an issue with DurationUntilRemoval—it never deletes my profile. I installed it via my MDM server and also tried installing it using Apple Configurator 2. The device is in supervised mode. Here is my profile: ** DurationUntilRemoval** ** 3600** <key>PayloadContent</key> <array> <dict> <key>PayloadDescription</key> <string>Configures restrictions</string> <key>PayloadDisplayName</key> <string>Restrictions</string> <key>PayloadIdentifier</key> <string>com.apple.applicationaccess.82B4587F-86F6-406B-9D27-03A799379EB5</string> <key>PayloadType</key> <string>com.apple.applicationaccess</string> <key>PayloadUUID</key> <string>82B4587F-86F6-406B-9D27-03A799379EB5</string> <key>PayloadVersion</key> <integer>1</integer> <key>allowActivityContinuation</key> <true/> <key>allowAddingGameCenterFriends</key> <true/> <key>allowAirPlayIncomingRequests</key> <true/> <key>allowAirPrint</key> <true/> <key>allowAirPrintCredentialsStorage</key> <true/> <key>allowAirPrintiBeaconDiscovery</key> <true/> <key>allowAppCellularDataModification</key> <true/> <key>allowAppClips</key> <true/> <key>allowAppInstallation</key> <true/> <key>allowAppRemoval</key> <true/> <key>allowApplePersonalizedAdvertising</key> <true/> <key>allowAssistant</key> <true/> <key>allowAssistantWhileLocked</key> <true/> <key>allowAutoCorrection</key> <true/> <key>allowAutoUnlock</key> <true/> <key>allowAutomaticAppDownloads</key> <true/> <key>allowBluetoothModification</key> <true/> <key>allowBookstore</key> <true/> <key>allowBookstoreErotica</key> <true/> <key>allowCamera</key> <true/> <key>allowCellularPlanModification</key> <true/> <key>allowChat</key> <true/> <key>allowCloudBackup</key> <true/> <key>allowCloudDocumentSync</key> <true/> <key>allowCloudPhotoLibrary</key> <true/> <key>allowContinuousPathKeyboard</key> <true/> <key>allowDefinitionLookup</key> <true/> <key>allowDeviceNameModification</key> <true/> <key>allowDeviceSleep</key> <true/> <key>allowDictation</key> <true/> <key>allowESIMModification</key> <true/> <key>allowEnablingRestrictions</key> <true/> <key>allowEnterpriseAppTrust</key> <true/> <key>allowEnterpriseBookBackup</key> <true/> <key>allowEnterpriseBookMetadataSync</key> <true/> <key>allowEraseContentAndSettings</key> <true/> <key>allowExplicitContent</key> <true/> <key>allowFilesNetworkDriveAccess</key> <true/> <key>allowFilesUSBDriveAccess</key> <true/> <key>allowFindMyDevice</key> <true/> <key>allowFindMyFriends</key> <true/> <key>allowFingerprintForUnlock</key> <true/> <key>allowFingerprintModification</key> <true/> <key>allowGameCenter</key> <true/> <key>allowGlobalBackgroundFetchWhenRoaming</key> <true/> <key>allowInAppPurchases</key> <true/> <key>allowKeyboardShortcuts</key> <true/> <key>allowManagedAppsCloudSync</key> <true/> <key>allowMultiplayerGaming</key> <true/> <key>allowMusicService</key> <true/> <key>allowNews</key> <true/> <key>allowNotificationsModification</key> <true/> <key>allowOpenFromManagedToUnmanaged</key> <true/> <key>allowOpenFromUnmanagedToManaged</key> <true/> <key>allowPairedWatch</key> <true/> <key>allowPassbookWhileLocked</key> <true/> <key>allowPasscodeModification</key> <true/> <key>allowPasswordAutoFill</key> <true/> <key>allowPasswordProximityRequests</key> <true/> <key>allowPasswordSharing</key> <true/> <key>allowPersonalHotspotModification</key> <true/> <key>allowPhotoStream</key> <true/> <key>allowPredictiveKeyboard</key> <true/> <key>allowProximitySetupToNewDevice</key> <true/> <key>allowRadioService</key> <true/> <key>allowRemoteAppPairing</key> <true/> <key>allowRemoteScreenObservation</key> <true/> <key>allowSafari</key> <true/> <key>allowScreenShot</key> <true/> <key>allowSharedStream</key> <true/> <key>allowSpellCheck</key> <true/> <key>allowSpotlightInternetResults</key> <true/> <key>allowSystemAppRemoval</key> <true/> <key>allowUIAppInstallation</key> <true/> <key>allowUIConfigurationProfileInstallation</key> <true/> <key>allowUSBRestrictedMode</key> <true/> <key>allowUnpairedExternalBootToRecovery</key> <false/> <key>allowUntrustedTLSPrompt</key> <true/> <key>allowVPNCreation</key> <true/> <key>allowVideoConferencing</key> <true/> <key>allowVoiceDialing</key> <true/> <key>allowWallpaperModification</key> <true/> <key>allowiTunes</key> <true/> <key>forceAirDropUnmanaged</key> <false/> <key>forceAirPrintTrustedTLSRequirement</key> <false/> <key>forceAssistantProfanityFilter</key> <false/> <key>forceAuthenticationBeforeAutoFill</key> <false/> <key>forceAutomaticDateAndTime</key> <false/> <key>forceClassroomAutomaticallyJoinClasses</key> <false/> <key>forceClassroomRequestPermissionToLeaveClasses</key> <false/> <key>forceClassroomUnpromptedAppAndDeviceLock</key> <false/> <key>forceClassroomUnpromptedScreenObservation</key> <false/> <key>forceDelayedSoftwareUpdates</key> <false/> <key>forceEncryptedBackup</key> <false/> <key>forceITunesStorePasswordEntry</key> <false/> <key>forceLimitAdTracking</key> <false/> <key>forceWatchWristDetection</key> <false/> <key>forceWiFiPowerOn</key> <false/> <key>forceWiFiWhitelisting</key> <false/> <key>ratingApps</key> <integer>1000</integer> <key>ratingMovies</key> <integer>1000</integer> <key>ratingRegion</key> <string>us</string> <key>ratingTVShows</key> <integer>1000</integer> <key>safariAcceptCookies</key> <real>2</real> <key>safariAllowAutoFill</key> <true/> <key>safariAllowJavaScript</key> <true/> <key>safariAllowPopups</key> <true/> <key>safariForceFraudWarning</key> <false/> </dict> </array> <key>PayloadDisplayName</key> <string>papala</string> <key>PayloadIdentifier</key> <string>MacBook-Pro-Kyrylo-2.4A2954CA-57A5-44D9-8AD3-546407A0CAD4</string> <key>PayloadRemovalDisallowed</key> <false/> <key>PayloadType</key> <string>Configuration</string> <key>PayloadUUID</key> <string>BEED8448-8866-43EB-AC3C-1C3C652AADE4</string> <key>PayloadVersion</key> <integer>1</integer> it's just test profile, without difficult stuff, but it doesn't work too What is wrong?
0
1
637
Feb ’25
Related WebDomain Token is automatically blocked, but how do we know the related ManagedSettingsStore?
I have noticed that when I select the app token of the youtube app to be blocked via a ManagedSettingsStore, the youtube website is blocked as well (which is a good and intended behavior IMO). But how do I know in the ShieldConfigurationDataSource’s override func configuration(shielding webDomain: WebDomain, in category: ActivityCategory) -> ShieldConfiguration to which ManagedSettingsStore the WebDomain’s token is related? We use different ManagedSettingsStores for different block purposes, which differentiate in their ShieldConfiguration. Thanks a lot and have a great day!
2
0
454
Feb ’25