How to simulate HTTPS on a native application? - javascript

I am using Instascan library which allows me to access camera on both desktop and mobile devices. However, when I convert the website to a native Android or Iphone app I cannot access the camera. The documentation of Instascan library says
Chrome requires HTTPS when using the WebRTC API. Any pages using this
library should be served over HTTPS
Is there a way to trick a native application to think that it is being served over HTTPS?

Related

iOS: Polyfill NFC web API - is it even possible?

I'm facing migrating my iOS Cordova based app to PWA. The primary issue is that it is using NFC scanner. I have started to wonder if there is any way to polyfill NFC web API on iOS / Safari? It seems that official support will not happend soon...
At the moment I'm thinking of creating some kind of "service" that would host native NFC API over some communication channel.
A bit more detailed:
Create an app/service that would be a proxy for native NFC API.
The app should receive scan requests send scan results over browser reachable interface (Sockets?).
At PWA side I think it could be nicely packed into NFC web API shape.
Native app would be required to install with my PWA. But can also be considered general proxy for PWA class apps.
I'm not familiar with iOS programming and architecture but it seems there are some basic flaws of this concept. So here are my questions to iOS devs :)
Is is possible to implement and run continually some kind of service like TCP / sockets server?
Do you have an idea which layer would be suitable to handle communication between NFC proxy and PWA?
Maybe you have some alternatives to proposed approach?
IT Man

Is https needed for getUserMedia when using a Webview on iOS?

Browsers enforce https when using getUserMedia. I am working on a web app made to be used on a local network rather than actually connecting to the internet so going for a typical TLS cert won't really work. If I use a webview in an iOS app, would getUserMedia work when pointing the view at an IP address serving a website?

equivalent ios library for RTCMultiConnection in java script

I am working on webRTC iOS integration. Our Web team integrated the webrtc using RTCMultiConnection library (https://cdn.webrtc-experiment.com:443/rmc3.min.js) and created the Web Application. They are setting the socket url (server url) and configuring the library objects and creating the session using the library.
Is there any equivalent library for making the connection directly from client? Or is it possible to access the .js file from swift?
Please check the RTCMultiConnection-API:
https://github.com/muaz-khan/RTCMultiConnection/blob/master/docs/ios-android.md
Above doc explains how to create a cordova-based iOS/Android application.
Everything from RTCMultiConnection-v3 is supported in cordova-apps except "Screen-Capturing". You can NOT capture your screen from any iOS/Android app.
The ONLY_Disadvantage of Cordova_based_apps is "It adds 20MB unwanted Size in the compiled iOS/Android app" .... i.e. your APK file may have 20MB minimum size.
Here is an example APK file (android-application using RTCMultiConnection v3):
https://play.google.com/store/apps/details?id=com.webrtc.experiment

https network call ssl implementation using Javascript (Cordova)

In my cordova application, I am using https api calls using java script. In android platform it is working as expected. But the iOS api was not working with my iPad. When I investigated more, I found that it is related to ssl habndshake. I have added the following method to my app delegate
#implementation NSURLRequest(DataController)
+ (BOOL)allowsAnyHTTPSCertificateForHost:(NSString *)host{
return YES;
}
Now the api is working fine. But came to know that this is not recommended when application is uploaded to iTunes store. In native applications apple recommends to implement NSURLProtectionSpace api. I wish to know how this can be accomplished in cordova platform?

Azure Mobile App javascript Cordova client

I am developing App using Cordova and want to try using Azure App Service's Mobile App.
But from this official document
https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-dotnet-backend-xamarin-ios-get-started-preview/
it contains iOS/Xamerin/WinApp/Android but javascript example.
My questions are:
Does the javascript version of Azure Mobile App client exist?
Is the client SDK the same with Mobile Service javascript client?
Is there tutorial of Mobile App javascript client?
thanks a lot.
Currently, the Mobile Apps service is in preview and not all features have been implemented yet.
Yes, the client SDK is the same as with Mobile Services. If you download the HTML quickstart client from your Mobile App, you'll see that the html page references the same library: MobileServices.Web-2.0.0-beta.min.js
You didn't asked for the backend but anyways...Note that a major drawback currently for JS developers is the fact the you can't create a Node backend for Mobile Apps yet.

Categories

Resources