I want to show defaul Settings app. Before I could use method
NSURL*url=[NSURL URLWithString:#"prefs:root=WIFI"];
But now it's disabled, is there any way now in iOS7 to show Settings app?
Unfortunately this is not possible anymore, as apps were offering jailbreak like solutions through the app store(Settings shortcuts). See the following link iOS Launching Settings -> Restrictions URL Scheme. Infact, its been disable since iOS 5.1.
See the following link for an article that shows when and why this was removed in detail: http://www.idownloadblog.com/2011/11/29/iphone-5-1-disables-shortcuts/
Related
I tested the dynamic links Firebase. Configured everything in the project, the implementation did exactly like the Google documentation and created links on the console. When I test in Safari it does not open the application.
Thank you
iOS 9+
Due to the limitations on the iOS platform, Firebase Dynamic Links must rely on Apple's Universal Link system to open the app directly from a link when it is installed. One of the constraints placed on Universal Links is that the app-open behavior is only triggered from a user's click and not by a redirect or copy/paste into Safari.
We have found it very challenging to test Universal Links in the simulator and pretty much always use a real device for this type of thing. Basic steps: install app > SMS link to your test device > click link > observe app open.
iOS 8 and prior
iOS versions prior to 9 handle opening the app from a Dynamic Link through Safari, so if the app is not opening when you copy/paste the link into Safari then some setup is incomplete. Please review your Firebase project for information and confirm that your bundle IDs/custom schemes match on the project page, in your link, and in your app; be sure that the bundle ID is listed in URL Types in your Xcode project setup along with any custom scheme you wish to use.
Other Info
Here is a link to a prior answer that may be helpful as well.
Firebase dynamic link not opening the app iOS
I know that there are a lot of Q&A saying that from iOS 5.1 it is not possible to open Settings from the app, some examples:
Opening the Settings app from another app
is it possible to open Settings App using openURL?
launch settings from alert
But what is really annoying is that Twitter App (version 6.2.1, iPhone 4s, iOS 7.1) is opening Settings from the application.
Check this image:
Clicking on Settings, Twitter is opening Settings and a view with title Wi-Fi. It is true that this view do not have all the Wi-Fi properties. However, it is something into Settings.
How is that possible? How is handling Twitter with that?
Someone have a clue?
That is not the Twitter app showing the alert. That is a standard iOS alert that can appear when an app tries to use location services with no WiFi.
No 3rd party app can directly show that alert. iOS shows it and iOS takes you to the Settings app.
I just verified this with my own app. If the app already has permission to use location services, then if you do something in the app that requires location, this alert will appear when appropriate. I know for a fact that I do nothing in my code to make the alert appear but it does appear.
I have seen that there are known apps, such as Twitter and Facebook, that display a "Turn Off Airplane Mode or Use Wi-Fi to Access Data" message within an alert view, with a button that switches to the Settings app, when no network is detected as the app goes foreground. This message is the same in all apps where I saw it, is this alert view a kind of predefined one that you can use? Similar to the one displayed when checking locationServicesEnabled...
I found some posts dealing with this issue some time ago, for example:
iOS UIAlertView button to go to Setting App, and it seems (or seemed) to be a way to read the values in the iOS' Settings app, but I couldn't find any of this in the Apple Developer's documentation... is there any public API for accessing those values? Would an app be rejected if accessing them as in the post I linked?
Thanks in advance
Till iOS 5.0, you can use the URL scheme to open the Settings App from third-party apps using the URLScheme like:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs:root=WIFI"]];
Unfortunately, iOS 5.1 and iOS 6 not supports this feature.
You can use the Reachability for checking the Wi-Fi state.
For displaying the default alertview when the Wi-fi is off or in AirPlane mode you can use the Application uses Wi-Fi flag in the info.plist
Refer InfoPlistKeyReference for details:
UIRequiresPersistentWiFi
“Application uses Wi-Fi”
Specifies whether this app requires a Wi-Fi connection.
Does anyone know what the custom URL scheme is to open a Facebook page in their new iOS app. I was using fb://page/PAGE_ID however this doesn't seem to be working in the recently updated Facebook iOS app, it just opens the app but doesn't go to the required page.
I got this answer at developer.facebook.com:
Replace the word page with profile and it will work. Your new statement will be:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"fb://profile/247377102029332"]];
Use https://graph.facebook.com/YOUR_USERNAME to get your page ID.
In your iOS app use: fb://profile/[your ID] and the facebook app will open to your page.
The URL scheme for the iOS Facebook application is:
fb://profile/(fbid)
Same problem here. fb://page/PAGE_ID is not working anymore.
Note that fb://profile/(fbid) wasn't working properly on Facebook 4.x returning a "corrupted" page in both iPad and iPhone. Instead, fb://profile/(fbid)/wall in Facebook 4.x worked well when using an iPad but didn't work with an iPhone.
fb://page/PAGE_ID was the only option that worked on both iPhone and iPad, based on my experience.
I used to use http://wiki.akosma.com/IPhone_URL_Schemes as reference, but it's currently down...
A custom URL scheme is a mechanism through which third-party apps can communicate with each other. It doesn't allow you the provision to open a page in that particular application. It just fires an event to bring the called Application to the foreground. Going through this documentation would further clear your doubts.
The new Facebook app is built using Objective-C as against previous once in HTML5 which used to support URL scheme mechanism. This link gives a hint on that.
http://techcrunch.com/2012/08/23/facebook-for-ios-faster/
My app needs feature to open iPhone/iPad "Mail, contacts, Calendars" settings panel and automatically scroll to view default calendar settings row. Any sample or idea?
I will put it under the IBAction.
The URL scheme for programmatically launching Settings.app to a particular settings panel was briefly exposed (though I'm not sure if it was documented) in iOS 5. However, the capability has been suppressed for third-party apps in iOS 5.1. As it stands, there is currently no way to do this from a third-party app on the latest version of the OS - at least, not in a way that won't get your app rejected from the App Store. There's likely a jailbreak way to do this, but I don't dabble in that, so I wouldn't know.