ekeventstore

UIAlertView takes a long time to appear when called in a completion block

和自甴很熟 提交于 2020-01-29 17:58:28
问题 Part of my app requires calendar access, which requires a call to the EKEventStore method -(void)requestAccessToEntityType:(EKEntityType)entityType completion:(EKEventStoreRequestAccessCompletionHandler)completion as of iOS 7. I added the request, and everything runs smoothly if the user selects to allow access, but a problem arises if the user denies or has previously denied access. I added a UIAlertView to notify the user if access is denied, but the UIAlertView consistently takes 20-30

Why use dispatch_async when using performSegueWithIdentifier in requestAccessToEntity:completion?

旧城冷巷雨未停 提交于 2020-01-24 10:02:07
问题 When I call the performSegueWithIdentifier in the completion block, if I do not wrap the call in a dispatch_async, it literally takes 10 seconds for the segue to actually happen. However, I can do other things without wrapping them in the same dispatch_async, such as doing core data work, or, logging "things"... Any insight as to how this works and why... I am lost. If this isn't the right place to ask something like this, I apologize. EKEventStore *store = [[EKEventStore alloc] init]; [store

How to add some additional fields to EKEvent

那年仲夏 提交于 2020-01-14 14:32:14
问题 One solution could be: Creating a new model EKEventExt and add a One-to-One relationship between them, I'm not sure whether it's doable, since EKEventExt is stored in my one sqlite and EKEvent is stored in eventstore. 回答1: It would be possible to append custom fields to calendar formats such as iCal (like x-my-field ), there is no EKEvent property like .customFields etc. Saying this, unfortunately it's not possible to store your custom data in any fields. It would be possible to create your

predicateForEventsWithStartDate:endDate:calendars: EKEventStore doesn't work

拜拜、爱过 提交于 2020-01-05 04:55:09
问题 i have saved 28 EKEvent in a EKCalendar in this range date: 2012-01-01 and 2013-01-18, the EKEvent are all stored and i can see it in the iOS Calendar on iCloud, then i want retrieve all this EKEvent in the range 2012-01-01 and 2013-01-18 and i use this method of EKEventStore: predicateForEventsWithStartDate:endDate:calendars: that is a NSPredicate to fetch event in the calendar, i pass with start date 2012-01-01 and with endDate:2013-01-18 so the array that return me with the EKEvent have

iOS: EKEventStore sources / defaultCalendarForNewEvents / calendarsForEntityType all return nothing AFTER authorization

情到浓时终转凉″ 提交于 2020-01-03 15:21:19
问题 I have an app I am trying to help get out the door. This code was originally written with iOS5 in mind by another team. I added the requestAccessToEntityType:completion: call which runs successfully. However, after being granted access, I get no sources / defaultCalendar or calendars based on entity. And I cannot create a new calendar. When calling defaultCalendarForNewEvents I get this error Error Domain=EKCADErrorDomain Code=1013 "The operation couldn’t be completed. (EKCADErrorDomain error

How to use requestAccessToEntityType method in Swift iOS 8

落花浮王杯 提交于 2020-01-02 05:23:46
问题 I'm trying to get a list of events by using EKEventStore using Swift in iOS8, and the documentation is not updated yet as far as I can tell. This is what I'm trying to do: let eventStore = EKEventStore() eventStore.requestAccessToEntityType(EKEntityType(), EKEventStoreRequestAccessCompletionHandler(Bool(), NSError(){})) This is the error I get: 'EKEventStoreRequestAccessCompletionHandler' is not constructible with '(Bool, NSError) Do you know how can I use the method or the handler correctly

How to use requestAccessToEntityType method in Swift iOS 8

三世轮回 提交于 2020-01-02 05:23:37
问题 I'm trying to get a list of events by using EKEventStore using Swift in iOS8, and the documentation is not updated yet as far as I can tell. This is what I'm trying to do: let eventStore = EKEventStore() eventStore.requestAccessToEntityType(EKEntityType(), EKEventStoreRequestAccessCompletionHandler(Bool(), NSError(){})) This is the error I get: 'EKEventStoreRequestAccessCompletionHandler' is not constructible with '(Bool, NSError) Do you know how can I use the method or the handler correctly

Creating an EKCalendar in EKEventStore - Swift

雨燕双飞 提交于 2020-01-01 19:27:10
问题 I'm trying to create a single calendar into EKEventStore when the my app first runs. I found this tutorial but I don't really know enough about Objective-C to translate it to Swift, and also from the research that I've done I'm wondering if this method is still possible in ios8. 回答1: Try (note this is for a reminder type, but you can just change the type if you need to): let eventStore = EKEventStore() var yourReminderCalendar: EKCalendar? func retrieveYourCalendar() { let calendars =

EKEvents/EKReminders set but are not displaying on calendar

你说的曾经没有我的故事 提交于 2019-12-23 21:05:46
问题 I am setting events to calendar. The code works throughly but wen I check if the event r set on my device's calendar. It doesnt show anything. I am doing this in ios6, when I do it for ios5, it works fine. 回答1: This worked for me, you can try the same. I had to navigate from one page to another, so posting the link to the two pages. First -> https://discussions.apple.com/message/16497282#16497282 Then, from there to -> https://discussions.apple.com/message/16479587#16479587 I had to go into

Deleting an EKEvent from device's calendar using its identifier

拜拜、爱过 提交于 2019-12-21 23:08:20
问题 I am creating EKEvent, saving it and saving its identifier as well. I wanna access this identifier and delete the specific Event. I am able to retrieve the proper Identifier from database. However, the Event isn't getting deleted from my Device's calendar. My code to delete the event : `NSError* err; EKEvent *myEvent = [EKEvent eventWithEventStore:homeobj.eventDB]; myEvent = [homeobj.eventDB eventWithIdentifier:[dbObj selectEventIdentifier:mypass]]; [homeobj.eventDB removeEvent:myEvent span