Forums

OverviewFelgo 2 Support (Qt 5) › SSL connections fail on iOS with the new Qt 5.9

Viewing 15 posts - 1 through 15 (of 29 total)
  • Author
    Posts
  • #16580

    Phil

    I am using XMLHttpRequest inside my code and with the new release of Felgo including Qt 5.9 then the SSL connections fail on iOS.

     

    But they work well:

    • on the desktop
    • with the previous release of Felgo
    #16581

    Lorenz

    Hi,

    Please try running a Release Build, it should work there.

    Let me know if that helps!

    Cheers,
    Lorenz

    #16585

    Phil

    It works if I build with QtCreator but not if I build with Xcode.

    #16586

    Bas

    i am experiencing the same problem.

    and webview is not showing unsecured websites.

    i use both in an app.

    can this be fixed?

    cannot build with qt creator.

    i need to build with xcode.

    help!?

    #16587

    Bas

    this is on IOS btw, on android and mac desktop it works fine.

    #16588

    Alex
    Felgo Team

    Hi Bas,

    You may need to switch from debug to release mode within Xcode itself: Click on the scheme selection box in the toolbar, select “Edit Scheme” and change the “Build” action from Debug to Release (see the link for a screenshot).

    For webview you might need to add some exceptions to the Info.plist due to “App Transport Security” feature, you can google “ios ats” for more information.

    Hope that helps!

    Best,

    Alex from Felgo

    #16589

    Bas

    hi Alex,

    But I created a archive file and used it in TestFlight.

    in the app I make https calls with the var req = new XMLHttpRequest()

    but I probably build a debug version.

    will try tomorrow again.

    thank for the quick answer!

    #16590

    Bas

    hi Alex,

    i tried running the app in a releas build, still no success.

    webview is working now.

     

    a former IOS app project that worked perfectly does not work anymore using XMLHttpRequest over ssl.

    what has changed?

     

    #16594

    Bas
    import Felgo 3.0
    import QtQuick 2.0
    
    GameWindow {
        id: gameWindow
    
    
        activeScene: scene
    
        // the size of the Window can be changed at runtime by pressing Ctrl (or Cmd on Mac) + the number keys 1-8
        // the content of the logical scene size (480x320 for landscape mode by default) gets scaled to the window size based on the scaleMode
        // you can set this size to any resolution you would like your project to start with, most of the times the one of your main target device
        // this resolution is for iPhone 4 & iPhone 4S
        screenWidth: 960
        screenHeight: 640
    
        Scene {
            id: scene
    
            // the "logical size" - the scene content is auto-scaled to match the GameWindow size
            width: 480
            height: 320
    
    
            Component.onCompleted: {
                var url = "https://www.google.nl";
    
                var xhr = new XMLHttpRequest();
                xhr.onreadystatechange = (function(myxhr) {
                    return function() {
    
                        console.log("myxhr.readyState",myxhr.readyState)
    
                        if(myxhr.readyState === XMLHttpRequest.HEADERS_RECEIVED)
                        {
                            console.log(myxhr.responseText)
                        }
                        else if( myxhr.readyState === XMLHttpRequest.DONE)
                        {
                            if (myxhr.status === 200)
                            {
    //                            var data = myxhr.responseText;
                                console.log(myxhr.responseText)
                            }
                            else
                            {
                                console.log("",myxhr.responseText)
                                console.log("Error, geen connectie met de server")
                            }
                        }
                    }
                })(xhr);
                xhr.open('GET', url, true);
                xhr.send();
            }
    
        }
    }
    

    i made a very simple example but i cannot get this to work in simulator!

    using xcode : Version 8.3.3 (8E3004b)

    latest v-play with qt5.9

    what can i try next?

    #16596

    Bas
    #16597

    Lorenz

    Hi Bas,

    Indeed you found the source of this problem. To make this Qt Bug less painful, we are shipping a patched version of libQt5Network.a with the Felgo SDK. However, this only helps for release builds, and not Debug builds.

    I just tested your sample code with a release build on a device and it works like a charm!

    Therefore, please make sure to create release builds of your apps if you want to test on iOS devices, as the issue should not occur there.

    All the best,

    Lorenz

     

     

    #16598

    Bas

    Hi Lorenz,

    is it also working in the simulator?

    i need to make screenshots of an app and do not own certain devices.

     

    when i build for archive, it is a release version of the app for testflight.

     

    I tested it with a another app which worked fine that way, untill the latest update.

     

     

    could you describe the process in tekst steps so i can duplicate these steps?

    because i tested it with simulator and still no success with a release – build configuration, in the scheme of the test app.

    or release build to create archive and test in testflight.

     

     

    #16600

    Lorenz

    Hi Bas,

    You are right, the fix does only work on devices, and not the iOS Simulator.

    [EDIT:]

    Here’s the preferred solution: Install Qt 5.9.1 Beta and copy the required libraries (libQt5Network.a and libQt5Network_debug.a) to your Qt 5.9.0 folder!

    All the best,

    Lorenz

    #16603

    Bas

    hi Lorenz,

    thanx for the answer.

    i am curious about how to downgrade.

    so if you could mail me the instructions how to downgrade to qt 5.8?

    that would be great

    thanx,

    Bas Lentfert

    #16604

    Lorenz

    Hi Bas,

    There’s a better way. Simply install the Qt 5.9.1 beta using the Qt Online Installer and copy the required libraries (libQt5Network.a and libQt5Network_debug.a) to your Qt 5.9.0 folder!

    You will find the libraries in <Your-Qt-Dir>/5.9/ios/lib!

    Let us know if that works for you.

    All the best,

    Lorenz

Viewing 15 posts - 1 through 15 (of 29 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support