How to launch iPhone settings app from my app? - iphone

How can I launch the iPhone settings app from my own app? For example, like the screen shot I got from twitter app below:
I turned off the network, and the twitter shows me a network error alert. But in the alert view, they implement a button "Settings". When I press the button, it brings the iPhone settings app up.
So I am curious on if there any methods can be called to do this?
Thanks in advance.

I don't believe so. This dialog is provided by Apple when data is not available for an app that has set Wifi as a requirement in its info plist.

Typically you would need to use custom URL schemes to access other Apple apps, but settings is not available and not part of this list.
Example:
http://wiki.akosma.com/IPhone_URL_Schemes
http://software-security.sans.org/blog/2010/11/08/insecure-handling-url-schemes-apples-ios/

Related

How do I move to iPhone settings from an app

I have created an app,When a user clicks button for twitter sync,It will show an action sheet of twitter accounts in the phone settings
If there is no any accounts,it will show an alert view.How can i move to phone settings(specially creation of twitter accounts) from click on that alert OK button
Apple does not allow doing that via code. You need to popup a dialog and request user to do this manually. Not nice, I know...
It used to be possible, but Apple has now blocked it. More details at iOS Launching Settings -> Restrictions URL Scheme
Jumping to the settings app using a custom url scheme happened to work prior to iOS5.1, but was never officially supported. I've filed a DTS to get an official answer.
Thank you for your inquiry to Apple Worldwide Developer Technical
Support. I am responding to let you know that I have received your
request for technical assistance.
The URL scheme to launch Settings app or to a certain screen in
Settings has never been documented nor supported. Staring with iOS
5.1, Apple has removed support for linked-to system preferences in iOS 5.1, the same with iOS 6.0
If you want URL access support to Settings, please file a bug report
to "http://bugreporter.apple.com".
You can use this on iOS 5.0:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs://"]];
But now moving to settings app is no more supported from application. you need to write custom message and alert user to go to setting and make particular thing enabled on/off.
Hope this info helps you..

how to call back my app after open settings page from my app in iphone

HI I am successfully open settings page from my iphone app but after that how to come my app ? Is there any solution are manually open my app again,
Thanks In advance
Is the settings a bundle? (does it appear in the Settings app like Facebook, etc)
Or is this settings already in your app?
EASIEST WAY is to create a URL within your app and call that URL to bring your app.
Here is a good tutorial
http://mobiledevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html

iphone - adding option for gifting the app

In my iphone app, i'd like to add the option to "Gift" the app.
Basically I like to add a button which pops up the username to whom i want to gift.
Is this possible?
As far as i know this functionality is part of the App Store and there is no API to provide that functionality in-app.
CheersShai
The best you can do is make the "gift" button open up the app store pointing to the app's page (which is still useful, IMO).
Once you have the web URL for your app, tell your UIApplication to open it and the user will land in the App Store app:
How to link to apps on the app store
Make sure you use the itms-apps:// hint below the accepted answer or you'll wind up with a double redirect which is annoying.

Return to app from safari

In my application, I redirect the user to the safari browser when he/she taps on a button, which in turn closes the application and opens the safari browser. There is no problem in that. It works fine. The thing is when the user quits the safari browser, I want to redirect the user back to the application, not the home screen. Any idea please...
If you control the website that you are redirecting them to, then you can place a link on the site using custom URL which I describe in more details below. But if it's a site you don't control, you can have the user surf within your app using the UIWebView.
For an iOS app, you can create custom URL schemes that your app register with the system. Then on the web page you would create a link using that custom URL. That is how Apple launches the telephone.app or the mail.app from mobile safari.
For example: Let say your app is call BigBadApp. You custom URL would be: bigbadapp:// Now, you could create a link to your app would be: Launch BigBadApp You can pass any kind of information back to your app using the custom URL and your app will handle that information in the app delegate. For iOS 4.2 and later: application:openURL:sourceApplication:annotation:. The name of old delegate on earlier version of iOS is application:handleOpenURL:
For more information see check Apple Implementing Custom URL Schemes.
Also iOS developer:tips has a tutorial on Launching Your Own Application via a Custom URL Scheme.
You can't. When you redirect someone out of your application the only way to get back is using the task switcher or opening your application from the home screen again.
If you want to keep the user in your application you could open the web pages in a webview within your application
use UIwebViewController . that represent web link within app . so that your app wont be in back ground and add back button in navigation bar on click back button navigate to back screen . i guess it would be better
i would launch an in app browser...
this is a good uiviewcontroller subclass that has most of the browser functions already implemented. its very easy to use.
https://github.com/samvermette/SVWebViewController

iPhone custom browser app programmatically create 'Bookmark' on Home Screen

We are trying to create a custom browser app for iPhone. In this app we would like to be able to allow the user to click on a link labeled "Add to Homescreen" just like Safari browser does and have our custom browser add the link/icon to the homescreen (just a web app link/url).
Is this possible and if so where do we look to figure out how to do it?
Thanks!
please check "App Store Review Guidelines.
it says
10.4 Apps that create alternate desktop/home screen environments or simulate multi-app widget experiences will be rejected,
thanks.