37

I am a developer of iOS, and developed a mac app. Now I want to distribute my app so that a searched for it and found that we need to upload .app to Mac App Store it looks fine. While for self distribution we can have three options:

  1. is to share our app
  2. is to create .dmg file
  3. is to share .pkg file (Package Maker).

In pkg file my client want to install app without introduction, read me as well as license agreement, I removed the license and readme but unable to remove introduction section. Please help me out from here…

Thanks in advance

Andriy
  • 2,767
  • 2
  • 21
  • 29
Anupam Gupta
  • 623
  • 1
  • 7
  • 18
  • A zip archive of the app is common procedure these days. Disk archives add hurdles to medium skilled users as they have to mount it and copy the app. Don't use an installer (pkg) unless you've got a very good reason to - any license agreement can be shown when starting the app in any distribution form – ATV May 18 '16 at 07:53
  • So by extracting zip file , is it searchable through the spotlight search.? – Anupam Gupta May 18 '16 at 08:23

4 Answers4

46

If you dont need any introduction, readme etc, the best option is to create a DMG.

You don't need any external tools for this.

  • Copy your app to a new folder.
  • Open Disk Utility -> File -> New Image -> Image From Folder.
  • Select the folder where you have placed the App. Give a name for the DMG and save. This creates a distributable image for you.

If needed you can add a link to applications to DMG. It helps user in installing by drag and drop.

Seema Kadavan
  • 2,538
  • 1
  • 16
  • 31
  • 1
    Can you please let me know the process of adding licence agreement to DMG file and also the process of adding a link to applications to DMG file? – Kamal Oct 09 '20 at 11:07
  • I didn't find this worked as the disk utility would not allow the selection of .app(s). Any folder with .app extension remains greyed out and un-selectable! You guys must have special macs!!! – WallyZ Jul 03 '22 at 01:57
  • @WallyZ you have to add the .app file into a folder and then open disk utility -> File -> New Image -> Image From Folder. – Akshay Nov 03 '22 at 14:03
  • @Akshay That's my problem. Xcode generates a folder containing the app and that folder already has a ".app" extension. So I can find the .app folder but I don't know what this .app file is! – Walter ZAMBOTTI Nov 07 '22 at 23:43
  • @WalterZAMBOTTI this is not related to xCode. This method is used to create a dmg from an existing installed application that exists in your applications folder. Even then, you have to create a new folder, drag the app into the new folder and then use that folder to create a dmg. you can't crate dmg directly from a .app file – Akshay Nov 17 '22 at 03:38
31

How to create a dmg file for a .app for mac.?

It's a subjective issue, but .dmg's are a good and popular way to distribute the apps - user double-clicks, drags app, ejects just as they would a USB stick, done.

You can get apps to help you build them, but its not too Hard with Disk Utility, you just need to mess around a little to make it look nice. Here is one way to do it:

  1. Use Disk Utility to create a new empty sparse bundle disk image
  2. Double-click the image to open it.
  3. Copy your app into the image.
  4. Make a link to /Applications in the image.
  5. Hide the toolbar/sidebar/etc. as desired.
  6. Using View Options set to always one in icon mode.
  7. Also add a background image if you like using View Options. Background images often contain text such as "Drag App to Application". Layout the app and /Applications icons to match your background image.
  8. In another Finder window eject the sparse bundle.
  9. In Disk Utility use Images -> Convert... to convert the sparse bundle to a read-only DMG

HTH

Aman
  • 696
  • 1
  • 8
  • 26
CRD
  • 52,522
  • 5
  • 70
  • 86
  • When I follow your instructions, several hidden files are shown (.DS_Store, .fseventsd, and .Trashes). This is despite the fact that I have not set Finder to show hidden files (i.e., it's set to 'defaults write com.apple.finder AppleShowAllFiles NO'). Is there a way to hide those files in the sparsebundle, and ultimately in the DMG? – pfurbacher Jun 18 '16 at 10:22
  • @pfurbacher - The outlined process should not cause those hidden files to be shown, and I cannot reproduce your problem. Those files are there of course and in the Terminal display when using `ls -la`. You will need to investigate further, something in your setup must be causing it. – CRD Jun 27 '16 at 21:59
1

I strongly recommend DMG Canvas . For a very modest price, it allows you to create a professional looking dmg, with a license agreement and every other common feature.

I'm not affiliated in any way with the software, just a long time user.

dfl
  • 1,089
  • 8
  • 8
1

I scripted my dmg creation, with create-dmg.

brew install create-dmg

My command is similar to the example:

create-dmg \
  --volname "Application Installer" \
  --volicon "application_icon.icns" \
  --background "installer_background.png" \
  --window-pos 200 120 \
  --window-size 800 400 \
  --icon-size 100 \
  --icon "Application.app" 200 190 \
  --hide-extension "Application.app" \
  --app-drop-link 600 185 \
  "Application-Installer.dmg" \
  "source_folder/"
pmarquis
  • 31
  • 1
  • 2