Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt 5.3.2 on IOS with OpenSSL
Forum Updated to NodeBB v4.3 + New Features

Qt 5.3.2 on IOS with OpenSSL

Scheduled Pinned Locked Moved Mobile and Embedded
11 Posts 3 Posters 4.2k 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.
  • F Offline
    F Offline
    FrankiPL
    wrote on last edited by
    #1

    Hi all,

    My app needs OpenSSL, but on iOS OpenSSL is not available so QSslSocket is undefined symbol. (Qt 5.3.1 for iOS, QtCreator 3.2.0)

    I was able to compile openssl libs and statically linked Qt 5.3.2 using this help "openssl config for iphoneos":https://bugreports.qt-project.org/browse/QTBUG-36891
    instead of git I have used qt-everywhere-opensource-src-5.3.2
    Everything works fine on the device.

    My configure option for Qt was:
    ./configure -v -prefix /Users/administrator/dev/qt-5.3.2-ios-ipad -xplatform macx-ios-clang -debug-and-release -opensource -confirm-license -static -nomake tests -nomake examples -skip qtdeclarative -skip qtwebkit -skip qtserialport -skip qtwebkit-examples -skip multimedia -openssl-linked -I/Users/administrator/dev/openssl-1.0.1e/include -L/Users/administrator/dev/openssl-1.0.1e/lib -lcrypto -lssl

    What bothers me is that this is static build of Qt and I don't have commercial license, so the question is:

    1. Can it be build as dynamically linked Qt but with openssl compiled in. ?
    2. If not how can I get Qt working with OpenSSL on iOS, my app is using custom CA certificates and validation.
    3. Has anyone been testing dynamically linked Qt apps in App Store ? I mean do they allow such an applications to be published?

    Best Regards
    Marek

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tk.fs
      wrote on last edited by
      #2

      Hey Marek, we have a dynamic linked Mac App on the AppStore - so yes, you can publish it. However it currently is quite some work to get codesign to do it right - so plan on some sleepless nights to get this working. There are several open tickets for this to get some background information:

      https://bugreports.qt-project.org/browse/QTBUG-32896
      https://bugreports.qt-project.org/browse/QTBUG-23268
      https://bugreports.qt-project.org/browse/QTBUG-34810

      1 Reply Last reply
      0
      • F Offline
        F Offline
        FrankiPL
        wrote on last edited by
        #3

        Thanks for reply.
        To be honest I converted my project to Xcode, to be able to choose orientation, icon, icon caption and so on. It looks like it should be quite easy to sign application from Xcode? I can see that these bugs are related to macdeployqt, so are you doing everything from QtCreator?

        And how about this compilation issue?
        Can I compile dynamically linked Qt with openssl compiled into QtNetwork ?
        Are you using OpenSSL?

        All the best,
        Marek

        1 Reply Last reply
        0
        • F Offline
          F Offline
          FrankiPL
          wrote on last edited by
          #4

          I can't build shared Qt, everytime even if I specyfically use "-shared" option to configure, it keeps building static Qt. I have Mac OS X 10.9 and Qt 5.3.2 configure option is:
          @
          ./configure -v -prefix /Users/administrator/qt-5.3.2-ios-ipad-dyn2 -xplatform macx-ios-clang -debug-and-release -shared -opensource -confirm-license -nomake tests -nomake examples -skip qtdeclarative -skip qtwebkit -skip qtserialport -skip qtwebkit-examples -skip multimedia -openssl-linked -I/Users/administrator/openssl-ios-arm/include/ -L/Users/administrator/openssl-ios-arm/lib/ -lcrypto -lssl
          @

          configure status is:
          @
          Building on: macx-clang (x86_64, CPU features: cx16 mmx sse sse2 sse3 ssse3)
          Building for: macx-ios-clang (arm, CPU features: neon)

          qmake vars .......... styles += mac fusion windows DEFINES += QT_NO_MTDEV DEFINES += QT_NO_LIBUDEV DEFINES += QT_NO_EVDEV INCLUDEPATH += "/Users/administrator/openssl-ios-arm/include/" LIBS += -L"/Users/administrator/openssl-ios-arm/lib/" -l"crypto" -l"ssl" sql-drivers = sql-plugins = sqlite qmake switches .........

          Build options:
          Configuration .......... accessibility audio-backend build_all build_all c++11 compile_examples concurrent cross_compile debug debug_and_release freetype full-config getaddrinfo getifaddrs gif harfbuzz iconv ipv6ifname jpeg large-config largefile medium-config minimal-config no-pkg-config opengl opengles2 openssl-linked pcre png precompile_header qpa qpa reduce_exports release small-config static system-zlib
          Build parts ............ libs
          Mode ................... debug and release; default link: debug
          Using C++11 ............ yes
          Using PCH .............. yes
          Target compiler supports:
          iWMMXt/Neon .......... no/auto

          Qt modules and options:
          Qt D-Bus ............... no
          Qt Concurrent .......... yes
          Qt GUI ................. yes
          Qt Widgets ............. yes
          Large File ............. yes
          QML debugging .......... yes
          Use system proxies ..... no

          Support enabled for:
          Accessibility .......... yes
          ALSA ................... no
          CUPS ................... no
          Evdev .................. no
          FontConfig ............. no
          FreeType ............... yes (bundled copy)
          Glib ................... no
          GTK theme .............. no
          HarfBuzz ............... yes
          Iconv .................. yes
          ICU .................... no
          Image formats:
          GIF .................. yes (in QtGui, using bundled copy)
          JPEG ................. yes (in QtGui, using bundled copy)
          PNG .................. yes (in QtGui, using bundled copy)
          journald ............... no
          mtdev .................. no
          Networking:
          CoreWlan ............. no
          getaddrinfo .......... yes
          getifaddrs ........... yes
          IPv6 ifname .......... yes
          OpenSSL .............. yes (linked to the libraries)
          NIS .................... no
          OpenGL / OpenVG:
          EGL .................. no
          OpenGL ............... yes (OpenGL ES 2.x)
          OpenVG ............... no
          PCRE ................... yes (bundled copy)
          pkg-config ............. no
          PulseAudio ............. no
          QPA backends:
          DirectFB ............. no
          EGLFS ................ no
          KMS .................. no
          LinuxFB .............. no
          XCB .................. no
          Session management ..... yes
          SQL drivers:
          DB2 .................. no
          InterBase ............ no
          MySQL ................ no
          OCI .................. no
          ODBC ................. no
          PostgreSQL ........... no
          SQLite 2 ............. no
          SQLite ............... yes (plugin, using bundled copy)
          TDS .................. no
          udev ................... no
          xkbcommon .............. no
          zlib ................... yes (system library)

          WARNING: Using static linking will disable the use of dynamically
          loaded plugins. Make sure to import all needed static plugins,
          or compile needed modules into the library.

          NOTE: When linking against OpenSSL, you can override the default
          library names through OPENSSL_LIBS.
          For example:
          OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked

          NOTE: Qt is using double for qreal on this system. This is binary incompatible against Qt 5.1.
          Configure with '-qreal float' to create a build that is binary compatible with 5.1.
          Info: creating super cache file /Users/administrator/Documents/franki/dynamic/qt-everywhere-opensource-src-5.3.2/.qmake.super
          Info: creating stash file /Users/administrator/Documents/franki/dynamic/qt-everywhere-opensource-src-5.3.2/.qmake.stash

          Qt is now configured for building. Just run 'make'.
          Once everything is built, you must run 'make install'.
          Qt will be installed into /Users/administrator/qt-5.3.2-ios-ipad-dyn2
          @

          But I only need to compile OpenSSL into QtNetwork module, why configure makes static build of Qt ?

          best regards
          Marek

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi,

            Because until iOS 8 you couldn't have dynamic frameworks in your iOS application bundle.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • F Offline
              F Offline
              FrankiPL
              wrote on last edited by
              #6

              Hi,

              So in other words all Qt applications for iOS (up to SDK 7.1) are statically linked, and I should stop worry about it? ;)

              Marek

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                It's more about App Store rules than SDK. But yes, you don't need to worry about the fact that the build is currently set to static. However, don't forget the licensing issue that come with it.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • F Offline
                  F Offline
                  FrankiPL
                  wrote on last edited by
                  #8

                  licensing issue is what worries me ;)
                  My app is for free, its a demo, but I don't want to publish source code. On the net I have read that if I provide objects files to re-link application it is then enough. Like in this thread "Your text to link here...":http://qt-project.org/forums/viewthread/33475

                  But actually many people says many things about it.

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    Since it's for iOS you could consider the new Indie License, or check about the status of the shared version of Qt for iOS 8 on the interest mailing list

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • F Offline
                      F Offline
                      FrankiPL
                      wrote on last edited by
                      #10

                      Thanks for pointing me to this Indie License. The price is affordable I will go for it.

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        You're welcome, happy coding !

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        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