Post

Replies

Boosts

Views

Activity

Reply to DeviceActivityReport based views are blank on iOS 16 whith apps built with Xcode 15 beta
The issue persists when compiling on an iOS 16 device using Xcode 15.0 RC 1 (15A240d). This is incredibly frustrating because the public release of iOS 17 is imminent. Currently, we cannot submit builds that take advantage of the new features in iOS 17 without compromising the experience for a significant portion of our user base—until a majority of our users upgrade to iOS 17. For developers reading this thread: I invite you to file a bug report to Apple using the Feedback Assistant app and to upvote this thread massively. For anyone working on or related to the Screen Time API frameworks: Could you please provide us with an update on this situation? Thank you.
Sep ’23
Reply to Unable to save data from Device Activity Report Extension in CoreData
You won't be able to do that. Your Device Activity Report extension runs in a sandboxed environment to protect user privacy. As stated in the documentation, "this sandbox prevents your extension from making network requests or moving sensitive content outside the extension’s address space". What this means is that even if you place your Core Data database in an app group container that is shared between your app and extension, you won't be able to write anything to it from the extension. You might be able to read from it, though I have never tried this with Core Data.
Topic: App & System Services SubTopic: General Tags:
Aug ’23
Reply to Syncing iPhone/IPad configurations
Good question! According to the documentation, "FamilyActivitySelection provides tokens that devices within the same Family Sharing group can use to identify applications.". There is a good chance that tokens might be shared between different devices. I guess you can try this fairly easily by saving a token to a JSON file on one of your devices then trying to decode it on another device. Let me know if that works!
Topic: App & System Services SubTopic: General Tags:
Aug ’23
Reply to Family Controls crash when app launching
Seeing the same issue and will file a bug report too! @atalayasa Try to move your access to AuthorizationCenter.shared outside the main thread. That shouldn't be too problematic apart from from manipulating authorizationstatus which, according to the documentation, should only be accessed on the main thread.
Topic: App & System Services SubTopic: General Tags:
Aug ’23
Reply to Block a category using ManagedSettings
You cannot initialize an ActivityCategoryToken directly. Instead, you must utilize the FamilyActivityPicker and obtain your category tokens via a FamilyActivitySelection. The example you provided is misleading for several reasons: The ellipsis "..." likely implies that the developer needs to figure out the implementation. However, this approach is problematic since it's not feasible to generate an ActivityCategoryToken from scratch. One must either retrieve it through a FamilyActivitySelection or decode it from a Data object. There's no method to determine if the ActivityCategoryToken instance you are dealing with belongs to the "Social" category. The only workaround would involve prompting the user to select the "Social" category in the FamilyActivityPicker and... trust him or her to do so.
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’23
Reply to Can i get url scheme from application token?
No, you can't get that information from an ApplicationToken or through the Family Controls or Managed Settings frameworks. The only workaround I can think of is to find a way to ask your user to identify the ApplicationToken he or she just selected through the FamilyActivityPicker. If your user says he or she selected TikTok for example, you can "easily" find the matching url scheme - you will have to build your own custom list for those though.
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’23
Reply to DeviceActivityReport based views are blank on iOS 16 whith apps built with Xcode 15 beta
The issue persists when compiling on an iOS 16 device using Xcode 15.0 RC 1 (15A240d). This is incredibly frustrating because the public release of iOS 17 is imminent. Currently, we cannot submit builds that take advantage of the new features in iOS 17 without compromising the experience for a significant portion of our user base—until a majority of our users upgrade to iOS 17. For developers reading this thread: I invite you to file a bug report to Apple using the Feedback Assistant app and to upvote this thread massively. For anyone working on or related to the Screen Time API frameworks: Could you please provide us with an update on this situation? Thank you.
Replies
Boosts
Views
Activity
Sep ’23
Reply to Unable to save data from Device Activity Report Extension in CoreData
You won't be able to do that. Your Device Activity Report extension runs in a sandboxed environment to protect user privacy. As stated in the documentation, "this sandbox prevents your extension from making network requests or moving sensitive content outside the extension’s address space". What this means is that even if you place your Core Data database in an app group container that is shared between your app and extension, you won't be able to write anything to it from the extension. You might be able to read from it, though I have never tried this with Core Data.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’23
Reply to Syncing iPhone/IPad configurations
Good question! According to the documentation, "FamilyActivitySelection provides tokens that devices within the same Family Sharing group can use to identify applications.". There is a good chance that tokens might be shared between different devices. I guess you can try this fairly easily by saving a token to a JSON file on one of your devices then trying to decode it on another device. Let me know if that works!
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’23
Reply to Family Controls crash when app launching
Seeing the same issue and will file a bug report too! @atalayasa Try to move your access to AuthorizationCenter.shared outside the main thread. That shouldn't be too problematic apart from from manipulating authorizationstatus which, according to the documentation, should only be accessed on the main thread.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’23
Reply to Block a category using ManagedSettings
You cannot initialize an ActivityCategoryToken directly. Instead, you must utilize the FamilyActivityPicker and obtain your category tokens via a FamilyActivitySelection. The example you provided is misleading for several reasons: The ellipsis "..." likely implies that the developer needs to figure out the implementation. However, this approach is problematic since it's not feasible to generate an ActivityCategoryToken from scratch. One must either retrieve it through a FamilyActivitySelection or decode it from a Data object. There's no method to determine if the ActivityCategoryToken instance you are dealing with belongs to the "Social" category. The only workaround would involve prompting the user to select the "Social" category in the FamilyActivityPicker and... trust him or her to do so.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’23
Reply to Can i get url scheme from application token?
No, you can't get that information from an ApplicationToken or through the Family Controls or Managed Settings frameworks. The only workaround I can think of is to find a way to ask your user to identify the ApplicationToken he or she just selected through the FamilyActivityPicker. If your user says he or she selected TikTok for example, you can "easily" find the matching url scheme - you will have to build your own custom list for those though.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’23