Re: [Interest] QWebSocketServer on iOS

2022-03-29 Thread Mårten Nordheim
Hey Alex,

Unfortunately I don't think there's a way around it as it's a security measure 
(though I could be wrong).
It simply disallows establishing insecure connections from secure sources.

Mårten.


From: Interest  on behalf of Alexander Carôt 

Sent: Tuesday, March 29, 2022 09:37
To: qt qt
Subject: Re: [Interest] QWebSocketServer on iOS

>> Can you confirm and possibly resolve ?

I just created a secure websocket on localhost and it connected fine. Looks 
like iOS does not permit non-secure websockets on secure websites at all (on 
OSX this works except for Safari). If there is another workaround please let me 
know.

Best

Alex


--
http://www.carot.de
Email : alexan...@carot.de
Tel.: +49 (0)177 5719797


> Gesendet: Montag, 28. März 2022 um 19:41 Uhr
> Von: "Alexander Carôt" 
> An: "Mårten Nordheim" 
> Cc: "qt qt" 
> Betreff: Re: [Interest] QWebSocketServer on iOS
>
> Hej Marten,
>
> Here we go – please find the sample code regarding the iOS websocket issue 
> here:
>
> https://www.dropbox.com/s/y7nr3ywht75exhw/iOS_audio.zip?dl=0
>
> This one does not contain the webbrowser yet it can be used with any iOS 
> browser (Safari, Chrome, FF etc.) with the following script:
>
> http://carot.de
>
> If successful it shows "SJC connected – version 211105".
>
> I think I already figured when it fails: If the script runs on an ssl 
> encypted site it does not connect – on OSX this only happens with Safari but 
> on iOS this might be a general networking restriction. Here is the same 
> script on a secure website:
>
> https://soundjack.eu/ws
>
> Can you confirm and possibly resolve ?
>
> Thanks and best
>
> Alex
>
> --
> http://www.carot.de
> Email : alexan...@carot.de
> Tel.: +49 (0)177 5719797
>
>
> > Gesendet: Montag, 28. März 2022 um 10:02 Uhr
> > Von: "Mårten Nordheim" 
> > An: "Alexander Carôt" , "qt qt" 
> > 
> > Betreff: Re: Re: Re: [Interest] QWebSocketServer on iOS
> >
> > Is there anything printed out in the console of the browser?
> > And it shouldn't be needed, but you can try connecting to the
> > originAuthenticationRequired signal:
> > https://doc.qt.io/qt-5/qwebsocketserver.html#originAuthenticationRequired
> > In case that's where it somehow goes wrong.
> >
> > Mårten
> >
> > 
> > From: Alexander Carôt 
> > Sent: Friday, March 25, 2022 20:39
> > To: Mårten Nordheim; qt qt
> > Subject: Aw: Re: Re: [Interest] QWebSocketServer on iOS
> >
> > Hej Marten,
> >
> > >> Just on the off-chance that it makes a difference - have you tried using 
> > >> ws://localhost instead of 127.0.0.1?
> >
> > Just did it a few hours ago and it made no difference.
> >
> > >> If not, do you have a minimal reproducer that can be shared 
> > >> (with/without the qml browser)?
> >
> > I will send over sample code which includes the problematic sources in the 
> > most illustrative way soon.
> >
> > Meantime here more insights to the issue:
> >
> > I reconfigured the websocket server to 0.0.0.0 – then I can connect from 
> > the same LAN from a different machine via a script that contains 
> > ws://192.168.0.56:50050, however, I cannot connect from an external Domain 
> > myDomain.de/connectScript.html (the same script and call above is triggered 
> > on the same machine in the same LAN, however, now retrieved from a remote 
> > server). Neither I can connect from the iOS app-own browser via localhost 
> > either. Furthermore, please forget about the crash which occurs for other 
> > implementational reasons.
> >
> > Will get back with sample code,
> > best
> >
> > Alex
> >
> >
> > --
> > http://www.carot.de
> > Email : alexan...@carot.de
> > Tel.: +49 (0)177 5719797
> >
> >
> > > Gesendet: Freitag, 25. März 2022 um 11:54 Uhr
> > > Von: "Mårten Nordheim" 
> > > An: "Alexander Carôt" , "qt qt" 
> > > 
> > > Betreff: Re: Re: [Interest] QWebSocketServer on iOS
> > >
> > > Hey again,
> > >
> > > Just on the off-chance that it makes a difference - have you tried using 
> > > ws://localhost instead of 127.0.0.1?
> > > If not, do you have a minimal reproducer that can be shared (with/without 
> > > the qml browser)?
> > >
> > > Mårten.
> > >
> > > 
> > > From: Alexander Carôt 
&

