What API does iOS have to write Web proxy? - ios

Does IOS provide API to write a proxy program for IPad /IPhone to process web requests from Safari, Chrome, Firefox and also apps that work with UIWebView?
Can this proxy also work as a daemon? I need this proxy to periodically create web usage statistics and generate summary reports.

Related

OIDC/OAuth SSO from wpf desktop app using web browser

We have our custom IDP which implements the OIDC/OAuth2 standards and many of our browser based SPA apps use it for authn/authz (With SSO). We also have some of our apps which are WPF desktop based. Now, our requirement is to implement similar OIDC/OAuth SSO from desktop app by launching a browser from the desktop application and then once the sign in is complete come back to the desktop app (SSO).
This is something very similar to how Docker desktop works which launches a browser for sign-in and then redirects back to the desktop application. Anybody can suggest what is the right way to implement this and any reference to sample implementation would be greatly appreciated.
Thanks
The system browser is used to login, according to RFC8252. I believe Docker desktop uses a private URI schene to receive the OAuth response.
See these resources. My app is coded in Javascript but you should be able to translate the concepts:
C# private URI scheme example
My desktop code sample + blog posts

Is it possible to run a proxy server in an iOS app, to be called from WKWebview?

The current setup is a single-page Javascript+HTML application (SPA) and a Node/Express proxy. Both are hosted on a server and used in a WKWebview.
Is it possible to embed this setup inside a native app with WKWebview and skip the external server hosting? Specifically, could Nodekit be used to run a Node proxy on the phone, to be called by the SPA from webview? If not, is there any other way to achieve the same result?

Got an error when trying to get the geolocation in safari on iOS 10

[blocked] Access to geolocation was blocked over insecure connection to http://www.hnsjb.cn.
Should I change my website to the https protocol?
iOS 10 and also desktop Safari 10 seem to require https connection now. Safari also seems to be more strict than what Chrome did earlier. No mixed content warnings are allowed, Chrome allows e.g. map tiles to load over normal http.
I could not find any guideline specific to Safari, but this issue has been discussed by other web browsers as well.
In particular, the announcement about Google Chrome blocking geolocation over an insecure connection, published on developers.google.com in April 2016, under the last paragraph “I really need to use Geolocation. What should I do?”, advises:
If you would like to use the HTML5 Geolocation API, or if your site already uses the Geolocation API, please migrate the pages making Geolocation API calls to HTTPS, ensuring that they’re used in a secure context.

Web Service accessible by most browsers but Safari and iOS app

A short version of my current problem:
Our service
https://staging.apps.wv.gov/dhhr/cjtf/HelpMeWV/api/contacts
is accessible in Windows browsers, android app, Chrome in Mac, but not accessible in iOS app, Safari, or Chrome in iOS.
error Code: WebException
message: The remote name could not be resolved: ‘wwwnew.wv.gov’.
Some more detailed info:
HelpMeWV is a .NET application translating SharePoint wcf service (http://wwwnew.wv.gov/services/HelpMeWV/_vti_bin/ListData.svc/$metadata) into RESTful API using ServiceStack. Here wwwnew.wv.gov is parsed in the hosts file on my staging server.
I would assume a web browser visiting the .NET REST API would have no need to be aware of the location of SharePoint service. Further, if my Android app and other browsers to access the API and obtain data, there is no reason a Safari or an iOS app cannot visit.
I have added the wwwnew.wv.gov entry to my Mac's hosts file. Still get the same error.

Windows Phone 8 web browser history

Is there a way to get web browser history from Windows Phone 8?
I would like to save history of visited web sites from default web browser. In Android there is a content provider responsible for storing bookmarks and visited web sites. I haven't found the similar solution in Windows Phone. Is it possible or there is no such API for getting those logs?
There's no API to access this on Windows Phone. You can always request new APIs using wpdev.uservoice.com.

Resources