My requirement is running a HTTPS server on the device it won't connect to the external clients. Both client and server is my application only.
For example, if there is a request https://myip/getUserData from my app, my app fetch information from core data and returns to the client(that is also my app)
I was able to create an HTTP server in my app following the below link. but I want the same in HTTPS. That means to run the HTTPS server.
http://www.cocoawithlove.com/2009/07/simple-extensible-http-server-in-cocoa.html
Related
I am running web server for my application (Angular) on my work laptop and whenever I want to access it from my laptop I have to go to https://localhost.company.com:8000/ so that my login cookies are sent to my local proxy server that communicates with development server. This works fine, but I need to access this local server from iPhone devices, but it seems that they don't recognize URL as local IP with suffix. So when I enter https://192.168.1.100.company.com:8000/ it won't find the server. It will find the server if I omit the .company.com, it will load the index file served by server, but it won't send cookies to my proxy endpoint and therefore the app is not working.
Is there a way to access this local server with cookie sending on iPhone/iPad devices?
Below snapshot has 2 wkwebviews in the iOS app.
Upper part - wkvebview1: loads html page from locally hosted secure CocoaHTTPServer on port 51092.
Lower part - wkvebview2: loads http url from locally hosted CocoaHTTPServer instance on port 51091.
Images loads fine in both wkwebviews. Not able to load video with secure webserver.
Is there any known limitation for wkWebview in iOS10 for video using secure webserver?
Sample iPhoneHttpServer Github link
SSL/TLS security requires a certificate that's valid for your server's hostname; by default, a WebView will not load content from a TLS server that cannot present a valid certificate. This makes secure mode for the HttpServer class essentially useless, as iPhones do not have stable public hostnames, and it is impossible to obtain a valid certificate for localhost.
In any case, enabling secure mode on a server running locally is hardly necessary; traffic to that server is local to the device, and cannot be intercepted.
i have an app running on Apple app store with webservices from HTTP Server but now i want to migrate my webservices from HTTP Server to newly brought HTTPS Server. What is the best approach to achieve this without affecting older application users running application on HTTP Server?
P.S: After migrating to new server, older server will not work.
Edit: my older server domain is going to expire and also i have amazon server on which i am going to move my webservices. So the older and new server link are different.
Thanks
I would like an iOS app to send data to my web server. For now I issue http get requests like "http://myserver.com?key1=val1&key2=val2" and it works fine
However I would like to secure this a bit so that people don't proxy the requests and send random values to my server.
If I do https, I understand that I generate some private/public keys on the server side, and I have to give those to the app, so that only the app can sign the requests and the server will reject any requests not coming from my app. Is that correct ?
If that's true, is there a way to hide the certificates in the iOS app ? When opening an app on a computer we can see all the files. Could anyone replicate the request with those ?
Thanks
On server side you maintain client app unique identifier and one key(pwd) value while installing app and client also maintain that information.Every time client send request with these parameter and server check this parameter with database.
I just want to know that how the web server call to app server code and pass the response to the client, Eg :-
Nginx web serve
Unicorn app server
Rails application
Our request sends to web server and how web server(nginx) pass that request to the app server(unicorn) and how app server runs the rails code or route and sends back the response.
To understand the collaboration of a web server to an app server you must study the architecture of the server first. I guess this link will give you a good idea about architecture and it's bonding.
Have a look here: