In Xcode, you can control the build process on the Build Phases tab when you select the target application. These tasks are performed each time you build your application, unless otherwise indicated at some stages (for example: you can select a phase only when the application is installed for the first time).
Click the + button, and you can add the “Copy files” phase, which will copy the selected files to the application. When adding files, you can choose whether the added folders will create groups or links to folders.
You can also add a custom “Run script phase” and write bash code to do whatever you want, or even run an external script that will do more complex work.
Artal source share