我需要许可使用的是iOS的提醒,并为我这样做:功能执行IOS
switch EKEventStore.authorizationStatus(for: .reminder) {
case .authorized:
print("Access granted")
//everything's normal here
//executing my function here
case .denied:
print("Access denied")
case .notDetermined:
print("not defined yet")
//No determined so asking for permission
self.eventStore.requestAccess(to: .reminder) { (granted, error) -> Void in
if granted == true {
print("permission granted")
//executing my function here after getting permissions but this piece of code executes after a long delay
//this piece of codes are executing after a while say 5-10 seconds
}else if error != nil{
print("ther's an error : \(error)")
}
}
default:
print("Case Default")
}
时,应用程式会提示用户进行提醒和用户的权限以上解释授予我的下一个功能功能执行,但过了一段时间(5-10秒)
任何人都可以解释为什么会发生?
嘿人感谢您的回应,感谢您的努力。 –