How to Launch the iPhone maps application from our own code
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"http://maps.google.com/maps"]];
I tried this code,but its coming in browser.Its not opening in the iPhones Default map app...
I want my code to display the iPhone default map app to come up after existing the application which is being run.
use MKmapView to show map in Application instead of launching the Browser.
Related
i want to display the maps in iphones map application. so, when i tap on map button it should navigate to iphone app. i have the code that works fine in other than ios 6 . but i want it in ios 6.thanks in advance
Apple documents its maps URL scheme here. You must replace maps.google.com with maps.apple.com.
Why can't I use syntax like
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs://"]]
to jump into the System Settings from my application in iOS6 but I can in iOS5? Is there any official information about this (for example from developer.apple.com)? Thanks!
I have a button in my iPhone app which launches the iPhone YouTube player and plays a video. The code I use is this
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"http://www.youtube.com/watch?v=xxx"]];
It works fine, but when I stop the video (or it ends) the context does not come back to the app from which I run YouTube. It just remains in YouTube or, if I force its closure, turns to the iPhone menu.
Is there any way to come back to the executing app?
You may want to take a look at Display YouTube Videos Without Exiting Your Application
In my app I use this instruction in an ibaction to open safari and go to the link:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"http://www.example.com"]];
but the problem is that in IOS 5 it don't work fine because it open safari and go to the link but when I return in the app I have only a black screen and the app don't run. why?
Where did you test your app? simulator or a real iPhone? The way you did is right. I have a similar app offer the browser open up thing, and it worked fine both on simulator 5.0 and iphone 4 running iOS 5.0
ok the problem is that that when I go to background I close a view with view.parentViewController dismissModalViewController ad in ios5 it don't work, now it work
I'd like to open the iphone calendar app programmatically from within my app. According to this post: How to open the iPhone calendar from within my app? it isn't possible (May 22 2010!). Maybe the ios sdk 4 or ios sdk 5 support such a feature?
It's not possible, except for using UIDocumentInteractionController with an .ical file, but that's pretty pointless as you could achieve the same (adding an event) by using Event Kit.
use this line to open ios calendar :
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"calshow://"]];