This boilerplate is a result of extensive experimentation and regression over months to create a great underlying codebase for any professional iOS project. It provides the structure and foundation to build better, more organized iOS apps, and get off the ground running. It does that by providing:
This boilerplate is targeted at beginning and intermediate iOS developers, who have not yet formalized their ideal app structure - but experts can benefit from it as well.
The boilerplate enforces and shows examples of the recommended coding standards for iOS development. Read more about the standards followed over on GitHub.
Getting started is simple:
The Project is organized into various folders serving different purposes:
There are three targets for the project:
Build Schemes and Run Info
There are three build schemes:
To run the main target, Command+R. Ofcourse you know it. To run the unit tests, Command+U. To run the Integration tests, select the appropriate build scheme and Command+R. Sit back and watch it run by itself.
Boilerplate uses CocoaLumberjack logging framework; the most flexible one out there. It allows you to do fine grained logging, file logging, custom log formats and much more. Boilierplate has already customized CocoaLumberjack to the needs of your project. Refer to the following link to implement it further to your needs: https://github.com/robbiehanson/CocoaLumberjack/wiki/GettingStarted
Yes, you are about to call this silly. But this will save you a lot of time while debugging and reading your logs on your console. It colorizes the logs depending on the level of logging. Boilerplate already takes care of Xcode colors. However, you need to install the plugin for you Xcode. You can find it here: https://github.com/robbiehanson/XcodeColors The download link for xcode colors: https://github.com/robbiehanson/XcodeColors/downloads
With the boilerplate, you can start connecting with your api endpoints with few lines of code. It uses AFNetworking. https://github.com/AFNetworking/AFNetworking
The APIClient (subclass of AFHttpClient) is a singleton instance that can serve as the wrapper for your api needs. The Boilerplate also provides a build scheme based api environment switcher which will make automatically change the environment to qa or prod when you change the scheme for debugging or distribution. Make sure you give appropriate values in the Constants.h file for the corresponding API endpoints.
Following are some of the custom controls/libraries that you could use (available as pods)
You can add these by adding the appropriate podspec to the podfile in the project directory and the version info. Run the pod install and you will see the libraries included. Make sure you update the custom configurations when you update the pods or add more pods. They are in resources folder.
The boilerplate also includes an Objective C Coding Conventions document that will help you with the latest and greatest programming practices. Make sure you read through that your codebase will be reveled like a gem!
Also, don’t forget to make code snippets of favorite thinks like commenting formats, pragma formats, class extensions and pretty function log statements. These will tremendously improve your speed of coding, making your code look even more beautiful and readable.
Credits: Boilerplate is a template for iOS development. All Frameworks and Libraries used/implemented/demonstrated are properties of corresponding authors and have been linked to.
Please see above