Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML WebView, iOS and self signed ssl certificate
Forum Updated to NodeBB v4.3 + New Features

QML WebView, iOS and self signed ssl certificate

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 656 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jan80
    wrote on last edited by
    #1

    Does anyone know how I can make QML WebView (Quick 2) to show a page from a server with a self signed certificate on iOS?

    I'am using Qt 5.11.1.

    So far I tried:

    • Installing the certificate in my iPad 6 and enable full trust (see https://support.apple.com/en-us/HT204477)
    • Set a custom QQMLNetworkAccessManagerFactory in the QMLEngine. But the Factory doesn't get used by WebView, because WebView uses Safari, which is a different process. (See https://bugreports.qt.io/browse/QTBUG-43590)
    • I tried to set the NSAppTransportSecurity Options in info.plist (see https://stackoverflow.com/questions/32755674/ios9-getting-error-an-ssl-error-has-occurred-and-a-secure-connection-to-the-ser):
    	<key>NSAppTransportSecurity</key>
    	<dict>
    		<key>NSAllowsArbitraryLoads</key>
    		<true/>
    		<key>NSExceptionDomains</key>
    		<dict>
    			<key>(mydomain)</key>
    			<dict>
    				<key>NSExceptionRequiresForwardSecrecy</key>
    				<false/>
    				<key>NSIncludesSubdomains</key>
    				<true/>
    				<key>NSExceptionAllowsInsecureHTTPLoads</key>
    				<true/>
    			</dict>
    		</dict>
    	</dict>
    

    WebView always fails to load my page with the message "An SSL error has occurred and a secure connection to the server cannot be made."

    I can open the page using Safari.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved