Skip to content

Nataliengieng/Today

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Today App

This app is developed based on the Apple Developer Tutorials - UIKit essentials.

Troubleshooting

Problem 1

Becasue the tutorial is based on iOS 16, in section "Loading reminders", the function requestAccess(to:completion:) is deprecated in iOS17. So that errors will occur when using the code from the tutorial

Solution to Problem 1

Replacing below codes

var isAvailable: Bool {
    EKEventStore.authorizationStatus(for: .reminder) == .authorized
}

func requestAccess() async throws {
    ...
    case .notDetermined:
        let accessGranted = try await ekStore.requestAccess(to: .reminder)
        guard accessGranted else {
            throw TodayError.accessDenied
        }
    ...
}

To...

var isAvailable: Bool {
    EKEventStore.authorizationStatus(for: .reminder) == .fullAccess
}

func requestAccess() async throws {
    ...
    case .notDetermined:
        let accessGranted = try await ekStore.requestFullAccessToReminders()
        guard accessGranted else {
            throw TodayError.accessDenied
        }
    ...
}

About

Getting started with UIKit framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages