eventkit

EKAlarm will not set in iOS 5

笑着哭i 提交于 2019-11-28 05:41:53
问题 I wrote the following snippet to create an event. Setting the alarm works fine in iOS 4, but in iOS 5 it doesn't get set. Is this a bug or am I missing something? EKCalendar *cal = [self.eventStore defaultCalendarForNewEvents]; EKEvent *event = [EKEvent eventWithEventStore:self.eventStore]; event.calendar = cal; // ....... EKAlarm *alarm = [EKAlarm alarmWithRelativeOffset:-3600]; event.alarms = [NSArray arrayWithObject:alarm]; // ....... 回答1: I had the same error. The problem seems that

How to identify EKEvent uniquely with Sync across the devices

旧巷老猫 提交于 2019-11-28 02:25:28
I am trying to make Event Syncing feature for a Project. I need to sync events with the remote server. Let's say I Installed the App in Device A. If I login to another device lets take B, then events synced from A should also appear in Device B, and events of B should also be synced. Now if I again login into the Device A, Events of B should be added. But events previously from A should not again be added to Device A again For this I decided to keep its eventIdentifier on the remote database. The Issue now happens when I again Go back to Device B, where events previously synced from Device A

Modifying EKParticipants (attendees) in EventKit like Sunrise

放肆的年华 提交于 2019-11-27 20:08:25
My goal is to add some invitees to an EKEvent . I've looked into other questions like this, such as this one , but all say that it is essentially impossible to add EKParticipant s to an EKEvent programmatically. I do see that the attendees property is read-only, but I see other services like Sunrise using it in their mobile app. I'm confident that they're using some system that at least partially integrates with EventKit because they're pulling in calendars from the user's iCal app. Invites sent from an added Exchange account, for example, are also clearly sent by the Exchange service as

How to customise EKEventEditViewController

[亡魂溺海] 提交于 2019-11-27 18:36:56
问题 I am using default EKEventEditViewController in my App and I want to customize it, currently it shows all fields that came in default EKEventEditViewController , but I don't want to show URL field and also want to add Timezone field. Can I do that and if yes then pleas let me know how can I do this? 回答1: you can use this excerpt: 1) make your viewcontroller the delegate of your EKEventEditViewController EKEventEditViewController *addController = [[EKEventEditViewController alloc] init];

iPhone simulator - how to detect when app is running on simulator (so can setup test data)?

北城余情 提交于 2019-11-27 15:39:33
问题 Any sample code that would show me how to, in my iPhone application code: How to detect if the application has just been DEPLOYED to be run to a simulator (and not a device) [if "Deployed" isn't available, then just detecting when the app is being run on the simulator as opposed to a device) Where about in my iPhone app code would I put the lines that setup my test data in the simulator - this is noting I wanted the test data to be effectively wiped clean/re-instated each time I recompile and

How to add events in iPhone using Event Kit framework

大兔子大兔子 提交于 2019-11-27 12:57:44
I am making a Restaurant application in which i need to add events in calendar, events information are coming from server, if client add any event it should show in calendar for that specified date, i have used event kit frame work and successfully added one event into the calendar, however how to add multiple events in calendar using event kit. First of All, Add EventKit Framework and import it in .h file. Like below. #import <EventKit/EventKit.h> See Below Function and Modify it as per your need. -(IBAction)AddEvent:(id)sender{ EKEventStore *eventSotre = [[EKEventStore alloc] init]; EKEvent

How to programmatically add calendar subscriptions on iOS?

荒凉一梦 提交于 2019-11-27 01:25:08
问题 Via the settings panel of your iPhone, you can add a subscription to a remote .ics calendar format. I have a Dutch iPhone app that does this from within the app (see the screenshot below, "abonneren op de agenda" means "subscribe to the calendar"), but there must be others too. I want to mimic this behavior for a project of mine, but I can't find the API to do this with. It looks like it's not a part of EventKit, but because there's no app switching going on when you hit 'subscribe' in the

Fetch all events from EventStore EventKit iOS

旧街凉风 提交于 2019-11-27 00:41:01
i would like to know how to fetch all events from an EventStore using EventKit in iOS. This way i can specify all events for today: - (NSArray *)fetchEventsForToday { NSDate *startDate = [NSDate date]; // endDate is 1 day = 60*60*24 seconds = 86400 seconds from startDate NSDate *endDate = [NSDate dateWithTimeIntervalSinceNow:86400]; // Create the predicate. Pass it the default calendar. NSArray *calendarArray = [NSArray arrayWithObject:defaultCalendar]; NSPredicate *predicate = [self.eventStore predicateForEventsWithStartDate:startDate endDate:endDate calendars:calendarArray]; // Fetch all

Fetch all events from EventStore EventKit iOS

亡梦爱人 提交于 2019-11-26 09:28:40
问题 i would like to know how to fetch all events from an EventStore using EventKit in iOS. This way i can specify all events for today: - (NSArray *)fetchEventsForToday { NSDate *startDate = [NSDate date]; // endDate is 1 day = 60*60*24 seconds = 86400 seconds from startDate NSDate *endDate = [NSDate dateWithTimeIntervalSinceNow:86400]; // Create the predicate. Pass it the default calendar. NSArray *calendarArray = [NSArray arrayWithObject:defaultCalendar]; NSPredicate *predicate = [self

Programmatically add custom event in the iPhone Calendar

我是研究僧i 提交于 2019-11-26 01:34:35
问题 Is there any way to add iCal event to the iPhone Calendar from the custom App? 回答1: Based on Apple Documentation, this has changed a bit as of iOS 6.0. 1) You should request access to the user's calendar via "requestAccessToEntityType:completion:" and execute the event handling inside of a block. 2) You need to commit your event now or pass the "commit" param to your save/remove call Everything else stays the same... Add the EventKit framework and #import <EventKit/EventKit.h> to your code.