我想用 Titanium appcelerator 制作 iOS 模块。我已将 app.js 文件连接到 xCode。这一切都很好。我可以发送数据并获得响应。但是当我在默认日历中编写添加事件的代码时,它就崩溃了
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);
我如何解决这个问题?这是错误信息
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
我添加了 Eventkit.framework 并导入。