EddyVerbruggen / Calendar-PhoneGap-Plugin

:date: Cordova plugin to Create, Change, Delete and Find Events in the native Calendar
773 stars 402 forks source link

Add the mandatory iOS 10 NSCalendarsUsageDescription plist key #302

Closed EddyVerbruggen closed 8 years ago

EddyVerbruggen commented 8 years ago

On iOS 10+ you need to provide a reason to the user for Calendar access. This plugin now adds an empty NSCalendarsUsageDescription key to the /platforms/ios/*-Info.plist file which you can override with your custom string per Apple's guideline.

EddyVerbruggen commented 8 years ago

Available in 4.5.1

MattDHill commented 8 years ago

Hi, this isn't working for me. The description is not being added to my app's info.plist. In config.xml, I show: `

</plugin>`

But it's not compiling down properly, any suggestions?

UPDATE

This is what shows in my plugin.xml file: `

`
EddyVerbruggen commented 8 years ago

@MattDHill makes sense since you're using the plugin from npm and the change with CALENDAR_USAGE_DESCRIPTION isn't there yet. Pull it from github and it should work.

MattDHill commented 8 years ago

Thanks @EddyVerbruggen, you are correct. That worked. But isn't the current npm version 4.5.3? In the commit comment above you say this feature was made available in 4.5.1. Also the readme makes no mention of this, just says to do cordova plugin add cordova-plugin-calendar --variable CALENDAR_USAGE_DESCRIPTION="This app uses your calendar".

EddyVerbruggen commented 8 years ago

Ha, yeah it's a bit confusion I admit. TL;DR: I'll push a new version to npm asap.

Longer version: 4.5.1 added an empty description make your app not crash when iOS 10 was targeted. On September 23rd (after the last npm version was released) a way was added to configure that description by passing in CALENDAR_USAGE_DESCRIPTION. I didn't push to npm yet because I wanted others to test the github version first, but I guess it's about time to push it.

EddyVerbruggen commented 8 years ago

Just published 4.5.4 to npm

revolunet commented 8 years ago

thanks

lse123 commented 7 years ago

hi this cordova-plugin-x-socialsharing uses Calendar-PhoneGap-Plugin ?? I was using Intel XDK, but when Cordova support stopped, started Adobe Phonegap, Android compiled OK, same iOS... but Apple Application Loader refused my Cordova iOS App, after a while got this email... from Apple iTunes connect::: // you have any idea what to do???

Dear developer,

We have discovered one or more issues with your recent delivery for "Polis Cyprus". To process your delivery, the following issues must be corrected:

Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCalendarsUsageDescription key with a string value explaining to the user how the app uses this data.

Once these issues have been corrected, you can then redeliver the corrected binary.

Regards,

The App Store team