inAppBrowser Ios hide location URL - ios

I have a scenario where I have to load an external URL within an App. I also want to come back to the App from the external browser.
`var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes');`
I tried this and this is giving a DONE button, which brings me back to the App. However this shows the URL of the external page. I dont want the user to see the external URL. Is there any solution to this? Please help!

Related

Using browser location inside of SFSafariViewController

I have a webpage that uses location data from the browser that I want to open up inside an ios application.
If I open this page up inside a UIWebview I will see the page ask for location and after I respond the page finishes loading.
However, when I try to open this page up inside of a SFSafariViewController I do not get prompted for location which prevents the page from loading. I definitely want to use SFSafariViewController but I first need to fix this problem.
I've been unable to find any information about using location with SFSafariViewController. Does anyone know how to get this working?

Open a website in new window and detect that redirect to another url

In iOS, android I can show a webview and when it redirect to an url, I can detect it.
(like login via facebook, google ..vv..)
I want to do the same thing with cocos2d-html5 or cocos2d-js. (for web-browser)
I just try below code but nothing happened
window.open('http://webdesign.about.com/',
'open_window',
'menubar, toolbar, location, directories, status, scrollbars, resizable, dependent, width=640, height=480, left=0, top=0');
How can I tell web-browser open new tab for me?
====== UPDATE ======
My browser stopped all popups. my bad.
But I don't how to observe a Window object in javascript to know when it goes to new url.
I saw all thing about window at http://www.w3schools.com/jsref/obj_window.asp but I don't see something like that :(

Can app open browser, get user to login and receive file?

I'm trying to write an iOS Objective-C app to login to an old website. Note I don't have control of the website so I have no way of changing the login.
The procedure is:
Open browser at specific URL.
User enters their username and password.
Website returns a file called something like bad_link.smith.
App reads file to get key to use for API.
Is it possible to do this in iOS - open a URL from an app and have the file returned?
You could use UIWebView Delegates for this
Implement this https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIWebViewDelegate_Protocol/index.html#//apple_ref/occ/intfm/UIWebViewDelegate/webView:shouldStartLoadWithRequest:navigationType: delegate method and get the URL the user is going to and if the URL matches the URL you want to download then you can get the URL by the NSURLRequest and download it seperately. :) Hope I helped you.
What other thing you could do is make the code native and without the browser and simulating as a browser in the code. Can be used if no CAPTCHA is there. Do tell if you need more info on this.

iOS: Open a registered open URL from within the same app

I am running into a situation which I am not sure is possible from technical/design point of view. Please advise.
Here is what I need:
I have an open URL registered for my native iOS app. I expect a request ID to be passed along with it and once hit I open that request.
From within my native iOS app, I need to open a web page in the webview. This page has few buttons in it.
A tap on the button in the webview should open the request inside my app. So, I want to trigger the registered open URL in step #1.
Web page data is dynamic and will change on the fly.
Is this a feasible design. Shall I consider something else.
Any advise/pointers will be appreciated.
This should be possible. Here's a though:
1: Implement the UIWebview delegate method shouldStartLoadWithRequest.
2: when you intercept that your webview is attempting to access the url yourapp://blah-blah-blah you can return NO instead dip into your appdelegate can manually call the function handleOpenURL.
I've seen something similar in the past with supporting oAuth (I believe it was with instagram) within one of our apps. We basically loaded up the login page in a UIWebview and then when we detected the the post login redirect we parsed the oAuth token from the url and called it good.
Good luck

Invoking Safari on iOS without opening a new website

The situation is like this:
User opens app from a website using a custom urlscheme
User does stuff in the app
User clicks button in the app to return to the website in Safari.
I have tried opening a new tab containing a javascript:window.close() but this does not work on iOS 6.1.
So my question is: Is there a way to open Safari to view the website the user left from? Either with a working new tab that closes itself or a different route?
When you open the app with your custom url scheme, pass the actual page url as an argument.
mycustomUrlScheme://mydomain.com?objectid=1234&callback_url=encoded_url
In your app, handle the url for the content info and keep the page url to open it afterwards. It will make safari open a new tab. But that should be a good start.
As far as i understand you can do it.
user opens mobile safari for example http://www.example.com
user clicks a link that is appscheme://open and the application become active
user taps a button to open safari for example http://www.example.com?q=test
for the third step you can use [[UIApplication sharedApplication]openURL:url]

Resources