2

I am making an app on OS X 10.9 using Python 2.7. But when it is launched for the first time, warning comes:

You are opening the application MYAPP for the first time. Are you sure you want to open this application?

The application is in a folder named Applications. To see the application in the Finder without opening it, click Show Application.

So, how to avoid this warning. Does I need to make some changes in info.plist of the app? I had gone through this Q&A, but nothing is mentioned about app side changes.

I don't want user to use any sort of command to run or do changes manually. User can disable the warning for all apps:

com.apple.LaunchServices LSQuarantine -bool NO

or for a particular app:

xattr -rd com.apple.quarantine Application.app

I had also signed the app with developer ID.

So, how to disable this dialog box from popping?

  • Thanks for the recipe of disabling this warning for all or particular app! – Filipp W. Oct 17 '18 at 11:29
  • It didn't work for me on El Capitan (10.11.6), though =) – Filipp W. Oct 18 '18 at 6:58
2

The short answer is no, you cannot. This warning is a security feature of OS X (to limit damage from things like drive-by downloads), and if there were a way for you to avoid it, there'd be a way for the bad guys to avoid it, and that would be very bad.

The long answer is that you might be able to avoid it, because the warning only occurs for some methods of software distribution. Generally, the warning applies to any software that is in "quarantine" because it came from an untrusted source. So, if you can distribute your application via trusted paths, you won't get the warning.

  • Distribute it via Apple's App Store. Apple checks all submissions to the App Store for malicious content before publishing them, so this is considered a trusted source and quarantine is not applied.
  • Distribute it via file sharing. Files downloaded from the web (or sent in email) are quarantined, but files transferred from a file server with a protocol like AFP or SMB are not. This won't work particularly well over the internet, but if you're distributing within an office or something similar, this method works fine.
  • Distribute it in the form of a signed installer package (.pkg file). The gatekeeper policy gets applied to quarantined packages, but if it's signed with a proper developer ID, the default policy will let the package open without a warning. The user still has to step through the installation process, though.

Note that with any of these methods, signing the app itself it not strictly necessary. But it's still a good idea, and you should still do it.

  • I signed myapp.app through developer ID certificate. Then build and signed myapp.pkg through developer ID installer certificate. Then made myapp.dmg(not signed it as not required i think). But this warning is coming. – sherlock Oct 18 '14 at 19:00
  • @sherlock: Is the warning coming when you open the app that the package installed? If so, check whether the app you built the package with was quarantined (check with ls -l@d /path/to/application.app on your build computer); if so, it'll be installed with the quarantine attribute still in place. – Gordon Davisson Oct 18 '14 at 22:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.