iPhone SDK Tips: Dialing number, opening Email & SMS applications

Introduction

iPhone SDK did not gives you full control over iPhone functionality. But there are few things you can do using iPhone SDK, like, you can dial a number from your application, you can open an email and SMS client from your application.

Dial Number:

When you dial some number from your application then your application will go in background and in ideal state.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@”tel://123123″]];

Open Email application:

You can’t attached anything with email in SDK 2.2.1 or below. But in iPhone SDK 3.0 you can open an email client from within your application.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@”mailto:emailAdress?subject=testMail&body=its test mail.”]];

Open SMS application:

You can not provide text for SMS
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@”sms:111″]];

[Note: If you run this code from simulator then it will not show you anything. So please install this application on your iPhone/iPod device and then test it.]

http://adeem.me/blog/2009/05/27/iphone-sdk-tips-dialling-number-opening-email-sms-applications/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: