I want to make iOS Module with Titanium appcelerator. I have connected app.js file to xCode. every this is working fine.
I can send data and get response. But when I write code for add Event in default Calendar then this is crashed
EKEventStore *eventStore1 = [[EKEventStore alloc] init];
EKEvent *event = [EKEvent eventWithEventStore:eventStore1];
event.title = @"EVENT TITLE 4";
event.notes = @"NOtes";
event.startDate = [[NSDate alloc] init];
event.endDate = [[NSDate alloc] initWithTimeInterval:600 sinceDate:event.startDate];
[event setCalendar:[eventStore1 defaultCalendarForNewEvents]];
NSError *err;
[eventStore1 saveEvent:event span:EKSpanThisEvent error:&err];
NSLog(@" Error is %@",err);
How I solve this problem?
this is Error Msg
output = run.run(args,False,False,o)
[DEBUG] File "/Users/mac03/Library/Application Support/Titanium/mobilesdk/osx/2.0.2.GA/iphone/run.py", line 41, in run
[DEBUG] sys.exit(rc)
[DEBUG] SystemExit: 65
[ERROR] Build Failed. See: /var/folders/5s/3wmzx34548d9jnj7z7v1ylc40000gn/T/mLmdFS2ti/test/build/iphone/build/build.log
mac03:test mac03$ titanium run
I have add Eventkit.framework and also import.
You need to change your module.xconfig file to include this line.
This informs the application to build the EventKit framework into the main binary, it is not enough just to include it in your modules XCode project. Check this part of the docs for more information.