Package all in one installation on Mac


With MacOS, we have, and Share file(s) online with IQBoxShare.workflow (we will zip this file) and we want to create only one installation package what will let two app files to Application folder and workflow file to ~/Library/Services (/Users/[user name]/Library/Services)

Tools: packageMaker (auxiliary tool for Xcode)

Getting Started

Step1: Drag and Drop 3 files to PackageMaker.



Step 2: configure destination and Uncheck “Allow relocation”.

-With and, we set /Applications

With Share file(s) online with, we set to /tmp

(PackageMaker cannot know the current user home folder (Ex: /User/Tung/Library/Services) and Mac 10.8 doesn’t have services folder. We must set this file to a temporary folder and then we run a shell script to do all things for it.)




Uncheck “Allow relocation” with both and When “allow relocation” is checked, it means that the installer will search for an existing copy of the application and replace it there rather than the default install location. It’s probably finding the app in its build folder and replacing it there.



Step 3: Select our Shell Script for postflight (This script is launched after the files in the package have been installed. See (preinstall / preupgrade) to see which one is launched)

The content of shell script or can download here:


echo "Start postflight script"

cd ~/Library
if [ -d "Services" ]; then
    echo "That directory exists"
    echo "That directory doesn't exists. Create it"
    mkdir "Services"

mv "/tmp/Share file(s) online with" ~/Library/Services/
cd ~/Library/Services/
unzip "Share file(s) online with"
rm "Share file(s) online with"
rm -rf __MACOSX
echo "End postflight script"
exit 0


Then set a name for the output



Click “Build” and we will have a package file.


Các bài viết khác
Cùng lan toả
- Công việc chuyên môn là lập trình. - Thời gian làm việc đa số dùng internet cho nên cũng mong muốn chia sẻ những kiến thức và nhận định của mình cho mọi người về thế giới internet đầy rẫy tham sân si này. - Đã có vợ con. - Mọi liên hệ các bạn vui lòng email [email protected] hoặc [email protected]
Posts created 79

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top