Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7017437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:54:50+00:00 2026-05-27T22:54:50+00:00

eventStore=[[EKEventStore alloc] init]; EKEvent *addEvent=[EKEvent eventWithEventStore:eventStore]; addEvent.title=@hello; addEvent.startDate=messageDate; addEvent.endDate=[addEvent.startDate dateByAddingTimeInterval:600]; [addEvent setCalendar:[eventStore defaultCalendarForNewEvents]]; addEvent.alarms=[NSArray

  • 0
eventStore=[[EKEventStore alloc] init];
EKEvent *addEvent=[EKEvent eventWithEventStore:eventStore];
addEvent.title=@"hello";
addEvent.startDate=messageDate;
addEvent.endDate=[addEvent.startDate dateByAddingTimeInterval:600];
[addEvent setCalendar:[eventStore defaultCalendarForNewEvents]];
addEvent.alarms=[NSArray arrayWithObject:[EKAlarm alarmWithAbsoluteDate:addEvent.startDate]];
[eventStore saveEvent:addEvent span:EKSpanThisEvent error:nil];

The code above works fine in ios 4.2 but not in ios 5. I have the code in applicationDidfinishingLaunching method. Due to error, black screen appears and app exits. Only recurrenceRules has changed in ios 5 and I have not made use of it. All other properties are available in superclass EKCalendarItem. I cannot test it since I have xcode 3.2 and snow leopard. I am looking to debug the line at which error occurs causing the app to quit. I doubt it is related to setCalendar or using alarms property.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:54:51+00:00Added an answer on May 27, 2026 at 10:54 pm

    The code is correct and works in iOS 5. The reason for my error was the first line

    eventStore=[[EKEventStore alloc] init];
    

    Since initializing eventstore takes some time, placing it in application launch method resulted in time out. I found it from my crash report stating:

    "Elapsed application CPU time (seconds):30 seconds"
    

    The app is supposed to launch within 10 seconds. if not time out occurs with Exception Codes: 0x8badf00d

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the following code: //create instance of EKEventStore EKEventStore *eventStore = [[EKEventStore alloc]
Code bellow will create eventstore for named connection. var es = Wireup.Init() .UsingSqlPersistence(DB) .Build();
I keep getting an error when I try to set my startDate and endDate.
I was trying to add an ical event using this code. EKEventStore *eventStore =
I have this method to add an event to iOS calendar: -(IBAction)addEvent:(id)sender { EKEventStore
Hi all I am using below code to create an event : EKEvent *oneLabEvent
With the amazing library EventStore 3.0 there is a store.Advanced.GetUnDispatchedCommits(); What is the best
I've read up on Jonathan Oliver 's .NET EventStore library, and I must say
i would like to know how to fetch all events from an EventStore using
I'm looking for good examples of testing the domain using JOlivers CommonDomain and EventStore

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.