Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

fix: Learners can't sync courses to calendar on iPhone #1818

Conversation

shafqat-muneer
Copy link
Contributor

Description

LEARNER-9807
Prior to this update, individuals using iPhones with iOS 17 or later were unable to synchronize courses with the calendar on their devices. The problem stemmed from the utilization of a deprecated function for accessing calendar events permissions.

Deprecated Function of EKEventStore:

requestAccess(to:completion:)
For iOS 17 and subsequent versions, utilizing this method does not trigger an access prompt; instead, it promptly invokes the completion block with an error.

Within this pull request, we have incorporated a new method for the EKEventStore that is compatible with iOS 17 and later versions.

requestFullAccessToEvents(completion:)

Additionally, included the NSCalendarsFullAccessUsageDescription key in the Source/edX-Info.plist file.

How to test this PR

  • To assess this pull request, it is necessary to possess an iPhone running iOS 17 or a newer version. Navigate to any course and access its dates section for testing.
  • Enable the "Sync to calendar" option, and you should observe a prompt requesting calendar permissions.

Copy link
Contributor

@saeedbashir saeedbashir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@shafqat-muneer shafqat-muneer merged commit 8193655 into openedx-unsupported:master Feb 6, 2024
2 of 6 checks passed
@shafqat-muneer shafqat-muneer deleted the Shafqat/LEARNER-9807 branch February 6, 2024 06:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants