I am working on a super simple little app that I distribute as a ZIP archive. The archive contains the app itself, a readme, and a few scripts. I wanted to automate this process, so I added the scripts to my project and auto-copied them into the build folder with a copy files build phase.
Now, I needed to actually automate the archiving, so I edited the build scheme's post-build actions to include a Run Script action, which included the following:
cd $BUILT_PRODUCTS_DIR
rm -f Kachunk.zip
zip Kachunk Kachunk.app readme.txt chunk.sh dechunk.sh
Now, this works great, but there's a fatal flaw. The app itself is not added properly. For some reason, when Xcode runs the script, the .app file is not fully built yet, so I end up with an app bundle with no contents whatsoever.
Is there something I'm doing wrong? Is there a workaround to this?