Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Building a framework that supports iOS/macOS - recommendation?
Qt 6.11 is out! See what's new in the release blog

Building a framework that supports iOS/macOS - recommendation?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 452 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.
  • C Offline
    C Offline
    chopper
    wrote on last edited by
    #1

    I'm building a small SDK that is multi-platform (linux/windows/macOS/Android/iOS) - and as I begin planning the API interface, I'm wondering what are some of the best approaches to making the API consumable on platforms that are not comfortable with things like std::string as an argument type.

    For example, on iOS and macOS I'm building the SDK as a dynamic framework (thanks Qt for already handling this!) because I want it consumable from Swift.

    I don't have much experience with Swift, so I'm unsure how best to (presumably) wrap my C++ SDK public headers into something Swift appropriate.

    Basically along the lines of prepping:

    bool createSomeObject( const std::string& sSomeExampleStringData );

    Sorry if this is crazy noobilicious, but I'm just getting started on Swift and haven't done any non-Swift integrations yet.

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

      Hi and welcome to devnet,

      Do you mean something like described here ?

      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
      • C Offline
        C Offline
        chopper
        wrote on last edited by
        #3

        Well, that's basically just talking about the idea that Swift can use a C library, so just extern "C" your C++ code.

        It doesn't talk about marshaling, managing types, objects, lifecycles, et cetera.

        This is why I was asking about passing a string in and/or receiving a string back - and wondering what someone (surely someone here has done this) would recommend as an approach.

        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