Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for iOS 17 #567

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sjregan
Copy link

@sjregan sjregan commented Oct 3, 2023

Fixes permission requests in iOS 17.
Allows write only calendar access to be requested.

kallewangstedt and others added 3 commits September 26, 2023 22:28
…log choice has been selected, and full calendar access is always requested in ios17
@matfantinel
Copy link

I can confirm these changes fixed the issue on my case (I manually replaced the content of the Calendar.h/.m files to test)

@hooliapps
Copy link

Hello i tested and i confirm that callbacks are now ok. (full perm mode)

But, i needed to add this code:

<!-- iOS 17 -->
<preference name="CALENDARS_FULL_ACCESS_USAGE_DESCRIPTION" default=" " />
<config-file target="*-Info.plist" parent="NSCalendarsFullAccessUsageDescription">
  <string>$CALENDARS_FULL_ACCESS_USAGE_DESCRIPTION</string>
</config-file>

@zarko-tg
Copy link

Well done @sjregan, this seems to be working. Though in our case I had to change plugin client logic to manual permission request, since it now no longer happens on initiation / function calls (cause now there is more than one kind of permission).

@sjregan
Copy link
Author

sjregan commented Oct 13, 2023

Well done @sjregan, this seems to be working. Though in our case I had to change plugin client logic to manual permission request, since it now no longer happens on initiation / function calls (cause now there is more than one kind of permission).

Yes, I should have mentioned that and put in a note in the readme.

@Ardavan92
Copy link

For me giving the necessary permissions in config.xml and adding the permissions in deviceready solved the issue for me.

@hooliapps
Copy link

I confirm it works with

$CALENDARS_FULL_ACCESS_USAGE_DESCRIPTION

I don't added Write only acces because I don't need it. But it can be a good idea to add it to config.xml

Any plan to update the plugin ?

elbertmcl added a commit to nirvanahq/Calendar-PhoneGap-Plugin that referenced this pull request Nov 10, 2023
Copy link

@terreng terreng left a comment

Choose a reason for hiding this comment

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

Tested and working as expected on iOS 12 and iOS 17.

@danielprrazevedo
Copy link

Hey @sjregan Thanks for the great work with this PR.
I tested your implementation and I'm not sure about one behavior I found.
When I run plugins.calendar.hasReadWritePermissions, if I haven't already run plugins.calendar.requestReadWritePermissions, it opens the permissions request popup. I'm curious about this behavior as I noticed you didn't change this function.
I'm using capacitor and testing in a iPhone 15 simulator with iOS 17.2

@Pamblam
Copy link

Pamblam commented Dec 14, 2023

17.1 is out, changed the condition to.. if (@available(iOS 17, *)) { (replaced 17.0 with 17), also this was necessary.

@sjregan
Copy link
Author

sjregan commented Dec 20, 2023

When I run plugins.calendar.hasReadWritePermissions, if I haven't already run plugins.calendar.requestReadWritePermissions, it opens the permissions request popup. I'm curious about this behavior as I noticed you didn't change this function. I'm using capacitor and testing in a iPhone 15 simulator with iOS 17.2

@danielprrazevedo no idea sorry, that function seemingly just returns a comparison to nil, so it shouldn’t trigger anything

@jkenjarCR
Copy link

When will this be pushed to the master branch? Having to replace the code manually really sucks

@sjregan
Copy link
Author

sjregan commented Dec 21, 2023

@jkenjarCR it’s disappointing when PRs don’t get merged, but you can point your package.json file to a specific commit

@jkenjarCR
Copy link

@jkenjarCR it’s disappointing when PRs don’t get merged, but you can point your package.json file to a specific commit

How do you do this?

@sjregan
Copy link
Author

sjregan commented Dec 21, 2023

@jkenjarCR it’s disappointing when PRs don’t get merged, but you can point your package.json file to a specific commit

How do you do this?

https://duckduckgo.com/?t=h_&q=npm+install+package+specific+commit&ia=web

@seanaguinaga
Copy link

I cant figure out the url :(

@MrBasque
Copy link

MrBasque commented Feb 3, 2024

I cant figure out the url :(

The url:
git://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin/pull/567/commits/1052bec0b75d7438a549cb7a61a5597994695d5a

npm command:
npm install --save "git://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin/pull/567/commits/1052bec0b75d7438a549cb7a61a5597994695d5a"

@ipehimanshu
Copy link

Hello

is there any new version released ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.