Note that there are some explanatory texts on larger screens.

plurals
  1. POsmartly recognize phone numbers and text (international numbers included)
    primarykey
    data
    text
    <p>I am trying to create an app that allows you to go to a certain app for the appropriate app (specifically, regular web links go to Safari, YouTube links go to YouTube, Google map links go to the Maps app, lines of text goes to the Notes app, and Phone numbers goes to either Contacts (for any iOS device other than the iPhone) or the Phone app. All of the data is viewed in a Table View.</p> <p>For now, I have an NSMutableArray that has some dummy data (specifically, one of each type of data). I have been successful with the web link, YouTube link, and Google maps link. The issue is, I don't know how I can get it to recognize national and international phone numbers. </p> <p>Here is the NSMutableArray data:</p> <pre><code>NSMutableArray *sites = [[NSMutableArray alloc] initWithObjects:@"http://www.apple.com/", @"http://www.youtube.com/watch?v=QH2-TGUlwu4", @"http://maps.google.com/maps?saddr=CN+Tower&amp;daddr=1+Yorkdale+Road+%23500,+Toronto,+ON+M6A+2T9,+Canada+(Yorkdale+Shopping+Centre)&amp;hl=en&amp;sll=43.68515,-79.422475&amp;sspn=0.133818,0.308647&amp;geocode=FdzumQIdjqBE-yGBdRzexNjtFQ%3BFUk0mwIdOp1D-yG5Hg9iD9hImQ&amp;vpsrc=0&amp;t=w&amp;mra=ls&amp;z=12", @"This is a test", @"(416)-555-5555", nil]; </code></pre> <p>Also...</p> <pre><code>self.cloudsendList = sites; </code></pre> <p>Here is the code that I have so far in terms of when the user taps on a table view cell:</p> <pre><code>-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat: @"%@", [cloudsendList objectAtIndex:indexPath.row]]]]; } </code></pre> <p>I don't know if I have to do this with lots of lines of code, but, is it possible? And if it is, how would you be able to accomplish it? If use need to see more code in order to understand, then I can gladly post the relevant information. I hope that I haven't caused too much trouble, but I hope that you could help me. I apologize if this is making sound like a total noob. Thanks in advance! :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload