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...)
Related
I've got a calendar that has iCalendar standard integration, but I'm not sure how to really get the data from the iCal link and bring it over to the iOS app I'm developing. I'm using JTAppleCalendar, and I've watched his video on how to stream data from a server, but I'm still not quite sure how to get the iCal event data into a form/place that is able to be utilized by the app.
I've already searched around and watched videos but I was unable to find an answer. I've also tried importing the calendar to google calendar for use through that API, but I'm unable to get that working either.
I want to be able to have the calendar remain public and for the user to be able to see the events without having to sign in to anything (like google for example) or have to add the iCal on their own for it to work.
This may be a simple question, but I'm still in the very early stages of learning iOS dev, so sorry about that.
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.
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.
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.