Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt 5.6.0 app fails to launch with OSX 10.11 App Sandbox enabled - can't find cocoa plugin

Qt 5.6.0 app fails to launch with OSX 10.11 App Sandbox enabled - can't find cocoa plugin

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
qt 5.6.0os x
3 Posts 3 Posters 2.1k Views
  • 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.
  • P Offline
    P Offline
    pavel_abr
    wrote on 31 Mar 2016, 20:45 last edited by
    #1

    Hello all,

    I'm trying to deploy my QT OSX app to the Apple Store. However, one of the preconditions seems to involve enabling the App Sandbox in the Capabilities section of XCode (I'm using v 7.0 beta 6). After enabling this option, my app will compile but refuse to run, with the following error: This application failed to start because it could not find or load the Qt platform plugin "cocoa" in "".

    I've tried to run the app from xcode, and after building a deploy version with /usr/local/Cellar/qt5/5.6.0/bin/macdeployqt My.app, but both throw the same error.

    Additionally, /usr/local/Cellar/qt5/5.6.0/plugins/platforms/libqcocoa.dylib does exist and gets included in the .app bundle when macqtdeploy is run.

    Any help is appreciated!

    M 1 Reply Last reply 6 Jun 2019, 08:13
    1
    • X Offline
      X Offline
      xxxx110
      wrote on 15 Apr 2016, 23:13 last edited by
      #2

      I have to add the lines below before instantiating QApplication in my main.cpp. Check what you get when you uncomment the printf.

      QDir dir(argv[0]);
      dir.cdUp();
      dir.cdUp();
      dir.cd("PlugIns");
      QApplication::setLibraryPaths(QStringList(dir.absolutePath()));
      //printf("libraryPaths=%s\n", QCoreApplication::libraryPaths().join(",").toUtf8().data());
      
      QApplication a(argc, argv);
      
      1 Reply Last reply
      0
      • P pavel_abr
        31 Mar 2016, 20:45

        Hello all,

        I'm trying to deploy my QT OSX app to the Apple Store. However, one of the preconditions seems to involve enabling the App Sandbox in the Capabilities section of XCode (I'm using v 7.0 beta 6). After enabling this option, my app will compile but refuse to run, with the following error: This application failed to start because it could not find or load the Qt platform plugin "cocoa" in "".

        I've tried to run the app from xcode, and after building a deploy version with /usr/local/Cellar/qt5/5.6.0/bin/macdeployqt My.app, but both throw the same error.

        Additionally, /usr/local/Cellar/qt5/5.6.0/plugins/platforms/libqcocoa.dylib does exist and gets included in the .app bundle when macqtdeploy is run.

        Any help is appreciated!

        M Offline
        M Offline
        Murali1304
        wrote on 6 Jun 2019, 08:13 last edited by
        #3

        @pavel_abr Did you solve this? Please let me know the solution.

        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