|
@@ -9,6 +9,7 @@
|
|
|
import UIKit
|
|
import UIKit
|
|
|
import CoreData
|
|
import CoreData
|
|
|
import UserNotifications
|
|
import UserNotifications
|
|
|
|
|
+import EventKit
|
|
|
|
|
|
|
|
@UIApplicationMain
|
|
@UIApplicationMain
|
|
|
class AppDelegate: UIResponder, UIApplicationDelegate {
|
|
class AppDelegate: UIResponder, UIApplicationDelegate {
|
|
@@ -27,6 +28,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|
|
print("User has declined notifications")
|
|
print("User has declined notifications")
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ let store = EKEventStore()
|
|
|
|
|
+ store.requestAccess(to: .event) {(granted, error) in
|
|
|
|
|
+ if !granted { return }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return true
|
|
return true
|
|
|
}
|
|
}
|