In vs, we can easily execute some scripts before and after the build to do something for us. What should I do in ios? Which of the following operations must be performed on xcode. Then google searched for it, and said that Scheme was operated, and then directly operated on the target build phase. I tried these two methods, but only the latter succeeded. Here we mainly use the image format to demonstrate the operation steps.
1. Click project-> build phases-> add build phase
2. Which one do you want to choose? This can be added based on your own situation.
3. I added two projects, pre and post. Generally, after the add operation, they are all pending. It is actually a top-down build process. So we can add the custom phase to the desired location. Let's just drag pre to the top of the list before compilation. Remember to double-click the title to modify the name.