Safari App takes user to Settings App in iPhone in iOS 6. How can this be done in my iPhone app? - iphone

I had a requirement to redirect a user to the iOS Settings application from within my application. I know that in iOS 5, we could use the following URL scheme to achieve this: prefs:root=General.
And I could use the following line of code:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs:root=General"]]
But Apple no longer supports this open URL scheme since the iOS 5.1 update.
But recently I have noticed that, in the Appstore app and Safari browser etc, Apple let this happen.Please refer to the attached image where Apple shows the alert. And on clicking the Settings button, user is taken to the Settings app. Any idea, how this is done. I believe if this can be done in App Store application, there should be some way that I can do it in my application also. Please comment if someone has a fix, or more idea on how this can be done.

Related

How to open device Settings to login in to Twitter and Facebook from Social.Framework?

Im using Social.Framework for sharing app specific info to Facebook as well as Twitter everything is working except, if user is not already logged in to Facebook and Twitter in his device that time I want to show a message like login to these sites in device settings and I need to navigate user to Device Settings on tap of this button, my apps minimum deployment target is iOS 6.0 and above, How to take user to Apps Settings Screen from my app?
I heard that openURL is not allowed by Apple from iOS5.0 and above, so that I cant even use the below snippet,
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs:root=TWITTER"]];

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..

Iphone app links to app store but shows blank page instead of app to download

I´m making an app on iphone and i have a button that links to the appStore in order to download another app.
I´m using the code below that opens safari and instead of showing the twitter app the his on the link, show a blank page.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"http://itunes.apple.com/us/app/twitter/id333903271?mt=8"]];
Anyone knows how to solve this?
Was using the simulator, it doesn´t have a app store so offcourse it wouldn´t show it... Guessing it will show on a real device.

Linking the Developer Page at the appStore from an iPhone App

So I know how to open an app page on the appStore from within my iPhone app.
Is there a way to open my company's page? On iTunes on my mac I can do that, but using that URL in the iPhone I can't (or I'm not doing it right).
Thanks in advance.
This is a great article on this subject: http://bjango.com/articles/ituneslinks/
Quote from the article:
http://itunes.com/apps/developer — Search for all apps by developer
It’s also possible to link to all apps by one developer, but there’s a catch. On a Mac or a PC,
this will open iTunes and land on a developer’s page. On an iPhone or iPod touch it’ll do a bit of a
dance, opening MobileSafari, then iTunes, then the App Store app. Not ideal, a bit ugly and slow, but
it gets there in the end.
If you’d like to hide the redirections and speed up the process, Apple recommend using NSURLConnection.
this prevents it to do little dance it does normally
NSString *iTunesLink = #"itms-apps://itunes.com/apps/companyname/";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:iTunesLink]];
I used such URL in iOS 8, 9:
itms-apps://itunes.apple.com/developer/tivogi/id507966848
where tivogi is the developer's account name and id507966848 is the your developer id.
You can find correct link for you in the any browser: just go to developer page, copy url, and change scheme to itms-apps
In IOS SDK 6 and above, use below link for open developer link from app
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"itms://itunes.apple.com/WebObjects/MZStore.woa/wa/viewArtist?artistId=524402507"]];
........

How Can I open another App from my app?

I have rediATM app installed on my iphone. rediATM app is free on itunes.
I want to open that app from my iphone app.
I am not able to find out the way to open it.
i am using the following code to open it but it takes me to the website.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"http://itunes.apple.com/au/app/rediatm-finder/id358936470?mt=8"]];
Please help.
It does not work because you are opening the download link for itunes.
If you want to open another app on your iPhone with your own app, you must find out if this app provides a custom URL scheme. If they do, you could open the app using that custom URL, but otherwise not.
Here is an example how to create a custom URL scheme for your own app Launching Your iPhone App Via Custom URL Scheme and Apple's documentation: Communicating with Other Apps