ekeventstore

Error while implementing Sandbox: “deny file-read-metadata /Library”

南楼画角 提交于 2019-12-20 19:54:00
问题 I realize that I'm a bit late to the game here in getting sandbox-ready, but so it goes. I'm developing for OS X 10.9. The app displays Calendar event data, but does not allow editing, so I have enabled the Calendars capability. The app works great with sandboxing enabled when I run it from Xcode, but when I export it signed with Developer ID, the app runs, but can't access the Calendar data. What's more, the system never asks me to allow the app to access Calendar data. When I run the app,

Error while implementing Sandbox: “deny file-read-metadata /Library”

China☆狼群 提交于 2019-12-20 19:52:14
问题 I realize that I'm a bit late to the game here in getting sandbox-ready, but so it goes. I'm developing for OS X 10.9. The app displays Calendar event data, but does not allow editing, so I have enabled the Calendars capability. The app works great with sandboxing enabled when I run it from Xcode, but when I export it signed with Developer ID, the app runs, but can't access the Calendar data. What's more, the system never asks me to allow the app to access Calendar data. When I run the app,

How to add an event in the device calendar using swift

我的未来我决定 提交于 2019-12-17 21:49:35
问题 I would be interested in knowing how to add a calendar event in the device, but using swift. I know there are some examples made in Objective-C, but at the moment nothing in swift. Many thanks. 回答1: Swift 3.0 version let eventStore : EKEventStore = EKEventStore() // 'EKEntityTypeReminder' or 'EKEntityTypeEvent' eventStore.requestAccess(to: .event) { (granted, error) in if (granted) && (error == nil) { print("granted \(granted)") print("error \(error)") let event:EKEvent = EKEvent(eventStore:

EKEventEditViewController freezes app and loads after long time

ぐ巨炮叔叔 提交于 2019-12-14 03:26:41
问题 I have the following code in swift: var eventController = EKEventEditViewController() eventController.editViewDelegate = self var store = EKEventStore() eventController.eventStore = store var event = EKEvent(eventStore: store) event.title = viewModel.roleName event.location = viewModel.location event.startDate = viewModel.startDate event.endDate = viewModel.endDate eventController.event = event var status = EKEventStore.authorizationStatusForEntityType(EKEntityTypeEvent) switch status { case

Past events in EKCalendar

橙三吉。 提交于 2019-12-13 17:28:22
问题 I'm trying to get all the events from a determined EKCalendar , but if I call eventsMatching Predicate: with a predicate generated with predicateForEventsWithStartDate:endDate:calendars: and a past ' startDate ' I get a null object. It's a bug? Or there is no way I can retrive the past events? EDIT (NSData decalarations): [[self eventStore] predicateForEventsWithStartDate:[NSDate distantPast] endDate:[NSDate distantFuture] calendars:syncedCalendars] 回答1: Try change your code to to: NSDate*

Local EKCalendar saved with not errors, disappears

。_饼干妹妹 提交于 2019-12-13 04:49:45
问题 I'm trying to create a calendar with EKSourceTypeLocal source. Iterate over the self.eventStore.sources , find the one with sourceType == .Local and attempt to create a new calendar with it. self.calendar = EKCalendar(forEntityType: EKEntityType.Event, eventStore: self.eventStore) self.calendar?.title = "My Awesome Calendar" self.calendar?.source = src // src.sourceType == .Local print("Created \(self.calendar!)") do { try self.eventStore.saveCalendar(self.calendar!, commit: true) } catch let

EKEvent accept event invtation

元气小坏坏 提交于 2019-12-13 01:28:53
问题 I wonder how can I set accept/may be/decline participant status for an EKEvent for which current user has been invited? I can check the participant set but EKEvent found nothing for which I can set its status. 回答1: Status is maintained per each EKParticipant (not on the EKEvent itself), but you can't set it programmatically: [EKParticipant participantStatus] is read only. Per the Apple docs, Event Kit cannot add participants to an event nor change participant information. The closest

Get wrong time when adding an event to default calendar in iPhone

故事扮演 提交于 2019-12-11 16:27:04
问题 Now i am working on calendar application in iPhone. I am trying to add an event to default calendar in iPhone. In this case adding an event is successfully completed.But I can't add an event in proper start time . Start date of event is exactly correct but time is different in default calendar of iPhone.I used the following code .Please help me.. NSLog(@"start label is : %@",startLabel.text);// 2013-03-28 12:03:41 PM NSLog(@"end label is : %@",endLabel.text);//2013-03-28 01:03:41 PM

saveEvent returning “No calendar has been set”

纵然是瞬间 提交于 2019-12-07 06:05:52
问题 I am attempting to save an event into the calendar, from my application. My code works for iOS 7, but on iOS 6 , it returns No calendar has been set. The application prompts for user to grant access to the calendar, on iOS 7. But no such prompt appears for iOS 6. Although the application is granted access in the Settings-> Privacy -> Calendar. And yes, I have already implemented the requestAccessToEntityType:completion: . Here is my code snippet . EKEventStore *objStore = [[EKEventStore alloc

saveEvent returning “No calendar has been set”

空扰寡人 提交于 2019-12-05 15:36:18
I am attempting to save an event into the calendar, from my application. My code works for iOS 7, but on iOS 6 , it returns No calendar has been set. The application prompts for user to grant access to the calendar, on iOS 7. But no such prompt appears for iOS 6. Although the application is granted access in the Settings-> Privacy -> Calendar. And yes, I have already implemented the requestAccessToEntityType:completion: . Here is my code snippet . EKEventStore *objStore = [[EKEventStore alloc]init]; if ([objStore respondsToSelector:@selector(requestAccessToEntityType:completion:)]) { // iOS 6