Calendar-PhoneGap-Plugin icon indicating copy to clipboard operation
Calendar-PhoneGap-Plugin copied to clipboard

Support for iOS 17

Open sjregan opened this issue 2 years ago • 17 comments

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

sjregan avatar Oct 03 '23 04:10 sjregan

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

matfantinel avatar Oct 03 '23 17:10 matfantinel

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>

hooliapps avatar Oct 11 '23 17:10 hooliapps

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).

zarko-tg avatar Oct 12 '23 22:10 zarko-tg

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.

sjregan avatar Oct 13 '23 06:10 sjregan

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

Ardavan92 avatar Oct 25 '23 15:10 Ardavan92

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 ?

hooliapps avatar Oct 25 '23 16:10 hooliapps

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

danielprrazevedo avatar Dec 14 '23 14:12 danielprrazevedo

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

Pamblam avatar Dec 14 '23 18:12 Pamblam

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

sjregan avatar Dec 20 '23 17:12 sjregan

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

jkenjarCR avatar Dec 21 '23 01:12 jkenjarCR

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

sjregan avatar Dec 21 '23 08:12 sjregan

@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?

jkenjarCR avatar Dec 21 '23 12:12 jkenjarCR

@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

sjregan avatar Dec 21 '23 12:12 sjregan

I cant figure out the url :(

seanaguinaga avatar Jan 23 '24 03:01 seanaguinaga

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"

MrBasque avatar Feb 03 '24 15:02 MrBasque

Hello

is there any new version released ?

ipehimanshu avatar Feb 19 '24 06:02 ipehimanshu