Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

MacOS getOpenFileName Dialog not showing on AppStore app



  • Hi,
    on my Mac OS app on the Mac AppStore the
    getOpenFilename dialog does not pop up a dialog to select a file.
    Running the same binary on my devel mac it works fine.
    In the Mac OS console i see:

    *** Assertion failure in -[NSVBOpenPanel viewWillInvalidate:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1561.60.100/Nav.subproj/OpenAndSavePanelRemote/NSVBOpenAndSavePanels.m:387
    
    
    default	20:00:34.712280 +0200	logbook	-[NSVBSavePanel init] caught non-fatal NSInternalInconsistencyException 'bridge absent' with backtrace (
    	0   CoreFoundation                      0x00007fff47fef2db __exceptionPreprocess + 171
    	1   libobjc.A.dylib                     0x00007fff6f190c76 objc_exception_throw + 48
    	2   CoreFoundation                      0x00007fff47ff5072 +[NSException raise:format:arguments:] + 98
    	3   Foundation                          0x00007fff4a11e340 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 193
    	4   AppKit                              0x00007fff45776102 -[NSVBSavePanel viewWillInvalidate:] + 188
    	5   ViewBridge                          0x00007fff6ca336f2 -[NSRemoteView invalidate:] + 292
    	6   ViewBridge                          0x00007fff6ca40e88 -[NSRemoteView _advanceToConfigPhaseLegacy] + 1111
    	7   ViewBridge                          0x00007fff6ca41d1b -[NSRemoteView _viewServiceMarshalProxy:withDetailedErrorHandler:] + 230
    	8   ViewBridge                          0x00
    
    

    Any ideas whats going on here?
    I use macdeployt to create my package for app store.

    Greetings
    Nando


  • Lifetime Qt Champion

    Hi,

    Did you activate the entitlements to allow your application to access the filesystem from the sandbox ?



  • @SGaist Hi,
    which entitlements do i need to allow filesystem access from the sandbox?

    in my info.plist i have

            <key>com.apple.security.app-sandbox</key>
            <true/>
            <key>com.apple.security.network.client</key>
            <true/>
            <key>com.apple.security.print</key>
            <true/>
            <key>com.apple.security.files.user-selected.read-write</key>
            <true/>
            <key>com.apple.security.files.bookmarks.app-scope</key>
            <true/>
            <key>ITSAppUsesNonExemptEncryption</key><false/>
    

    I added:
    com.apple.security.files.user-selected.read-write
    com.apple.security.files.bookmarks.app-scope

    but this didn't solve the problem. The new version is in the app store but the same problem...



  • @Nando Hi,

            <key>com.apple.security.print</key>
            <true/>
            <key>com.apple.security.files.user-selected.read-write</key>
            <true/>
    

    was fine. It must be also in entitlements file which is used to sign the pkg file.
    Thank you


Log in to reply