mirror of
https://gh-proxy.org/https://github.com/klinsmaya/openclaw.git
synced 2026-11-11 03:17:03 +08:00
Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 92c2660d08619fb73540f4bb48ff581d83311623 Co-authored-by: mbelinky <[email protected]> Co-authored-by: mbelinky <[email protected]> Reviewed-by: @mbelinky
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)
|
|
}
|
|
}
|