Chupamobile Blog

The App Source Code Marketplace. Buy Apps. Sell Apps.

03Nov

We are undoubtedly living in the mobile era. Nowadays, mobile engagement has already overcame desktop computing. Each day, more and more developers are getting into mobile development as it represents a future proof field for them. And they are completely true. Actually, 2 billion smartphone users are expected by 2015 and 83% of the internet usage will come from mobile devices. I think that says it all.

6 golden rules for ios developers

Without further ado, let’s take a look at 6 golden rules every iOS developer should have in mind when developing an application.

1.Performance improvements

Obviously! Always try to find the most optimized algorithms and solutions for your app. Things such as long processing times, can really hurt your user’s overall feedback. That also counts up to your user experience downsides. Some basic performance boosting solutions would be: table view image caching, which would make scrolling through lists (especially long ones) a way smoother and enjoyable experience, asynchronous data fetching (if you are not using it already, this should be the first thing to check out after reading this article) and local data storing (Core Data, SQLite, Realm.io, etc.). One less known trick is to disable all NSLog’s in the production version of your app. As you might have noticed when debugging, console logs can really slow down your app. Those logs are still there when the app is in release version (App Store, AdHoc versions), but they have no use at that point. Here is a great solution for keeping those only when you’re running the application in its debug version. Other useful improving tips could be found here.

2.Write clean and reusable code

At some point, you will most likely have to return to your old code, which could be days, months or even years old. But it might not always be only you, who is using that code. There may be other developers working on it as well. Writing clean and reusable code is a requirement when working in teams, but not only. Use comments to explain what each section of your code is supposed to do. Make correct use of indentation and brackets.

how to write good code

source:9gag

3.Use a source code management system

This will help you keep track of versions, changes and will allow you to easily revert to a fully working state of your app. Git is a must, especially when dealing with long-term projects, and again, when working in a team. I highly recommend GitHub for its compact and simple interface, but if you’re not willing to upgrade your account in order to be able to host private repositories, alternatives like BitBucket, are always a good solution.

4.Test, test and test

Testing your app is something everyone does. But most of them are not doing this correctly. In order to ship a reputable application to your possible users, you have to think of every possible scenario and polish all the edge cases an user could get your app into. Let’s say for example that your user declines camera access to your app. I’ve seen endless examples where this ends up as a useless app. One good practice is to double ask the user for permission. First, create your own alert view, asking them to give your app access to specific device features. If they are accepting this prompt, then show the real permission alert. In 99% of the cases, if a user accepts the first permission prompt it will accept the second one as well. If the user declines your own alert, then store their decision using NSUserDefaults and ask them later. That way you won’t get a definitive ‘NO’ to permissions access. Sure, there are many other patterns for this situation. Read more about the correct way of asking for permissions on iOS here.

5.Know your tools

It’s extremely important to get familiar with your IDE. In this case, Xcode (most likely). Xcode is one of the most complete IDEs out there. It has all the required tools for creating and shipping high quality iOS & Mac OS applications. I highly recommend learning it’s keyboard shortcuts as it will increase your productivity by a lot and help you get things going much faster. It also comes with useful tools such as Instruments, Time Profiling, etc. After you will master Xcode, you will definitely see a huge improvement in your apps quality and also save you a lot of time.

6.Ask for help when in need

In case you’re a freelancer, Google is your best friend. It’s completely normal to get stuck at some point. Sites such as StackOverflow are life-savers in those cases. But, before asking for help, make sure you have checked all the available resources and none of them worked for you. That keeps the ecosystem going and avoids useless spam. Don’t forget to check Apple’s documentation when you’re dealing with basic APIs problems. They provide amazingly well explained information, as well as very helpful project examples that demonstrate how each API works. If you’re working in a team, a startup or a company, do not ever be ashamed of asking your working colleagues for help, because as it’s been said many times, it’s enough to just give your code to a more relaxed developer (not especially a better one) and they will most likely figure out what’s wrong within seconds.

We hope you enjoyed reading this post from our iOS developer Sebastian Dobrincu, author of the Flatic app and many more, whom you had the pleasure to meet in our previous post: 5 Steps To A Successful UX And UI In Mobile. If you found it helpful let us know with a like, comment or share! 🙂

 

  • Kevin De Bruyne

    I’d add asyncrhonous UI rendering to performance improvements. Btw, awesome article!

    • Sure, Facebook’s AsyncDisplayKit would be a great foundation for that. I’m glad you liked it!

  • Quality analysis is more important part and also the code should be easy and clean. Great advice to iOS Developers.

  • mehran

    In my opinion, improve performance, is very important in the iOS.فروش اقساطی خودرو