Posts

Post marked as solved
2 Replies
2.3k Views
i'm trying to shield and block apps on child device. i managed to block apps by creating a  variable blockedApps : Set = Set() that contains a list of applications like Application(bundleIdentifier: "com.apple.calculator") inside the intervalDidStart on my DeviceActivityMonitor extension now i'm trying to shield an app using the same extension and nothing happens. for this i used this code inside intervalDidStart:   let calculatorApp = Application(bundleIdentifier: "com.apple.calculator")     var blockedApps : Set = Set()           guard let token = calculatorApp.token else {       return     }     blockedApps = [token]     store.shield.applications = blockedApps and i cant tell what is the reason for this not working is there a token issue that is nil? does shielding requires a different app extension? does my app extension requires some additional configuration maybe a different NSExtensionPointIdentifier?
Posted
by vova085.
Last updated
.
Post not yet marked as solved
0 Replies
643 Views
i managed to shield app according to selection from the picker on the child app. i noticed that the threshold is for all the usage time of al the apps combined together. that means that if the threshold is 10 minutes and i used one of the selected apps 5 minutes and the other one for 5 minutes they both will be blocked. what i'm trying to do is that if each an app reached the threshold only it will be shielded anyone knows how to to this?
Posted
by vova085.
Last updated
.
Post not yet marked as solved
0 Replies
811 Views
in order to block an app i need to have a bundle identifier for the app i want to block and then pass it to the Application constructor like this: Application(bundleIdentifier: "com.apple.calculator") then i can use it inside my app extension to block it in the case of shielding an app the situation is that i need the applicationToken which i tried to get from the Application object and transfer it to my app extension threw NSUserDefaults with no success. it seems that applicationToken value is unreachable and nil when i create an Application object. after this i tried to get an applicationToken of a selected app from the familyActivityPicker and i had success and managed to shield the app i selected. i did all of this on a child device only in a parent device the familyActivityPicker shows only categories and i cant figure out how the connection to the child apps in order to block or shield them will be made my questions are: is it possible to get applicationTokens not from the familyActivityPicker? how the parent app suppose to block an app on the child app without having any apps showing? how a parent app is "talking" with the child app exactly?
Posted
by vova085.
Last updated
.
Post not yet marked as solved
1 Replies
961 Views
i'm trying to make my app start blocking/shielding and app according to the selection from a familyActivityPicker. the problem that i'm having is that MyModel object is always nil when i'm accessing it inside the app extension. (DeviceActivityMonitor). can someone give me an example of the object he uses to get the applicationTokens in the app extension? an explanation on how to transfer information between the app and the app extension is also welcome.
Posted
by vova085.
Last updated
.
Post not yet marked as solved
1 Replies
970 Views
i have two physical devices one for parent and one for child. on the child device. AuthorizationCenter.shared.requestAuthorization returns me .success but on the parent device it always fails with receiving that "The operation couldn’t be completed. (FamilyControls.FamilyControlsError error 2.)" what are the reasons that may cause this error on the parent device?
Posted
by vova085.
Last updated
.
Post not yet marked as solved
0 Replies
698 Views
is it even possible or do i need to calculate the time myself by using the start and end of the events? i want to present the usage of the child to the parent can i access the screen time or usage of all the applications on the child device? can i access the screen time or usage of my application on the child device or do i need to calculate it myself by using the start and end of events and scheduled?
Posted
by vova085.
Last updated
.