Search code examples
macoscode-signingdmg

Why My DMG is not getting opened without asking security popup


I created a DMG .this has 640 and apache permissions. once i uploaded it to internet some extended attributes are getting added to it. Because of that when customer downloads it they are getting a pop up

"There may be a problem with this disk image. Are you sure you want to open it?

Opening this disk image may make your computer less secure or cause other problems."

I don't want quarantine attribute to be added to it.so what should i do to my dmg before uploading it to internet such that quarantine attribute will not be set.And also why this pop is not coming for other dmg's downloaded from net. I downloaded google chrome.dmg, for that quarantine attribute is not set.can any one help me out with better solution


Solution

  • Did you sign the entire DMG as well as the .app file? I believe this is a new requirement if you have additional files in the DMG besides the signed .app.

    (Copied from my answer at Mac DMG oddity - signing and "damaged" applications)

    In addition to signing the .app bundle:

    codesign -f -s "Developer ID Application: Your Dev ID Here" -v "Your App.app"

    you should also sign the created DMG as well:

    codesign -f -s "Developer ID Application: Your Dev ID Here" -v YourProgram.dmg

    I didn't put quotation marks around the dmg file path because it's less likely that you have spaces in the dmg name. If you do, don't forget to escape them on the command line, or wrap your file path in quotes.