Re: [Interest] QWebSocketServer on iOS

2022-03-29 Thread Alexander Carôt
>> Can you confirm and possibly resolve ?

I just created a secure websocket on localhost and it connected fine. Looks 
like iOS does not permit non-secure websockets on secure websites at all (on 
OSX this works except for Safari). If there is another workaround please let me 
know.

Best

Alex


--
http://www.carot.de
Email : alexan...@carot.de
Tel.: +49 (0)177 5719797


> Gesendet: Montag, 28. März 2022 um 19:41 Uhr
> Von: "Alexander Carôt" 
> An: "Mårten Nordheim" 
> Cc: "qt qt" 
> Betreff: Re: [Interest] QWebSocketServer on iOS
>
> Hej Marten,
> 
> Here we go – please find the sample code regarding the iOS websocket issue 
> here:
> 
> https://www.dropbox.com/s/y7nr3ywht75exhw/iOS_audio.zip?dl=0
> 
> This one does not contain the webbrowser yet it can be used with any iOS 
> browser (Safari, Chrome, FF etc.) with the following script:
> 
> http://carot.de
> 
> If successful it shows "SJC connected – version 211105".
> 
> I think I already figured when it fails: If the script runs on an ssl 
> encypted site it does not connect – on OSX this only happens with Safari but 
> on iOS this might be a general networking restriction. Here is the same 
> script on a secure website: 
> 
> https://soundjack.eu/ws
> 
> Can you confirm and possibly resolve ?
> 
> Thanks and best
> 
> Alex
> 
> --
> http://www.carot.de
> Email : alexan...@carot.de
> Tel.: +49 (0)177 5719797
> 
> 
> > Gesendet: Montag, 28. März 2022 um 10:02 Uhr
> > Von: "Mårten Nordheim" 
> > An: "Alexander Carôt" , "qt qt" 
> > 
> > Betreff: Re: Re: Re: [Interest] QWebSocketServer on iOS
> >
> > Is there anything printed out in the console of the browser?
> > And it shouldn't be needed, but you can try connecting to the
> > originAuthenticationRequired signal:
> > https://doc.qt.io/qt-5/qwebsocketserver.html#originAuthenticationRequired
> > In case that's where it somehow goes wrong.
> > 
> > Mårten
> > 
> > 
> > From: Alexander Carôt 
> > Sent: Friday, March 25, 2022 20:39
> > To: Mårten Nordheim; qt qt
> > Subject: Aw: Re: Re: [Interest] QWebSocketServer on iOS
> > 
> > Hej Marten,
> > 
> > >> Just on the off-chance that it makes a difference - have you tried using 
> > >> ws://localhost instead of 127.0.0.1?
> > 
> > Just did it a few hours ago and it made no difference.
> > 
> > >> If not, do you have a minimal reproducer that can be shared 
> > >> (with/without the qml browser)?
> > 
> > I will send over sample code which includes the problematic sources in the 
> > most illustrative way soon.
> > 
> > Meantime here more insights to the issue:
> > 
> > I reconfigured the websocket server to 0.0.0.0 – then I can connect from 
> > the same LAN from a different machine via a script that contains 
> > ws://192.168.0.56:50050, however, I cannot connect from an external Domain 
> > myDomain.de/connectScript.html (the same script and call above is triggered 
> > on the same machine in the same LAN, however, now retrieved from a remote 
> > server). Neither I can connect from the iOS app-own browser via localhost 
> > either. Furthermore, please forget about the crash which occurs for other 
> > implementational reasons.
> > 
> > Will get back with sample code,
> > best
> > 
> > Alex
> > 
> > 
> > --
> > http://www.carot.de
> > Email : alexan...@carot.de
> > Tel.: +49 (0)177 5719797
> > 
> > 
> > > Gesendet: Freitag, 25. März 2022 um 11:54 Uhr
> > > Von: "Mårten Nordheim" 
> > > An: "Alexander Carôt" , "qt qt" 
> > > 
> > > Betreff: Re: Re: [Interest] QWebSocketServer on iOS
> > >
> > > Hey again,
> > >
> > > Just on the off-chance that it makes a difference - have you tried using 
> > > ws://localhost instead of 127.0.0.1?
> > > If not, do you have a minimal reproducer that can be shared (with/without 
> > > the qml browser)?
> > >
> > > Mårten.
> > >
> > > 
> > > From: Alexander Carôt 
> > > Sent: Thursday, March 24, 2022 17:51
> > > To: Mårten Nordheim; qt qt
> > > Subject: Aw: Re: [Interest] QWebSocketServer on iOS
> > >
> > > Hej Marten and all,
> > >
> > > >>though on mobile devices you may be subject to your application
> > > 

Re: [Interest] QWebSocketServer on iOS

2022-03-28 Thread Alexander Carôt
Hej Marten,

Here we go – please find the sample code regarding the iOS websocket issue here:

https://www.dropbox.com/s/y7nr3ywht75exhw/iOS_audio.zip?dl=0

This one does not contain the webbrowser yet it can be used with any iOS 
browser (Safari, Chrome, FF etc.) with the following script:

http://carot.de

If successful it shows "SJC connected – version 211105".

I think I already figured when it fails: If the script runs on an ssl encypted 
site it does not connect – on OSX this only happens with Safari but on iOS this 
might be a general networking restriction. Here is the same script on a secure 
website: 

https://soundjack.eu/ws

Can you confirm and possibly resolve ?

Thanks and best

Alex

--
http://www.carot.de
Email : alexan...@carot.de
Tel.: +49 (0)177 5719797


> Gesendet: Montag, 28. März 2022 um 10:02 Uhr
> Von: "Mårten Nordheim" 
> An: "Alexander Carôt" , "qt qt" 
> 
> Betreff: Re: Re: Re: [Interest] QWebSocketServer on iOS
>
> Is there anything printed out in the console of the browser?
> And it shouldn't be needed, but you can try connecting to the
> originAuthenticationRequired signal:
> https://doc.qt.io/qt-5/qwebsocketserver.html#originAuthenticationRequired
> In case that's where it somehow goes wrong.
> 
> Mårten
> 
> 
> From: Alexander Carôt 
> Sent: Friday, March 25, 2022 20:39
> To: Mårten Nordheim; qt qt
> Subject: Aw: Re: Re: [Interest] QWebSocketServer on iOS
> 
> Hej Marten,
> 
> >> Just on the off-chance that it makes a difference - have you tried using 
> >> ws://localhost instead of 127.0.0.1?
> 
> Just did it a few hours ago and it made no difference.
> 
> >> If not, do you have a minimal reproducer that can be shared (with/without 
> >> the qml browser)?
> 
> I will send over sample code which includes the problematic sources in the 
> most illustrative way soon.
> 
> Meantime here more insights to the issue:
> 
> I reconfigured the websocket server to 0.0.0.0 – then I can connect from the 
> same LAN from a different machine via a script that contains 
> ws://192.168.0.56:50050, however, I cannot connect from an external Domain 
> myDomain.de/connectScript.html (the same script and call above is triggered 
> on the same machine in the same LAN, however, now retrieved from a remote 
> server). Neither I can connect from the iOS app-own browser via localhost 
> either. Furthermore, please forget about the crash which occurs for other 
> implementational reasons.
> 
> Will get back with sample code,
> best
> 
> Alex
> 
> 
> --
> http://www.carot.de
> Email : alexan...@carot.de
> Tel.: +49 (0)177 5719797
> 
> 
> > Gesendet: Freitag, 25. März 2022 um 11:54 Uhr
> > Von: "Mårten Nordheim" 
> > An: "Alexander Carôt" , "qt qt" 
> > 
> > Betreff: Re: Re: [Interest] QWebSocketServer on iOS
> >
> > Hey again,
> >
> > Just on the off-chance that it makes a difference - have you tried using 
> > ws://localhost instead of 127.0.0.1?
> > If not, do you have a minimal reproducer that can be shared (with/without 
> > the qml browser)?
> >
> > Mårten.
> >
> > 
> > From: Alexander Carôt 
> > Sent: Thursday, March 24, 2022 17:51
> > To: Mårten Nordheim; qt qt
> > Subject: Aw: Re: [Interest] QWebSocketServer on iOS
> >
> > Hej Marten and all,
> >
> > >>though on mobile devices you may be subject to your application
> > >> being put to sleep when it goes into the background.
> >
> > Meantime this is what I ran into which is why I eventually bundled the qml 
> > minibrowser and my application. The browser tries to connect to the 
> > application via ws://127.0.0.1:50050 and this works out well on macOS. On 
> > iOS, however, the connection fails and, furthermore, any other action (e.g. 
> > sending packets) with the websocket server endpoint makes the app crash. 
> > Hence, I'd suspect this is due to iOS specific security settings – also 
> > because the dialog to allow local network usage does not show up. Please 
> > find here the list of network related security keys I applied in the 
> > Info.plist file
> >
> > NSLocalNetworkUsageDescription
> > Uses local networking to communicate settings…
> > NSTemporaryExceptionAllowsInsecureHTTPLoads
> >
> > NSAppTransportSecurity
> >
> > NSAllowsArbitraryLoads
> > NSAllowsArbitraryLoadsForMedia
> > NSAllowsArbitraryLoadsInWe

Re: [Interest] QWebSocketServer on iOS

2022-03-28 Thread Mårten Nordheim
Is there anything printed out in the console of the browser?
And it shouldn't be needed, but you can try connecting to the
originAuthenticationRequired signal:
https://doc.qt.io/qt-5/qwebsocketserver.html#originAuthenticationRequired
In case that's where it somehow goes wrong.

Mårten


From: Alexander Carôt 
Sent: Friday, March 25, 2022 20:39
To: Mårten Nordheim; qt qt
Subject: Aw: Re: Re: [Interest] QWebSocketServer on iOS

Hej Marten,

>> Just on the off-chance that it makes a difference - have you tried using 
>> ws://localhost instead of 127.0.0.1?

Just did it a few hours ago and it made no difference.

>> If not, do you have a minimal reproducer that can be shared (with/without 
>> the qml browser)?

I will send over sample code which includes the problematic sources in the most 
illustrative way soon.

Meantime here more insights to the issue:

I reconfigured the websocket server to 0.0.0.0 – then I can connect from the 
same LAN from a different machine via a script that contains 
ws://192.168.0.56:50050, however, I cannot connect from an external Domain 
myDomain.de/connectScript.html (the same script and call above is triggered on 
the same machine in the same LAN, however, now retrieved from a remote server). 
Neither I can connect from the iOS app-own browser via localhost either. 
Furthermore, please forget about the crash which occurs for other 
implementational reasons.

Will get back with sample code,
best

Alex


--
http://www.carot.de
Email : alexan...@carot.de
Tel.: +49 (0)177 5719797


