Skip to content

Update to match latest iOS Calendar plugin, add allDay, don't return error if user cancels dialog.#4

Closed
trevoriancox wants to merge 2 commits into
tenforwardconsulting:masterfrom
trevoriancox:master
Closed

Update to match latest iOS Calendar plugin, add allDay, don't return error if user cancels dialog.#4
trevoriancox wants to merge 2 commits into
tenforwardconsulting:masterfrom
trevoriancox:master

Conversation

@trevoriancox

Copy link
Copy Markdown

Change parameters to match both latest changes to iOS Calendar plugin (calendarName) as well as my pull request to the iOS plugin (reminderMinutes).
Don't call failure callback with technical error message if the user just cancelled the dialog.
Add support for allDay events.

… (calendarName) as well as my pull request to the iOS plugin (reminderMinutes).

Don't call failure callback if the user just cancelled the dialog.
Add support for allDay events.
@samsonasu

Copy link
Copy Markdown
Member

Where is the ios project currently maintained? I thought it was https://github.com/felixactv8/Phonegap-Calendar-Plugin-ios and I don't see any thing about these parameters.

Also, if we're going to change the signature to allow more functionality (i.e. allDay), I'd prefer to refactor to a format that looks more like
function(successCallback, errorCallback, options)
so that it is easier to maintain backwards compatibility. It would be ideal if we could get this synced up with whoever is maintaining the ios version as well.

@trevoriancox

Copy link
Copy Markdown
Author

Yes, it looks like that's the most up-to-date github project for iOS. Sorry, it seems the code I referenced with the "calendarName" parameter came from some (non-HEAD) version of iPhone/CalendarPlugin in https://github.com/purplecabbage/phonegap-plugins. And my pull request went there: purplecabbage/phonegap-plugins#105.

I agree, an options parameter would better.

I notice that the Android plugin documentation shows Date objects as parameters while the documentation for the iOS plugin shows date strings. We may want to check if they really accept the same parameter types. (And it would be nice to document whether the dates are localtime or UTC.)

@samsonasu

Copy link
Copy Markdown
Member

I think https://github.com/phonegap/phonegap-plugins is more up to date than the purplecabbage repo. I'll try and get ahold of @felixactv8 to see his thoughts on refactoring the method signatures, and you can also try Pull Requesting his repo, although I think we should change the signature to use an options hash first.

We should definitely accept the same parameter types, and I'm more in favor of using Date objects since then you don't need to worry about timezones.

@felix-digitalkarma

Copy link
Copy Markdown

Hi Guys, Thanks for reaching out.

I haven't maintained this in a while, since Cordova was going through a lot of versions. I wanted to wait until any major changes were somewhat done before changing code..

I'm all up for refactoring if it makes sense.

What's the plan ?

-felix

@samsonasu

Copy link
Copy Markdown
Member

Hey Felix,

I think we should change the method signatures to look like this:

calendarPlugin.prototype.createEvent = function(successCallback, errorCallback, options)

I also propose we try and use javascript Date objects instead of strings but I would be ok with accepting either. I'm happy to fix up this pull request to fit the new style, and I can do ios as well if that's easier for you. I think @trevoriancox had some other changes in a pull request against the wrong repo. Maybe if he can re-work that on and submit to you, we can have this wrapped up this week!

Cheers,

@trevoriancox

Copy link
Copy Markdown
Author

My proposal was to add reminder time and allDay, so that would work well with the idea of a new options parameter.
purplecabbage/phonegap-plugins#105
I'm using my code in production and I can rework it if we agree on the options parameter, but not this week. :)

@felix-digitalkarma

Copy link
Copy Markdown

@samsonasu, i'm cool with that method signature...go ahead and make the change, test then make a pull request and i'll make sure it gets pulled.

@trevor, that sounds great. There's a lot of changes, and my only concern is iOS7..if there's anything that's changing with the framework...

Keep me posted and I'll pull the requests as soon as I see them...

Thanks,
Felix

@trevor

trevor commented Aug 27, 2013

Copy link
Copy Markdown

mm, not me. :)

@ghost

ghost commented Jul 13, 2016

Copy link
Copy Markdown

No activity in 3 years. Closing.

@ghost ghost closed this Jul 13, 2016
This pull request was closed.
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.

4 participants