Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-04-2010, 09:04 AM   #1 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 204
marciokoko is on a distinguished road
Question EventKit in Universal app (OS3.2) - weak link

hi guys!

I have a universal app that uses EventKit. I started coding the iPhone 4.0 part, with the new SDK and it worked perfectly. They i started coding for iPad and didnt add the EventKit code and it worked perfectly. {as well it should since its an appstore approved app that has been selling for about a yr now}.

I realize EventKit is not available for the iPad OS 3.2 yet and will be in November. But i wanted to get the app out before Nov. So i pushed thru and got the code into the universal app, the code is very simple, it just creates an event and adds it to the calendar with an alarm. Its the same code as in the iPhone part. The minute i added the #import <EventKit/Eventkit.h> line, i got a dyld library not found, image not found, data formatters temp unavailable, loader is presently locked error and the app crashes on startup.

What ive done:

1) Selected weak link in the target settings for that framework - that just gives me a white screen on the ipad simulator, it doesnt crash, but it doesnt get past the white screen.

2) I am already using NSClassFromString on the one line where the EKEventStore class gets called.

Here is the eventkit related code:


self.eventStore = [[NSClassFromString(@"EKEventStore") alloc] init];
// Get the default calendar from store.
self.defaultCalendar = [self.eventStore defaultCalendarForNewEvents];

for (int i=0; receivedArray.count > i; i++) {
NSLog(@"%i",i);
EKEvent *event = [EKEvent eventWithEventStore:eventStore];
event.title = [receivedArray objectAtIndex:i];
NSMutableArray *myAlarmsArray = [[NSMutableArray alloc] initWithObjects:[EKAlarm alarmWithRelativeOffset:-3600],nil];
event.alarms = myAlarmsArray;
event.startDate = [[NSDate alloc] init];
event.endDate = [[NSDate alloc] initWithTimeInterval:600 sinceDate:event.startDate];
[event setCalendar:[eventStore defaultCalendarForNewEvents]];
NSError *err;
[eventStore saveEvent:event span:EKSpanThisEvent error:&err];
[myAlarmsArray release];
}


and here is the actual console error:

dyld: Library not loaded: /System/Library/Frameworks/EventKit.framework/EventKit
Referenced from: /Users/Pitamac/Library/Application Support/iPhone Simulator/3.2/Applications/08624661-2FA9-40C4-AC28-2E77866EC16F/LoveMe.app/LoveMe v3.0 calendar
Reason: image not found
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Cannot call into the loader at present, it is locked.)

Could it be the 3.2 simulator is not finding the eventkit libraries?
__________________
Mars
www.santiapps.com
www.gea-hn.com
mba-i4

Last edited by marciokoko; 09-06-2010 at 03:23 PM. Reason: possible solution
marciokoko is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 345
11 members and 334 guests
bignoggins, carlandrews, flamingliquid, hzwegjxg, ilmman, iram91419, linkmx, nadav@webtview.com, Objective Zero, stanny, v1n2e7t
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,656
Threads: 94,116
Posts: 402,889
Top Poster: BrianSlick (7,990)
Welcome to our newest member, iram91419
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:45 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0