> Gesendet: Freitag, 25. März 2022 um 11:54 Uhr
> Von: "Mårten Nordheim" 
> An: "Alexander Carôt" , "qt qt" 
> 
> Betreff: Re: Re: [Interest] QWebSocketServer on iOS
>
> Hey again,
>
> Just on the off-chance that it makes a difference - have you tried using 
> ws://localhost instead of 127.0.0.1?
> If not, do you have a minimal reproducer that can be shared (with/without the 
> qml browser)?
>
> Mårten.
>
> 
> From: Alexander Carôt 
> Sent: Thursday, March 24, 2022 17:51
> To: Mårten Nordheim; qt qt
> Subject: Aw: Re: [Interest] QWebSocketServer on iOS
>
> Hej Marten and all,
>
> >>though on mobile devices you may be subject to your application
> >> being put to sleep when it goes into the background.
>
> Meantime this is what I ran into which is why I eventually bundled the qml 
> minibrowser and my application. The browser tries to connect to the 
> application via ws://127.0.0.1:50050 and this works out well on macOS. On 
> iOS, however, the connection fails and, furthermore, any other action (e.g. 
> sending packets) with the websocket server endpoint makes the app crash. 
> Hence, I'd suspect this is due to iOS specific security settings – also 
> because the dialog to allow local network usage does not show up. Please find 
> here the list of network related security keys I applied in the Info.plist 
> file
>
> NSLocalNetworkUsageDescription
> Uses local networking to communicate settings…
> NSTemporaryExceptionAllowsInsecureHTTPLoads
>
> NSAppTransportSecurity
>
> NSAllowsArbitraryLoads
> NSAllowsArbitraryLoadsForMedia
> NSAllowsArbitraryLoadsInWebContent
> NSAllowsLocalNetworking
> NSExceptionDomains
> 
> localhost
> 
> 
> NSExceptionAllowsInsecureHTTPLoads
> NSIncludesSubdomains
> 
> mydomain.com
> 
> 
> NSExceptionAllowsInsecureHTTPLoads
> NSIncludesSubdomains
> 
> 
> 
>
> Am I missing anything in terms of security keys or does anyone have a 
> different suggestions how to resolve this issue ?
>
> Best
>
> Alex
>
> P.S.: Thiago: No firewalls installed and the websocket is running on 
> localhost.
>
>
> --
> http://www.carot.de
> Email : alexan...@carot.de
> Tel.: +49 (0)177 5719797
>
>
> > Gesendet: Dienstag, 22. März 2022 um 12:43 Uhr
> > Von: "Mårten Nordheim" 
> > An: "Alexander Carôt" , "qt qt" 
> > 
> > Betreff: Re: [Interest] QWebSocketServer on iOS
> >
> > Hello Alex,
> >
> > There's no reason why listening to a port on iOS shouldn't work, though on 
> > mobile devices you may be subject to your application
> > being put to sleep when it goes into the background.
> >
> > Mårten.
> >
> > ___

Re: [Interest] QWebSocketServer on iOS

2022-03-25 Thread Alexander Carôt
Hej Marten,

>> Just on the off-chance that it makes a difference - have you tried using 
>> ws://localhost instead of 127.0.0.1?

Just did it a few hours ago and it made no difference.

>> If not, do you have a minimal reproducer that can be shared (with/without 
>> the qml browser)?

I will send over sample code which includes the problematic sources in the most 
illustrative way soon.

Meantime here more insights to the issue:

I reconfigured the websocket server to 0.0.0.0 – then I can connect from the 
same LAN from a different machine via a script that contains 
ws://192.168.0.56:50050, however, I cannot connect from an external Domain 
myDomain.de/connectScript.html (the same script and call above is triggered on 
the same machine in the same LAN, however, now retrieved from a remote server). 
Neither I can connect from the iOS app-own browser via localhost either. 
Furthermore, please forget about the crash which occurs for other 
implementational reasons. 

Will get back with sample code,
best

