mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-07 22:44:16 +00:00
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: 92c2660d08
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
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)
|
|
}
|
|
}
|