The code is as follows
-(ibaction) Openmaps {
Where is Apple on the map anyway?
nsstring* Addresstext = @ "1 Infinite Loop, Cupertino, CA 95014";
URL encode the spaces
Addresstext = [Addresstext stringbyaddingpercentescapesusingencoding:nsasciistringencoding];
nsstring* Urltext = [NSString stringwithformat:@ "http://maps.google.com/maps?q=%@", Addresstext];
Lets throw this text on the "so we can view" URL in the event we have a issue
NSLog (Urltext);
[[UIApplication sharedapplication] Openurl:[nsurl Urlwithstring:urltext]];
}
-(ibaction) Openemail {
Fire off a email to Apple support
[[UIApplication sharedapplication] openurl:[nsurl urlwithstring:@ "mailto://devprograms@apple.com"];
}
-(ibaction) Openphone {
Call Google 411
[[UIApplication sharedapplication] openurl:[nsurl urlwithstring:@ "tel://8004664411"];
}
-(ibaction) opensms {
Text to Google SMS
[[UIApplication sharedapplication] openurl:[nsurl urlwithstring:@ "sms://466453"];
}
-(ibaction) Openbrowser {
Lanuch any IPhone developers fav site
[[UIApplication sharedapplication] openurl:[nsurl urlwithstring:@ "http://itunesconnect.apple.com"];
}
Automatically fill in SMS content
The code is as follows
Mfmessagecomposeviewcontroller *picker = [[Mfmessagecomposeviewcontroller alloc] init];
Picker.messagecomposedelegate = self;
picker.recipients = [Nsarray arraywithobject:@ "48151623"];
Picker.body = @ "body text."
[Self presentmodalviewcontroller:picker animated:yes];
[Picker release];