paint-brush
5 key learnings after 8 years of iOS developmentby@antonholmquist
12,317 reads
12,317 reads

5 key learnings after 8 years of iOS development

by Anton HolmquistApril 18th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

I’ve been coding for <a href="https://hackernoon.com/tagged/ios" target="_blank">iOS</a> since 2009 and have been involved in the <a href="https://hackernoon.com/tagged/development" target="_blank">development</a> of countless apps. These are some of my key learnings for efficient, maintainable and fun app development.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - 5 key learnings after 8 years of iOS development
Anton Holmquist HackerNoon profile picture

I’ve been coding for iOS since 2009 and have been involved in the development of countless apps. These are some of my key learnings for efficient, maintainable and fun app development.

1. Stay native

You can’t really go wrong with native. Every cross-platform technology will add another level of complexity and potential bugs to your project. Also, the reported actual time savings vary. I have yet to hear of a larger project where they are regretting they went with native, but I have heard of projects regretting they went cross-plattform. I just wouldn’t risk it.

2. Avoid external libraries

There’s really no need for external libraries today. Pretty much everything can be solved just as well using the native frameworks. Networking is a good example — you really don’t need some fancy library to do that. Just build your own wrapper based on iOS networking and according to the needs of your project. Simple and flexible! This goes for almost all needs you would have. Of course there are some valid cases where you really can’t avoid adding an external library. If you want Google Maps or Intercom in your app for instance, then it’s fine.

3. Don’t use a package manager

Since you shouldn’t use that many external libs you don’t really need a package manager to manage them. Just add them to the project. Using a dedicated tool for this will not save you any time.

4. Layout in code instead of Storyboards

Storyboards may help a beginner to get started quickly, but as soon as you need to do some reasonably dynamic layout you need to code that logic anyway - so why not do it from the start. I’ve seen many projects with huge Storyboards that are pretty much just empty view controllers without content. Not to mention auto layout - all that complexity for something that is easy to write. I would actually recommend putting all your layout logic in code, without Storyboards or auto layout. Simple and extremely flexible! Edit: I wrote a separate article on how I do this.

5. Use Core Data

Core Data is rarely embraced by people new to iOS development. It’s complex, requires a lot of boilerplate to get started and doesn’t look very appealing at first. I tried to dive into it few times during my first years and failed. Then I read this great article, and decided to give it more time. Eventually everything came into place. Core Data is really the way to work with data on iOS. It is powerful and able to help you with some really difficult problems like persistence and data change propagation needed in pretty much every app. You should use it.

Following this advice will give you a maintainable project that can survive through the years and iOS versions. Keep it simple!