is it possible to get device settings on iOS? - iphone

android allows u to get a complete system settings dump using dumpsys or the getprop shell commands. there are also the android.provider.settings and android.provider.secure APIs that allow us to get a lot of android device data such as bluetooth and wifi settings etc.
is there any such way to do so on iOS. as far as i have researched there are separate APIs for most things like bluetooth which need a lot of hunting...

Apple's official public APIs do not allow an iOS app to access General settings in the Settings app, such as the wifi enable. NSUserDefaults only allows access to those preferences and settings created specifically by that one app for its own use.
But some settings, by using a private API you can access them. However, apparently, using these private API's prevents your app from being accepted into the app store. A Link: Access iOS settings from code.

in iOS 5.0 i was opening Twitter setting from my app . if you want to access Twitter you can do it by :
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs:root=TWITTER"]];
but , this features is removed in iOS 5.1 , hence i can not able to open twitter setting .
This link help you too. :How to open preferences/settings with iOS 5.1?

Related

How to get available WiFi list in IOS in ionic?

I am creating a hybrid application where I'm scanning available WI-fi list and trying to connect it via app. To achieve it in android native I'm using hotspot plugin which is working perfectly fine but it is not available for IOS. Can any one suggest me any cordova plugin which I can use to get WI-fi List and to connect via SSID and password in Ios? I will be grateful if any one will provide some sample codes.
iOS has limited functionality as Apple's WifiManager equivalent is only available as a private API. Any app that used these features would not be allowed on the app store.
Connect/Disconnect only works for iOS11+

how to change default browser on iphone?

I am new to iOS and I want to know that, How to change the default browser as Google chrome on iPhone Simulator?
Thank you in advance.
As xlc has mentioned the Simulator doesn't allow you to install third party applications. It's designed to let you test your code and how it interacts with iOS.
You cannot change default iOS default browser unless and until your device is jailbroken.
but you can open links in google chrome from your app using :
[[UIApplication sharedApplication] canOpenURL:
[NSURL URLWithString:#"googlechrome://http://www.nameofwebsitehere.com"]];
Note : this will not work on simulator and you should add a check to see if Google chrome is installed on device.

How to launch Google Maps on iPhone via web link?

I am building a site that will have address links as well as image of a map - both of which have a link to Google Maps.
The problem is that when I click on these links using my iPhone - or any address link that shows up in an email, the result is that either the native Apple Maps app opens or the Google Maps in the browser. I want for the native Google Maps app to open every time, and ideally for every user (whose iPhone I have no control of).
If I use the Chrome app for iPhone, then there's a little trick to do this:
http://www.redmondpie.com/how-to-set-google-maps-for-iphone-default-app-for-opening-map-links/
But the reality is that the trick above will not open the Google Maps app. It will open the web version of Google Maps inside the Chrome app. Then an icon shows up at the bottom asking if you want to open the native app instead. This is better than nothing, but far from ideal. I appreciate any help. Thank you. BTW, I'd like to do this without jailbreaking the iPhone - I'm looking for a solution that will work with other people's iPhones.
You can use apple's interface which is a bit more intelligent when using different browsers and devices:
http://maps.apple.com/?q=51.507269,-0.127695
Clicking the above url on the following devices:
iPhone|iPad:
Opens Apple maps app
Android:
Gives you a choice to open in either Google Maps App or Google maps website
Windows Phone:
Opens Google maps mobile website
Windows 8 Desktop:
Opens Google maps website
Apple OS Desktop:
Opens the new maps app (Mavericks)!!
For more info see:
Apple URL Scheme Reference
To open Google native app you need to write:
[[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:#"comgooglemaps://"]];
Example :
comgooglemaps://?q=Pizza&center=37.759748,-122.427135
I just tested this and it worked in pulling up Google Maps instead of the default Apple Maps application.
Testing Maps
However, after deleting the Google Maps app for iOS, the link fails to open anything because that schema is no longer available and doesn't fallback to a generic maps link... almost seems like you would need to provide two links for Google Maps for iPhone and another generic Apple Map link...
Take a look at this.
It works on every device (for ios / android, it will launch google maps app else browser).
For other devices, it will launch browser.
Simple use case would be:
Construct universal map URI (with encoded params)
Use this URL like -
window.open(mapUrl, '_system');
More info for window.open here
My use case required to open existing in app map navigation into some another dedicated maps app (preferably google maps app) for ios and android devices.
I use ionic v1 + cordova for building native apps. Not sure if this is perfect for your use case but hope this helps.

Turn off app in IOS through PhoneGap API

I have a html5 app for iphone using phonegap. I check for internet connection for the necessary first update, how do I turn of the app if the user does not have an internet connection? Thanks in advance. As I said I have full access to phonegap api!
if you want to deploy your app to the app store, you can not update the app under the covers. You have to submita new version to apple and let the users update your app.
If you just want to know wether your device is online you can use the Phonegap online offline events. See: http://docs.phonegap.com/en/1.4.1/phonegap_events_events.md.html#online and http://docs.phonegap.com/en/1.4.1/phonegap_events_events.md.html#offline

Phonegap: Can iPhone web app access/check for wifi connections

I have tried looking for some answers but could not get anything concrete from the other questions in here.
I am looking for an answer to these two questions:
Using PhoneGap, if I create an iPhone web app, can I use it as
plain web app (i.e. without using iTunes to deploy it)? Just via a
web url?
Using PhoneGap, can an iPhone web app check for wifi
connectivity? i.e. If wifi/3g is available, if wifi is available,
can it scan for ssids.
Thanks for any help in advance.
You can create host the web app on your own server (or local). Then it is accessible via web url. If you want to use it as a normal app (there are differences - phonegap uses few native plugins for better experience), then you must have a developer license from apple and then deploy it to your device. Otherwise you can only use the simulator. You can also use Safari + USB to debug your app using the browser.
It is possible but limited. Only certain functionalities are available. Check out the following plugin for cordova (phonegap):
cordova-plugin-wifi
Good luck!