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. Someone want to see wiki page with useful code for iOS platform?
Forum Updated to NodeBB v4.3 + New Features

Someone want to see wiki page with useful code for iOS platform?

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

    Hi everyone!

    I have a small class for work with iOS device (get a information about device and application). For example to detect device type (iPad or iPhone) you could user this code (in *.mm file):

    bool flag = false;
    if([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone)
    {
        return true;
    }
    
    return flag;
    

    In you *.pro file you need add:

    CONFIG += objective_c
    

    I have a few useful methods for work with iOS device. And if someone needs this I can create wiki page.

    P.S. Sorry if I created a post in incorrect forum.

    Mac OS and iOS Developer

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

      Hi,

      Sure, go on. Just take the time to check if there's not already a page with on or the other snippet you would like to provide (e.g. how to start a phone call already exists).

      Note that you don't need CONFIG += objective_c but use OBJECTIVE_SOURCES += your_code.mm

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

        Ok, I'll start to work on wiki page I think it's will be two pages: the first one for hardware info and the second one for application info.

        P.S. How I can create 'code' tag with formatted style for c++ or objective-c? In documentation I can't find any information about this.

        Mac OS and iOS Developer

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mcosta
          wrote on last edited by
          #4

          Hi,

          the wiki.qt.io has by default C++/Qt syntax enabled (it works well also for Objective-C).

          Once your problem is solved don't forget to:

          • Mark the thread as SOLVED using the Topic Tool menu
          • Vote up the answer(s) that helped you to solve the issue

          You can embed images using (http://imgur.com/) or (http://postimage.org/)

          1 Reply Last reply
          0
          • M Offline
            M Offline
            marco_piccolino
            Qt Champions 2017
            wrote on last edited by
            #5

            Hi,

            me and other mobile application developers are aiming to revamp the Mobile wiki portal so that it becomes a good starting point for those willing to develop on current mobile platforms.

            @shav if you want to contribute with more useful pieces of information, there is currently a trello board to plan out the portal's structure. Just post your Trello handle here and I will add you.

            https://trello.com/b/kCCQ7B9V/qtwiki-mobile-portal

            1 Reply Last reply
            0
            • shavS Offline
              shavS Offline
              shav
              wrote on last edited by
              #6

              Hi everyone!

              I created two wiki pages Qt Device Info and Qt Application Info.

              @marco_piccolino said:

              @shav if you want to contribute with more useful pieces of information, there is currently a trello board to plan out the portal's structure. Just post your Trello handle here and I will add you.

              https://trello.com/b/kCCQ7B9V/qtwiki-mobile-portal

              Thanks! You can add me with this handle @andrewshapovalov

              Mac OS and iOS Developer

              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