Alex


--
http://www.carot.de
Email : alexan...@carot.de
Tel.: +49 (0)177 5719797


> Gesendet: Freitag, 25. März 2022 um 11:54 Uhr
> Von: "Mårten Nordheim" 
> An: "Alexander Carôt" , "qt qt" 
> 
> Betreff: Re: Re: [Interest] QWebSocketServer on iOS
>
> Hey again,
> 
> Just on the off-chance that it makes a difference - have you tried using 
> ws://localhost instead of 127.0.0.1?
> If not, do you have a minimal reproducer that can be shared (with/without the 
> qml browser)?
> 
> Mårten.
> 
> 
> From: Alexander Carôt 
> Sent: Thursday, March 24, 2022 17:51
> To: Mårten Nordheim; qt qt
> Subject: Aw: Re: [Interest] QWebSocketServer on iOS
> 
> Hej Marten and all,
> 
> >>though on mobile devices you may be subject to your application
> >> being put to sleep when it goes into the background.
> 
> Meantime this is what I ran into which is why I eventually bundled the qml 
> minibrowser and my application. The browser tries to connect to the 
> application via ws://127.0.0.1:50050 and this works out well on macOS. On 
> iOS, however, the connection fails and, furthermore, any other action (e.g. 
> sending packets) with the websocket server endpoint makes the app crash. 
> Hence, I'd suspect this is due to iOS specific security settings – also 
> because the dialog to allow local network usage does not show up. Please find 
> here the list of network related security keys I applied in the Info.plist 
> file
> 
> NSLocalNetworkUsageDescription
> Uses local networking to communicate settings…
> NSTemporaryExceptionAllowsInsecureHTTPLoads
> 
> NSAppTransportSecurity
>
> NSAllowsArbitraryLoads
> NSAllowsArbitraryLoadsForMedia
> NSAllowsArbitraryLoadsInWebContent
> NSAllowsLocalNetworking
> NSExceptionDomains
> 
> localhost
> 
> 
> NSExceptionAllowsInsecureHTTPLoads
> NSIncludesSubdomains
> 
> mydomain.com
> 
> 
> NSExceptionAllowsInsecureHTTPLoads
> NSIncludesSubdomains
> 
> 
> 
> 
> Am I missing anything in terms of security keys or does anyone have a 
> different suggestions how to resolve this issue ?
> 
> Best
> 
> Alex
> 
> P.S.: Thiago: No firewalls installed and the websocket is running on 
> localhost.
> 
> 
> --
> http://www.carot.de
> Email : alexan...@carot.de
> Tel.: +49 (0)177 5719797
> 
> 
> > Gesendet: Dienstag, 22. März 2022 um 12:43 Uhr
> > Von: "Mårten Nordheim" 
> > An: "Alexander Carôt" , "qt qt" 
> > 
> > Betreff: Re: [Interest] QWebSocketServer on iOS
> >
> > Hello Alex,
> >
> > There's no reason why listening to a port on iOS shouldn't work, though on 
> > mobile devices you may be subject to your application
> > being put to sleep when it goes into the background.
> >
> > Mårten.
> >
> > 
> > From: Interest  on behalf of Alexander 
> > Carôt 
> > Sent: Monday, March 21, 2022 10:24
> > To: qt qt
> > Subject: [Interest] QWebSocketServer on iOS
> >
> > Hi all,
> >
> > I have an application running a QWebSocketServer::NonSecureMode on 
> > localhost and I am using a web browser to connect. This works fine on OSX, 
> >

Re: [Interest] QWebSocketServer on iOS

2022-03-25 Thread Mårten Nordheim
Hey again,

Just on the off-chance that it makes a difference - have you tried using 
ws://localhost instead of 127.0.0.1?
If not, do you have a minimal reproducer that can be shared (with/without the 
qml browser)?

Mårten.


