Instead clone a project through XX-Boilerplate, I think you might be interested in what we want and why we want to setup a iOS project.
After you create a plain new project, the first thing you want to do is, do the initial commit and add all the changes into repo?
No. What you should really do is, find one
.gitignore template which may fit your need, or you should draft one by yourself. This step is **very important and helpful, super easy to do, but at the same time, super easy to be skipped till one day you found that a lot of user datas, break points, dependency built file are leak into the project. Don’t tell me that you will manually pick the changes every time, you may also be careless too (you can also be loss between thousand of stash and pop 💥).
Secondly, before you do anything, there are one more step, can easily be omitted, but will save you tons of time if you have prepared it in the very beginning: Setup at least one more target. It will always be helpful that you have more than one target for your application. For you, your collie, or even your boss (or so called the business guys/girls). You don’t have to switch between environments, you easily execute them on the same time, business guy can always identify the thing visually (What else you can expect? 😏). Start earlier with conditioning environment control, fewer miss config if you come later.
Then, choose one
dependencies management tool you want to use. Sure, you can manage it manually, but unless you have some very specific needs, I think you my better pick one tool to help. I think you may already be familiar with the two most popular management tools:
Carthage. They both have pros and cons, my personal choice would more be Carthage, but it’s really up to you and your projects nature to pick one.
Before you start messing things up with you dirty hand, I think it will be the most proper time to setup a linter.
XXLint for other future languages. The only rule is, lint! Don’t be naive that thing can’t go wrong by you. I know you are awesome, smart, your integrity to programming cannot be challenge, but the truth is, you can be tired, you can be careless too. Relax, just let stupid machine to do those stupid checking for you.
After that, you may also want to setup
fastlane for your project. Even your are not doing some fancy CI/CD pipeline, which I would also recommend you to, it saves your time on boring things like upload binary and release a test, announce the world a new build is ready, check what version to build next, commit that changes back into repo blablabla.
fastlane is super easy to setup, especially in the beginning stage so you can be confidence that, if anything goes wrong, it must be your config 😎. I would highly recommend you to config at least the whole process from build and to release on TestFlight. If your designer is some geek, or you are just happen the designer, please also take a look at snap shot and try to manage your
ituneconnect media through it too.
Also, it will be good to setup a CI service with Jenkins, and it only take you servo minutes to setup and most properly a $5 cloud server as a remote master. You pick a cloud service provider, cheaper price, better connectivity, ssd, choose Ubuntu(Much more easy to get support if you need), install Jenkins, initial config, add a node cluster by download the JWA, go to the actual build machine running OSX, open that file, done. Then you can config a basic build project by adding one. Minimum config, pick a build strategy which fit your branching model, the build part since we’ve already setup fast lane, therefore, it’s not much ground for you to play there. Yup, Jenkins dose have a lot of plugin and integration, but they are way too fancy for us now, the only plugin you need is the git service provider one(also maybe the task management tool).
Now you are ready to start to enjoy your fancy new project. The next step is to setup a coding foundation for the project, it will be cover in my next article soon.
Hope this article can help, thanks for watching.