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. How to create Apple framework for iOS?
Forum Updated to NodeBB v4.3 + New Features

How to create Apple framework for iOS?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 4 Posters 2.3k Views 2 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.
  • AlexeyPuzankovA Offline
    AlexeyPuzankovA Offline
    AlexeyPuzankov
    wrote on last edited by
    #1

    Is it possible create iOS Apple Framework?

    Here documentation how to create Apple framework: http://doc.qt.io/qt-5/qmake-platform-notes.html#creating-frameworks

    But option:

    CONFIG += lib_bundle
    

    available only for Mac OS X (http://doc.qt.io/qt-5/qmake-variable-reference.html#config)

    XCode allows to create frameworks for all platforms (macOS, iOS, watchOS...).

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

      Hi and welcome to devnet,

      That's likely because until recently, Apple was forbidding the use of Frameworks in iOS applications i.e. only static builds (not counting the system Frameworks).

      As for now, you should bring this point to the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more user oriented.

      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
      1
      • shavS Offline
        shavS Offline
        shav
        wrote on last edited by shav
        #3

        Hi!

        As I know for now Qt doesn't have any simple way for create framework for iOS platform. But you can do it yourself. I post a link to article where you can read about how you can create framework from static library in Xcode. If you want you can use bash script from article in your project. The link to article here.

        Also I done a simple script for you (this script works but you need do a few steps to start work with it):

        1. Create a folder where you will run script.

        2. Copy to this folder my script and two version of static libraries: one for device and second for simulator.

        3. Create headers folder and copy to it all your public headers file for your framework.

        4. Open terminal and move to folder which you created in step 1.

        5. Run script with parameters:

          ./generate_framework.sh -framework_path <path_to_framework> -headers <full_path_to_public_headers> -project_name <name_of_framework> -device_lib <path_to_device_static_library> -sim_lib <path_to_simulator_library>

        Why you need two versions of library? Because you need to support both device and simulator. You can use only one lib file but in this case you will build project on ios only for one device or simulator. So I recomend to build both version of library and then use it with my script.

        Hope this will help!

        Mac OS and iOS Developer

        1 Reply Last reply
        1
        • S Offline
          S Offline
          Stefankm
          wrote on last edited by
          #4

          Hi Andrew,
          I know this post is quite old, but I am currently struggeling with turning a lib into a framework with qmake. Would you perhaps mind resharing your build script. The old link is dead, but perhpas I can learn from your script what I am doing wrong.
          Many thanks for your help!

          shavS 1 Reply Last reply
          1
          • S Stefankm

            Hi Andrew,
            I know this post is quite old, but I am currently struggeling with turning a lib into a framework with qmake. Would you perhaps mind resharing your build script. The old link is dead, but perhpas I can learn from your script what I am doing wrong.
            Many thanks for your help!

            shavS Offline
            shavS Offline
            shav
            wrote on last edited by
            #5

            Hi @Stefankm,

            Sorry, I'm updated the link to archive with script for create framework. Please, use this link.

            Mac OS and iOS Developer

            S 1 Reply Last reply
            1
            • shavS shav

              Hi @Stefankm,

              Sorry, I'm updated the link to archive with script for create framework. Please, use this link.

              S Offline
              S Offline
              Stefankm
              wrote on last edited by
              #6

              @shav Thanks a lot for your kind help!

              1 Reply Last reply
              1

              • Login

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