From: Alexander Carôt 
Sent: Thursday, March 24, 2022 17:51
To: Mårten Nordheim; qt qt
Subject: Aw: Re: [Interest] QWebSocketServer on iOS

Hej Marten and all,

>>though on mobile devices you may be subject to your application
>> being put to sleep when it goes into the background.

Meantime this is what I ran into which is why I eventually bundled the qml 
minibrowser and my application. The browser tries to connect to the application 
via ws://127.0.0.1:50050 and this works out well on macOS. On iOS, however, the 
connection fails and, furthermore, any other action (e.g. sending packets) with 
the websocket server endpoint makes the app crash. Hence, I'd suspect this is 
due to iOS specific security settings – also because the dialog to allow local 
network usage does not show up. Please find here the list of network related 
security keys I applied in the Info.plist file

NSLocalNetworkUsageDescription
Uses local networking to communicate settings…
NSTemporaryExceptionAllowsInsecureHTTPLoads

NSAppTransportSecurity
   
NSAllowsArbitraryLoads
NSAllowsArbitraryLoadsForMedia
NSAllowsArbitraryLoadsInWebContent
NSAllowsLocalNetworking
NSExceptionDomains

localhost


NSExceptionAllowsInsecureHTTPLoads
NSIncludesSubdomains

mydomain.com


NSExceptionAllowsInsecureHTTPLoads
NSIncludesSubdomains




Am I missing anything in terms of security keys or does anyone have a different 
suggestions how to resolve this issue ?

Best

Alex

P.S.: Thiago: No firewalls installed and the websocket is running on localhost.


--
http://www.carot.de
Email : alexan...@carot.de
Tel.: +49 (0)177 5719797


> Gesendet: Dienstag, 22. März 2022 um 12:43 Uhr
> Von: "Mårten Nordheim" 
> An: "Alexander Carôt" , "qt qt" 
> 
> Betreff: Re: [Interest] QWebSocketServer on iOS
>
> Hello Alex,
>
> There's no reason why listening to a port on iOS shouldn't work, though on 
> mobile devices you may be subject to your application
> being put to sleep when it goes into the background.
>
> Mårten.
>
> 
> From: Interest  on behalf of Alexander Carôt 
> 
> Sent: Monday, March 21, 2022 10:24
> To: qt qt
> Subject: [Interest] QWebSocketServer on iOS
>
> Hi all,
>
> I have an application running a QWebSocketServer::NonSecureMode on localhost 
> and I am using a web browser to connect. This works fine on OSX, Linux and 
> Windows so far.
>
> However, I just ported the app to iOS and here it has so far not been 
> possible to establish a connection yet.
>
> Before I dig deeper in terms of debugging I wonder if probably this not 
> supported for iOS at all ?
>
> So far I did not see any error message, however.
>
> Thanks in advance for pointers of any kind.
>
> Best
>
> Alex
>
> --
> http://www.carot.de
> Email : alexan...@carot.de
> Tel.: +49 (0)177 5719797
>
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QWebSocketServer on iOS

2022-03-24 Thread Alexander Carôt
Hej Marten and all,

>>though on mobile devices you may be subject to your application
>> being put to sleep when it goes into the background.

Meantime this is what I ran into which is why I eventually bundled the qml 
minibrowser and my application. The browser tries to connect to the application 
via ws://127.0.0.1:50050 and this works out well on macOS. On iOS, however, the 
connection fails and, furthermore, any other action (e.g. sending packets) with 
the websocket server endpoint makes the app crash. Hence, I'd suspect this is 
due to iOS specific security settings – also because the dialog to allow local 
network usage does not show up. Please find here the list of network related 
security keys I applied in the Info.plist file

NSLocalNetworkUsageDescription
Uses local networking to communicate settings…
NSTemporaryExceptionAllowsInsecureHTTPLoads

NSAppTransportSecurity
   
NSAllowsArbitraryLoads
NSAllowsArbitraryLoadsForMedia
NSAllowsArbitraryLoadsInWebContent
NSAllowsLocalNetworking
NSExceptionDomains

