Results 1 to 5 of 5

Thread: QT app sandboxing for Mac App Store?

  1. #1

    Default QT app sandboxing for Mac App Store?

    Hello,

    Mac App Store all apps must sandbox by November.

    What can we do to get our qt apps sandboxed?

    Thank you

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QT app sandboxing for Mac App Store?

    Read this for a long winded discussion culminating in some useful patches to get apps into the store.

  3. #3

    Default Re: QT app sandboxing for Mac App Store?

    Thank you, i read it, but i don't found "sandboxing".

    Earlier, the Mac App Store was suggested as a way Apple might expedite the adoption of new Lion technologies. In the case of sandboxing, that has already happened. Apple has decreed that all applications submitted to the Mac App Store must be sandboxed, starting in November.

    Data:
    http://developer.apple.com/library/m...andboxing.html

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QT app sandboxing for Mac App Store?

    The patches in the thread directly address existing (involuntary) Qt actions that violate the rules, i.e. "sandbox". If Apple are moving the walls on the walled garden again then perhaps Qt will need further patching (probably not). The vast majority of application behaviour that violates Apple's rules is programmer controlled. A Qt application is just like every other application and you will have to jump through the same (moving) hoops as everyone else. You'll need to sign your code, use certain directories, etc. This isn't Qt's problem

  5. #5
    Join Date
    Jan 2011
    Posts
    16
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QT app sandboxing for Mac App Store?

    Quote Originally Posted by ChrisW67 View Post
    The patches in the thread directly address existing (involuntary) Qt actions that violate the rules, i.e. "sandbox".
    No, that thread does not address any "sandbox" issues: "sandboxing" is an additional concept which exists besides the "Mac App Store Rules" (which will include the requirement that apps will need to be sandboxed as of November 2011, as the OP correctly noted). That thread was all about preventing Qt from violating other rules which had to do where an application is allowed to store config/data/cache files. That has nothing to do with sandboxing.

    Sandboxing is all about specifying entitlements to your application.

    Sandboxing is described in the link the OP gave. In fact, these steps describe "post-build" steps and apply to any application, regardless whether it is implemented in Qt or "natively" in Cocoa (or any other language/framework). It basically boils down to a) codesign your application and b) provide an entitlement property list file.

    Given that, I followed the steps described by Apple, giving my application the single entitlement "com.apple.security.documents.user-selected.read-write", that is, the application is only allowed to read/write from/to files explicitly chosen by the user.

    According to the Apple docs there exists a daemon "PowerBox" which is supposed to render the file dialogs in a separate process: "Any time an application running inside a sandbox invokes an NSOpenPanel or NSSavePanel dialog, rather than showing the panels directly, AppKit automatically asks the Powerbox to present the dialog. From a developer perspective, there are no code changes required in terms of how these panels are used; this process is fully transparent."

    However when I try to open a native QFileDialog (as a window sheet) my application crashes! Details can be found in my post to qt-interest, archived here: http://permalink.gmane.org/gmane.com....general/43484

    I am not sure yet whether I got the codesigning right, however the Process Monitor claims that my process runs indeed in a sandbox and the Qt and my own preference files are written into the proper ~/Library/Container/my.app.identifier

    Seems like sandboxing a Qt application - I tried both Qt 4.7.3 and latest Qt 4.8.0 Beta Cocoa - does not run smoothly "out of the box".

    Anyone succeeded in sandboxing a Qt application with the mentioned file read/write entitlement?

    Thanks,
    Oliver

Similar Threads

  1. Mac App Store
    By serkol in forum Installation and Deployment
    Replies: 20
    Last Post: 1st December 2011, 12:29
  2. Qt Apps banned from Mac App Store?
    By jfk in forum Qt Programming
    Replies: 130
    Last Post: 24th August 2011, 16:10
  3. store QlistWidget
    By jindoniit in forum Newbie
    Replies: 7
    Last Post: 15th July 2011, 09:52
  4. Query - how to store ?
    By damodharan in forum Qt Programming
    Replies: 2
    Last Post: 31st May 2010, 12:59
  5. Store the filename of QIcon
    By Nithya in forum Qt Programming
    Replies: 1
    Last Post: 28th August 2008, 16:54

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.