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



  • 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.


  • Lifetime Qt Champion

    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



  • 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.



  • Hi,

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



  • 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



  • 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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.