localhost


NSExceptionAllowsInsecureHTTPLoads
NSIncludesSubdomains

mydomain.com


NSExceptionAllowsInsecureHTTPLoads
NSIncludesSubdomains




Am I missing anything in terms of security keys or does anyone have a different 
suggestions how to resolve this issue ?

Best

Alex

P.S.: Thiago: No firewalls installed and the websocket is running on localhost.


--
http://www.carot.de
Email : alexan...@carot.de
Tel.: +49 (0)177 5719797


> Gesendet: Dienstag, 22. März 2022 um 12:43 Uhr
> Von: "Mårten Nordheim" 
> An: "Alexander Carôt" , "qt qt" 
> 
> Betreff: Re: [Interest] QWebSocketServer on iOS
>
> Hello Alex,
> 
> There's no reason why listening to a port on iOS shouldn't work, though on 
> mobile devices you may be subject to your application
> being put to sleep when it goes into the background.
> 
> Mårten.
> 
> 
> From: Interest  on behalf of Alexander Carôt 
> 
> Sent: Monday, March 21, 2022 10:24
> To: qt qt
> Subject: [Interest] QWebSocketServer on iOS
> 
> Hi all,
> 
> I have an application running a QWebSocketServer::NonSecureMode on localhost 
> and I am using a web browser to connect. This works fine on OSX, Linux and 
> Windows so far.
> 
> However, I just ported the app to iOS and here it has so far not been 
> possible to establish a connection yet.
> 
> Before I dig deeper in terms of debugging I wonder if probably this not 
> supported for iOS at all ?
> 
> So far I did not see any error message, however.
> 
> Thanks in advance for pointers of any kind.
> 
> Best
> 
> Alex
> 
> --
> http://www.carot.de
> Email : alexan...@carot.de
> Tel.: +49 (0)177 5719797
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QWebSocketServer on iOS

2022-03-22 Thread Thiago Macieira
On Tuesday, 22 March 2022 08:43:36 -03 Mårten Nordheim wrote:
> Hello Alex,
> 
> There's no reason why listening to a port on iOS shouldn't work, though on
> mobile devices you may be subject to your application being put to sleep
> when it goes into the background.
> 
> Mårten.

There may also be a firewall that blocks incoming connections.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering



___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QWebSocketServer on iOS

2022-03-22 Thread Mårten Nordheim
Hello Alex,

There's no reason why listening to a port on iOS shouldn't work, though on 
mobile devices you may be subject to your application
being put to sleep when it goes into the background.

Mårten.


From: Interest  on behalf of Alexander Carôt 

Sent: Monday, March 21, 2022 10:24
To: qt qt
Subject: [Interest] QWebSocketServer on iOS

Hi all,

I have an application running a QWebSocketServer::NonSecureMode on localhost 
and I am using a web browser to connect. This works fine on OSX, Linux and 
Windows so far.

However, I just ported the app to iOS and here it has so far not been possible 
to establish a connection yet.

Before I dig deeper in terms of debugging I wonder if probably this not 
supported for iOS at all ?

So far I did not see any error message, however.

Thanks in advance for pointers of any kind.

Best

Alex

--
http://www.carot.de
Email : alexan...@carot.de
Tel.: +49 (0)177 5719797

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] QWebSocketServer on iOS

2022-03-21 Thread Alexander Carôt
Hi all,

I have an application running a QWebSocketServer::NonSecureMode on localhost 
and I am using a web browser to connect. This works fine on OSX, Linux and 
Windows so far.

However, I just ported the app to iOS and here it has so far not been possible 
to establish a connection yet.

Before I dig deeper in terms of debugging I wonder if probably this not 
supported for iOS at all ?

So far I did not see any error message, however.

Thanks in advance for pointers of any kind.

Best

Alex

--
http://www.carot.de
Email : alexan...@carot.de
Tel.: +49 (0)177 5719797

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest