Qt application for mac not being launched

Joined
Apr 11, 2019
Messages
3
Reaction score
0
Points
1
I am working on an application written in Qt for macOS environment. In order to generate release build i have set up external server.

I am seeing this:

After generating build, if I download and install the application on Applications folder, when opening it, first I see the popup asking if I am sure to open app downloaded from Internet(Gatekeeper), so I click Open and then app dies.

App works fine if I open it from CommandLine in Terminal.

Checking the attributes of app file I can see that it has com.apple.quarantine. If remove it manually, using xattr -dr com.apple.quarantine application opens without any problem

Any ideas about why it is not launched ?? Thanks is advance
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,745
Reaction score
2,071
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Once the apps launches with the warning and dies, can you go to System Preferences->Security & Privacy and see an option to "Open Anyway" the app? Also you should check to see what setting you have for Allow Apps Downloaded from.

Apple has been pushing people to use App Store and identified developers, but some apps require you to say Anywhere since some app developers don't have to be identified (usually means paying Apple some money).

Depending on how you intend to eventually distribute your app, you should figure out how you want to "sign" it now so that people with the more restrictive options can actually use your app.
 
OP
R
Joined
Apr 11, 2019
Messages
3
Reaction score
0
Points
1
Application is signed. I have verified using codesign and spctl tools that signature is correct.
Also I tried to disable Gatekeeper using this command spctl --master-disable but still when I run the application for first time I see the popup and after clicking on Open application dies.
Remark: Application only dies first time I try to open it, only when I see the popup. Then it opens without any problem
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,745
Reaction score
2,071
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
I can't help you why the app fails to launch the first time and works the second time. Perhaps you can look at the Console for any logs that might help. While disabling Gatekeeper to debug the issue is OK, you should ensure that your app works with those restrictions in place. I, for one, definitely run with that enabled and pretty restrictive settings for security.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top