I am using twitter using Sharekit and for IOS5, I am using its classTWTweetComposeViewControllerClass
as,
Class TWTweetComposeViewControllerClass = NSClassFromString(@"TWTweetComposeViewController");
if (TWTweetComposeViewControllerClass != nil) {
if([TWTweetComposeViewControllerClass respondsToSelector:@selector(canSendTweet)]) {
UIViewController *twitterViewController = [[TWTweetComposeViewControllerClass alloc] init];
[twitterViewController performSelector:@selector(setInitialText:)
withObject:NSLocalizedString(@"TwitterMessage", @"")];
[self.navigationController presentModalViewController:twitterViewController animated:YES];
[twitterViewController release];
}
} else {
[SHK flushOfflineQueue];
SHKItem *item = [SHKItem text:text];
//[SHKTwitter shareItem:item];
SHKActionSheet *actionsheet = [SHKActionSheet actionSheetForItem:item];
[actionsheet showFromToolbar:self.navigationController.toolbar];
}
It is working fine with simulator 5.0 but crashes on 4.3 with below error.
dyld: Library not loaded: /System/Library/Frameworks/Twitter.framework/Twitter
Referenced from: /Users/indianic/Library/Application Support/iPhone Simulator/4.3.2/Applications/241167D0-62E0-4475-85FD-0B8253B4E456/demoFBTW.app/demoFBTW
Reason: image not found
How do I fix this. I tried to change the dependency for the framework from Required to Optional but didn't find for that
TWTweetComposeViewControllerClass
for app which is using both ios5 and ios4? Because I am using sharekit for <ios5 – Roshni Dec 27 '11 at 6:48