I wanted to scan the person's face via a true depth camera generate a 3d face model and display the scene I didn't find any solutions.
Has anybody integrated this type of functionality? Please help me out or provide a sample code to scan and preview the scanned face into sceneview or ARview
Post
Replies
Boosts
Views
Activity
// Make sure that your class name matches the NSExtensionPrincipalClass in your Info.plist.
class ShieldActionExtension: ShieldActionDelegate {
override func handle(action: ShieldAction, for application: ApplicationToken, completionHandler: @escaping (ShieldActionResponse) -> Void) {
// Handle the action as needed.
switch action {
case .primaryButtonPressed:
completionHandler(.defer)
case .secondaryButtonPressed:
Timer(timeInterval: 5, repeats: false) { timer in
Restrictions.shared.unlockedAllApps()
}
completionHandler(.defer)
@unknown default:
fatalError()
}
}
override func handle(action: ShieldAction, for webDomain: WebDomainToken, completionHandler: @escaping (ShieldActionResponse) -> Void) {
// Handle the action as needed.
print("func handle(action: ShieldAction, for webDomain: WebDomainToken,")
completionHandler(.close)
}
override func handle(action: ShieldAction, for category: ActivityCategoryToken, completionHandler: @escaping (ShieldActionResponse) -> Void) {
// Handle the action as needed.
NSLog("handle(action: ShieldAction, for category: ActivityCategoryToken")
completionHandler(.defer)
}
}
Below code for AppStorage gives me error as: "No exact matches in call to initializer"
Can anyone please provide how to fix it? I am using code 14.2 and Family controls Capability.
@AppStorage("shieldedApps", store: UserDefaults(suiteName: "group.com.myapp.timeout")) var selectionToDiscourage = FamilyActivitySelection() {
willSet {
UserDefaults.standard.setValue(true, forKey: "appSelected")
print("got here (newValue)")
for category in newValue.categories {
print(category.localizedDisplayName)
}
let applications = newValue.applicationTokens
let categories = newValue.categoryTokens
// let webCategories = newValue.webDomainTokens
store.shield.applications = applications.isEmpty ? nil : applications
store.shield.applicationCategories = ShieldSettings.ActivityCategoryPolicy.specific(categories, except: Set())
store.shield.webDomainCategories = ShieldSettings.ActivityCategoryPolicy.specific(categories, except: Set())
}
}
How do I get a list of applications names which are selected by users from familyActivityPicker?