iphone - Sending SMS to dynamic Telephone number -


i have app sends sms , calls dynamic telephone number, here code:

    #pragma mark - picturelistmaintablecelldelegate methods -(void)picturelistmaintablecell:(picturelistmaintablecell *)cell wantstocallnumber:(nsstring *)number {      mfmessagecomposeviewcontroller *messagecomposer =     [[mfmessagecomposeviewcontroller alloc] init];     nsstring *message = @"your message here";     [messagecomposer setbody:message];     messagecomposer.recipients = [nsarray arraywithobjects:@"0003233",        nil];     messagecomposer.messagecomposedelegate = self;     [self presentviewcontroller:messagecomposer animated:yes completion:nil];     nslog(@"texting telephone number [%@]", messagecomposer);      nsstring *urlstring = [nsstring stringwithformat:@"tel://%@", number];     nslog(@"calling telephone number [%@]", number);     [[uiapplication sharedapplication] openurl:[nsurl urlwithstring:urlstring]];     nslog(@"%@", [self devicelocation]); } 

the telephone call works not sms, can help?

first check if device can send sms messages by:

if ( [mfmessagecomposeviewcontroller cansendtext] ) {     // build text message posted } else {     // handle appropriately     // no point in trying display compose view controller } 

whether solves specific problem, not sure, since following apple's docs this.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -