Spinning server on iOS app

Hi

We have an application which supports Mobile (iOS ,Android ) and desktop ( linux , macOS and windows).

This is a hybrid application which displays content through WKWebview. There is a need to serve downloaded files and html application over HTTP protocol.

We need to spin a http server within the app and serve files through it. The cocoa pod used is GCDWebServer. (https://cocoapods.org/pods/GCDWebserver).

The files that are downloaded will be encrypted and as and when these files will be requested , they need to decrypted and served to appropriate view. Using the http server , we can intercept the request to these files and can handle the decryption during these interceptions.

The above is one of the scenarios , besides this we will be able to perform native operations based on request coming to http server and will help us bring consistency in our html application throughout different platforms.

In order to do so , we have made some changes in App Transport Security Settings in info.plist file.

As we run things on localhost , so added the same in NSExceptionDomains with NSIncludesSubdomains as true , NSExceptionAllowsInsecureHTTPLoads as true , NSExceptionRequiresForwardSecrecy as true , NSThirdPartyExceptionAllowsInsecureHTTPLoads as false , NSThirdPartyExceptionRequiresForwardSecrecy as true , NSRequiresCertificateTransparency as false , NSExceptionMinimumTLSVersion and NSThirdPartyExceptionMinimumTLSVersion as TLSv1.2.

Replies

Besides simply outlining your goals, thanks, did you have specific questions surrounding Apple's tools/SDKs someone can attempt to respond to?