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.
Related
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?
I'm trying to get an iPhone browser emulator to work on my website so it will work on all platforms. Are there any Javascript snippets that emulate the iPhone browser? I need it to zoom and browse the web, but the bookmark function is not required.
There isn't such a thing, as the iOS browser has a number of differences to any desktop browser.
The closest you could have is an iFrame surrounded by a picture of an iPhone, and instruct people to use Safari 5.
If you're on a Mac, you can use the iOS Simulator. Download Xcode from the App Store and with it comes the iOS Simulator, which also has the Safari app virtually exactly as is on the iPhone.
http://www.browserstack.com/ does exactly that. It ain't perfect, but it works..
Does anyone know how to launch a web app from a native app?
I assume that this is hard to achive, but the next best thing would be to launch safari with a specific URL, without the URL-bar. And I don't want it to be done within the app, I would prefer if the native app could go into a suspended state.
It's not hard to achieve, it's easy with UIWebView http://developer.apple.com/library/ios/#documentation/uikit/reference/UIWebView_Class/Reference/Reference.html
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"http://www.makebetterthings.com/blogs/"]];
and enable multitasking in your app so when the safari opens your app will go in suspended mode.
Update -
Read my these blog entries -
http://www.makebetterthings.com/blogs/iphone/open-phone-sms-email-map-and-browser-apps-in-iphone-sdk/
http://www.makebetterthings.com/blogs/iphone/launching-your-own-application-via-a-custom-url-scheme/
unfortunately you can not open all the apps! but you can add custom URL scheme in your own app to open them
I am trying to use a URL to launch the native maps application. My build is for 3.1.3 and later. When I run the following code, safari launches with the URL instead of google maps:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"http://maps.google.com/maps"]];
Any suggestions?
Thanks!
It sounds to me like you are running on the simulator not hardware. This behavior occurs when the map app is not installed or if you are on the simulator.
If you are running on hardware - have you tried that same style with a specific query or location or with http://maps.google.com as the documentation you pointed to mentions that The path cannot be /maps/*. - I'm not sure if that means explicitly *. or if they mean a wildcard. I'm not really clear why you'd want to launch the map app without a specific query.
Your string needs to be #"maps://maps.google.com/...". That "maps" at the front of it is what triggers it to load the Maps.app application.
I am developing web application using jqtouch. But I don't have iphone/ipod touch. what is the best way to test html generated out of it with jqtouch.
Thanks
coool
Download and install XCode from the Apple website.
It includes an iPhone/iPad simulator, with Safari, that you can run on your system.
If you develop on MacOS, use iPhone emulator otherwise use Safari.