![]() Likewise, you have to frame and unframe the requests. You have to serialise and deserialise your requests to transfer them over the ‘wire’. WKScriptMessage avoids this whole issue because it doesn’t communicate via the network, and thus is not seen by packet trace technologies. So, if you want to maintain a similar level of security, you’ll have to implement your own security on top of an insecure WebSocket. You can get around this by using a secure WebSocket but, alas, that’s simply not possible as things currently stand. Networking technologies also have to worry about monitoring via the networking stack’s packet trace support (see the discussion of RVI in QA1176). WKScriptMessage does not go via the network, which means those problems simply can’t occur. That’s because:Īs WebSockets are a network technology, you have to deal with all the various errors that can crop up in networking code. Personally I think WebSockets is the wrong answer to the problem of web-to-native communication regardless of this issue. This would help us decide if we need to change the implementation from wss to use the WKScriptMessage technology or not.ĭo you plan to ship in the next year or so? If so, it’s likely that iOS 10 will be a relevant target platform for you, and thus you need to worry about this issue. As per standard Apple policy, I can’t talk about The Future™. 25491679) but you should feel free toĪpple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = "eskimo" + "1" + you have any information as to when this issue might be resolved? We already have a bug on file about this (r. My recommended way to get around this is to avoid WebSocket and instead use WKWebView’s extensive JavaScript-to-native integration technologies (namely WKUserScript and WKScriptMessage).įinally, I have some other stuff I’d like to discuss privately please drop me a line at my individual email address, quoting this DevForums thread for context.Īpple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = "eskimo" + "1" + not going to be able to use a secure WebSocket connection to a local HTTPS server the sticking point is that WKWebView provides no way to override the default ( RFC 2818) TLS server trust evaluation it does for secure WebSocket connection, and you can’t get a system-trusted certificate for localhost. This is especially irksome because pages loaded over HTTPS must use a secure WebSocket. 25491679) but you should feel free toįile your own describing how this is affecting your app. You’re not going to be able to use a secure WebSocket connection to a local HTTPS server the sticking point is that WKWebView provides no way to override the default ( RFC 2818) TLS server trust evaluation it does for secure WebSocket connection, and you can’t get a system-trusted certificate for localhost. This allows for the web app to use the bluetooth tool. To do that we needed to create a native "wrapper" for the webapp that would get bluetooth messages and process/send messages to the webapp in the webview via webSocket. The cloud hosted webapp was built to be used on different devices as a webpage but we needed to add support for bluetooth to connect to a 3rd party hardware. ![]() All resulted in HTTPS not allowing for WebSocket connection. I tried several combinations of ATS permissions as well. Some of the other posts I have seen use APIs that are only available on Mac and not iOS. * It should be an array of SecCertificateRefs except for the first element in the array, which is a SecIdentityRef. * This method is expected to returns an array appropriate for use in kCFStreamSSLCertificates SSL Settings. Override me to create an https server. I thought that was the issue so I tried to enable HTTPS but I am not sure what to create for the "sslIdentityAndCertificates" method. Var url = protocol+'://localhost:'+this.port+'/service' This part in the cloud is working for HTTP when connecting to the web server on the iPad. Is this because the webserver on the iPad is running on HTTP instead of HTTPS? I made a javascript cloud app that runs on a webpage in a webview on my iPad app that communicates via WebSocket connection but it only works when im on my http site and not https or else I get an CFNetwork SSLHandshake failed (-9806) error in Xcode and on the website it says time out during handshake.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |