Is there any way to interact with the native Calendar application without using EventKit or EventKitUI? EventKit/EventKitUI lets you add/edit/delete etc. events in your native calendar, but I'm trying to find some way to add events to the native calendar so that when a user views an entry added thusly (viewed from the Calendar application, not from my application) by clicking on it, they see the item in a ViewController provided by my application (which has one or more extra buttons).
Is this possible, or do I have to emulate the entire native calendar inside my own application in order to get the calendar to behave the way I want it to?
Judging from the quarantine-like protection of other built in apps, I'd bet this is impossible. I'm only 99,9% percent sure, though.
Related
I need to display some events on the iphone calendar from either a local app or possibly a remote server. I need the events shown in the iphone calendar to be readonly and am trying to figure out the best approach for this. Couple of questions to help me with the approach
-From ios iphone app can I write calendar events as readonly?
-If I need to go from the server to the phone can I give the phone a url to a icalendar that is readonly? which will disallow updates to the item on the phone?
-If I consume the events from the icalendar in to an iphone application can I tell what the origin of the item is? meaning can I tell the difference between things the user made locally, exchange, gmail etc.. and the icalendar readonly feed
Thanks
I'm afraid you cannot create a read-only calendar entry in a users calendar. After all, it's the users calendar, not your apps.
Nor can you create a separate calendar specific for your app that can read from a URL. You could provide the URL to the user and ask them to add it to iCal manually, but you cannot do it via the EventKit Framework.
You can't tell the origin of an event as EKEvent doesn't have any sort of public property that provides this information.
You would be able to infer which was the read-only calendar by iterating over the available calenders and looking at their titles. However, this would only work on the assumptions the user actually added your calendar manually, and they didn't change the title.
The best way to do something like this with all the features you want would be to add in-app calendar functionality to your app and make it completely independent of iCal and EventKit.
Here are a couple of projects which could help ...
Kal
Calendar UI
I've dug around a bit in the Eventkit/EventkitUI docs and couldn't find an answer. Does the iOS SDK provide a way to display the Calendar chooser view that the built-in Calendar app uses when you want to move an event to a different calendar? If not, what would be the best way to build that? How do I know which account each calendar is from? How do I display the little color dot? Are there any 3rd party libraries that provide something like this?
Thanks!
EDIT: Specifically I'm asking about this screen:
You don't get the UI for free, but you can get a list of the user's calendars with an EventStore's Calendar property.
You cannot distinguish between the calendar events. They all belong to one calendar by default. Event Kit only allows you to add, edit events on the default calendar. And you will need to use either third party calendar to replicate the UI or you will need to create your own. The question link given by Vagrant seems to be answering about the third party calendars.
https://github.com/klazuka/Kal is the most fav.
I want to add events to native calendar from google's calendar programmatically ..i have and program that can fetch events from google calendar and show them in table view..how can i add these events to iphone's native calendar one by one...?
Just as a "thinking out of the box" suggestion, I assume just using Google Mobile Sync to do all this for you is out of the question? I can tell you from bitter experience (implementing the calendar part of Google Mobile Sync) that converting between different calendar representations isn't fun.
(Unfortunately I don't have any experience on the iPhone itself, so I can't offer any advice beyond that...)
I'm diving into iPhone/iPad development and I'm trying to find an elegant mechanism for allowing the user to select dates. It seems to me that a calendar control would be the best way to go, but I don't see one in anywhere in the SDK. All all I see is this overblown, the-price-is-right-looking DatePicker control.
Is this the only control that comes with UIKit for allowing the user to select dates?
What about the calendar control that the Calendar app uses?
Also, I should note I'm really trying to avoid using 3rd party code frameworks that have little or no documentation, because I'm new to all this and sufficient documentation on how to use it is a must at this point. Thanks so much in advance for all your wisdom!
Is this the only control that comes with UIKit for allowing the user to select dates?
Yes
What about the calendar that the Notes app uses?
(Do you mean the Calendar app? I don't recall any date pickers in Notes app.)
It's in the private CalendarUI.framework. There exists 3rd-party libraries, and you could implement one yourself, of course.
I am building an iPhone app that will need to display info primarily in a calendar view. Users will need to be able to search for entries and view them by day, month or in a list view. It seems like the built-in calendar type interface is ideal for my app. So I could build a similar calendar with 3 buttons at the bottom for list/day/month view as well as a button for today, in short a very similar interface to the built in iPhone calendar with different colors primarily. However, if I replicate it am I a) a lame copycat for replicating the built-in interface or smart for using a well-known iPhone metaphor and b) in danger of having my app rejected?
No if you replicate the calendar your app will be not rejected. (in case of your app has not embedded only the calendar) Your app can be rejected only if we reproduce an app which has already done by apple and/or if you use private APIs.
By the way you're not in the obligation to remake the calendar, it exists some good libraries to to this like it: http://github.com/devinross/tapkulibrary
There are many apps that replicate the calendar look sometimes adding additional graphical elements on the default look, for instance Calendar At-A-Glance. It seems Apple approves the use of this look these days.