Fix profile upate task

This commit is contained in:
世界
2023-09-22 18:00:19 +08:00
parent 3374f8e727
commit 58bc9baa05
5 changed files with 33 additions and 21 deletions
+7 -7
View File
@@ -18,19 +18,19 @@ class ApplicationDelegate: NSObject, UIApplicationDelegate {
}
private func setup() async {
await setupBackground()
if UIDevice.current.userInterfaceIdiom == .phone {
await requestNetworkPermission()
}
}
private nonisolated func setupBackground() async {
do {
try await UIProfileUpdateTask.configure()
NSLog("setup background task success")
} catch {
NSLog("setup background task error: \(error.localizedDescription)")
}
if UIDevice.current.userInterfaceIdiom == .phone {
await requestNetworkPermission()
}
await setupBackground()
}
private nonisolated func setupBackground() async {
if #available(iOS 16.0, *) {
do {
let profileServer = try ProfileServer()