iphone - How many events can i add to the calendar app in iOS? -
i utilize code add together events calendar app on ios
int = 0; for(schedule *sche in schedulearray){ ekeventstore *eventstore=[[ekeventstore alloc] init]; ekevent *addevent=[ekevent eventwitheventstore:eventstore]; addevent.title=@"hello"; addevent.startdate=[nsdate date]; addevent.enddate=[addevent.startdate datebyaddingtimeinterval:600]; [addevent setcalendar:[eventstore defaultcalendarfornewevents]]; addevent.alarms=[nsarray arraywithobject:[ekalarm alarmwithabsolutedate:addevent.startdate]]; nserror *err; [eventstore saveevent:addevent span:ekspanthisevent error:&err]; if (err == nil) { nsstring* str = [[nsstring alloc] initwithformat:@"%@", addevent.eventidentifier]; nslog(@"string %d: %@",i, str); } else { nslog(@"error %@",err); } i++; }
i want add together events info saved before in schedulearray, have 86 object in schedulearray, seem add together 82 events calendar. here log result:
....... 2013-02-19 14:04:28.237 mydtuschedule[5382:6607] string 67: bbcf7782-5d60-42d7-8478-ef80604fbf41:4a9e6404-b35b-4534-a7f2-5c6082f3d19a 2013-02-19 14:04:28.284 mydtuschedule[5382:6607] string 68: bbcf7782-5d60-42d7-8478-ef80604fbf41:47f0b6cf-3f98-49f9-b407-7a28b4f12c83 2013-02-19 14:04:28.343 mydtuschedule[5382:6607] string 69: bbcf7782-5d60-42d7-8478-ef80604fbf41:fb802e03-876d-4adb-93b9-c3fab628ff57 2013-02-19 14:04:28.412 mydtuschedule[5382:6607] string 70: bbcf7782-5d60-42d7-8478-ef80604fbf41:21786b81-bac8-4979-9a04-b63ce404b870 2013-02-19 14:04:28.479 mydtuschedule[5382:6607] string 71: bbcf7782-5d60-42d7-8478-ef80604fbf41:9cf1dda5-b8f3-4835-a5bc-a9fe745e17d1 2013-02-19 14:04:28.503 mydtuschedule[5382:6607] string 72: bbcf7782-5d60-42d7-8478-ef80604fbf41:834be2ce-e810-4ea7-acfc-01faaa46453e 2013-02-19 14:04:28.580 mydtuschedule[5382:6607] string 73: bbcf7782-5d60-42d7-8478-ef80604fbf41:bfbdbecf-1a31-4363-9fd2-66c05f4085b9 2013-02-19 14:04:28.629 mydtuschedule[5382:6607] string 74: bbcf7782-5d60-42d7-8478-ef80604fbf41:3512265d-10a9-40ae-8435-0bdbc1d72a1b 2013-02-19 14:04:28.690 mydtuschedule[5382:6607] string 75: bbcf7782-5d60-42d7-8478-ef80604fbf41:96c68cac-2955-4edd-8fe2-442cddde39a8 2013-02-19 14:04:28.733 mydtuschedule[5382:6607] string 76: bbcf7782-5d60-42d7-8478-ef80604fbf41:2724ebfd-ab03-4e6a-8094-25d7035b517c 2013-02-19 14:04:28.818 mydtuschedule[5382:6607] string 77: bbcf7782-5d60-42d7-8478-ef80604fbf41:cc14386f-e21a-41aa-82d5-42b05149eb09 2013-02-19 14:04:28.865 mydtuschedule[5382:6607] string 78: bbcf7782-5d60-42d7-8478-ef80604fbf41:3738b384-21b9-4544-8dd2-c50032b5404d 2013-02-19 14:04:28.929 mydtuschedule[5382:6607] string 79: bbcf7782-5d60-42d7-8478-ef80604fbf41:70f820a8-37a5-4cc1-8e0e-696736cabc2c 2013-02-19 14:04:28.964 mydtuschedule[5382:6607] string 80: bbcf7782-5d60-42d7-8478-ef80604fbf41:864e4def-275f-4458-a5e2-a136c2f57982 2013-02-19 14:04:29.019 mydtuschedule[5382:6607] string 81: bbcf7782-5d60-42d7-8478-ef80604fbf41:061bf4ae-6bd5-4b3e-b2fc-35a18a7d99a5 2013-02-19 14:04:29.042 mydtuschedule[5382:6607] error error domain=ekerrordomain code=1 "no calendar has been set." userinfo=0xe21da30 {nslocalizeddescription=no calendar has been set.} 2013-02-19 14:04:29.052 mydtuschedule[5382:6607] error error domain=ekerrordomain code=1 "no calendar has been set." userinfo=0xe1551d0 {nslocalizeddescription=no calendar has been set.} 2013-02-19 14:04:29.054 mydtuschedule[5382:6607] error error domain=ekerrordomain code=1 "no calendar has been set." userinfo=0xe21bf90 {nslocalizeddescription=no calendar has been set.} 2013-02-19 14:04:29.058 mydtuschedule[5382:6607] error error domain=ekerrordomain code=1 "no calendar has been set." userinfo=0xe21abd0 {nslocalizeddescription=no calendar has been set.}
i don't know why these errors happen? how can add together events calendar?
iphone ios objective-c eventkit
No comments:
Post a Comment