โ ๏ธ Custom Warnings & Errors for Xcode
How many times do we submit a build to production and forgot to change something?? For me is more than I want ๐คฏ
For this reason, I had to find a way to prevent this, and this is my solution, Iโm sure there are lots of people like me (hope so ๐)
Letโs say that we have this swift file with some configurations for API calls.
What I need is this simple thing, every time I build the app Xcode should give me a warning if Iโm not using the production environment, and when releasing for production should give me an error, thatโs it ๐ช
The way I achieved this was by creating a New Run Script Phase in Build Phases with some shell script.
Thatโs all we need ๐ฅ๐ฅ๐ฅ
So now every time you build your project you will see a warning if production itโs not used.
And when you archive you will see this ๐