Skip to content
Browse files

Implemented stealth SMS

  • Loading branch information...
1 parent 04826b4 commit 9aa653647f7532af2ee6672da0f9640bc62d3510 @0xced 0xced committed Oct 19, 2011
Showing with 20 additions and 2 deletions.
  1. +20 −2 Stealth Messenger/StealthSender.m
View
22 Stealth Messenger/StealthSender.m
@@ -134,8 +134,26 @@ - (void) sendMessage
MFMessageComposeViewController *messageComposeViewController = (MFMessageComposeViewController*)self.composeViewController;
messageComposeViewController.messageComposeDelegate = self;
- NSLog(@"TODO: send message");
- [self executeCompletionHandler:NO];
+ [messageComposeViewController viewWillAppear:NO];
+ [messageComposeViewController view];
+ [messageComposeViewController viewDidAppear:NO];
+ UIViewController *topViewController = [messageComposeViewController topViewController];
+ @try
+ {
+ // topViewController is a CKSMSComposeController : CKTranscriptController
+ [topViewController viewWillAppear:NO];
+ [topViewController view];
+ [topViewController viewDidAppear:NO];
+ id entryView = [topViewController valueForKey:@"entryView"];
+ if ([entryView respondsToSelector:@selector(send:)])
+ [entryView performSelector:@selector(send:) withObject:nil];
+ else
+ [self executeCompletionHandler:NO];
+ }
+ @catch (NSException *exception)
+ {
+ [self executeCompletionHandler:NO];
+ }
}
- (void) messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result

0 comments on commit 9aa6536

Please sign in to comment.
Something went wrong with that request. Please try again.