mirror of https://github.com/openclaw/openclaw.git
23 lines
598 B
Swift
23 lines
598 B
Swift
import Foundation
|
|
import UIKit
|
|
|
|
@MainActor
|
|
extension NodeAppModel {
|
|
func permissionSnapshot() -> IOSPermissionSnapshot {
|
|
IOSPermissionCenter.statusSnapshot()
|
|
}
|
|
|
|
@discardableResult
|
|
func requestPermission(_ permission: IOSPermissionKind) async -> IOSPermissionSnapshot {
|
|
_ = await IOSPermissionCenter.request(permission)
|
|
return IOSPermissionCenter.statusSnapshot()
|
|
}
|
|
|
|
func openSystemSettings() {
|
|
guard let url = URL(string: UIApplication.openSettingsURLString) else {
|
|
return
|
|
}
|
|
UIApplication.shared.open(url)
|
|
}
|
|
}
|