I'm trying to shield or block the application by application Bundle Id.
Tried below code to shield "Phone Application"
if let phoneAppToken = Application(bundleIdentifier: "com.apple.mobilephone").token {
print("App Token Found")
store.shield.applications = [phoneAppToken]
} else {
print("App Token Not Found")
}
Always i'm getting "App Token Not Found"
Also i wants to block/shield my current application.
if let phoneAppToken = Application(bundleIdentifier: "com.mobile.bundileid").token {
print("App Token Found")
store.shield.applications = [phoneAppToken]
} else {
print("App Token Not Found")
}
This also failed.
Application tokens are not generated when initializing applications via bundleID. The only way to generate application tokens is to use the FamilyActivityPicker with a FamilyActivitySelection object.
You can block applications via bundle ID using store.application.blockedApplications. However, apps that have authorized via FamilyControls cannot be shielded or blocked.