Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pitfalls of developing for iPhone

Tags:

iphone

Are there any guidelines on pitfalls to avoid while developing iPhone applications?

like image 540
Prabhu R Avatar asked Aug 01 '09 12:08

Prabhu R


People also ask

Why is iOS development difficult?

The biggest difficulty while developing an iOS application is that the Integrated Development Environment utilized for developing them is only compatible with Mac. A developer has to have a Mac device to develop an iOS application.

Is it better to develop for iOS or Android?

For both new and experienced programmers, iOS is generally easier to develop for. iOS apps generally require less development time and are cheaper to build and maintain than Android apps. iOS developers use Swift, Apple's native programming language, whereas Android developers typically use Java and/or Kotlin.


4 Answers

Sure, thousands. The same is true for any software development. Unfortunately, the easiest way to enumerate them is to write them down on a sheet of paper while waiting for a friendly soul to release you from the one you just fell into.

However:

  1. Don't try to reinvent the wheel. The iPhone API is very complete -- you just have to LOOK for the facility you need. Things are NOT always implemented the way you would expect. Read the guides, carefully. Look at the tutorials and analyze how they work. (Try changing a line here or there in the tutorial to see what difference the change makes.) The single biggest mistake I have made in 1 year of iPhone development is not trying hard enough to find the iPhone way of doing something.

  2. Don't ignore memory management; master it early and often. Use the Object Allocation and Leaks tools in Instruments to check for memory leaks frequently. I'd recommend checking after you complete each feature or view; more often than that if you keep finding bugs. Eventually you may understand it so well you can stop doing this.

  3. Don't just use the default build settings. Play around with them to understand what they do. Figure out certification and distribution. GET INTO THE DEVELOPER PROGRAM QUICKLY -- it can take a while to push through that pipeline. [ AND when you get that notification that you need to renew, get it on instantly -- there have been problems with that process. ]

  4. Don't neglect to read the Human Interface Guidelines (HIG) carefully. If they say not to do something -- DON'T DO IT. Apple will reject applications that misuse their iconography.

  5. Don't stint on marketing. Yes, the App Store puts your app in front of millions of people... In theory. But the odds of getting front-paged are slim. There are a lot of great apps on the App Store that haven't sold much because no one knows about them.

  6. Don't rest on your laurels. If a new technology comes out, find out if it makes your job easier; if it does, take the time to learn it. Personal example: I'm just now trying to switch from SQLite-based data management to Core Data, because I was in a hurry at the time I started my most recent project; now I wish I had slowed down and thought about it.

  7. Don't go into your design thinking (for example) "How do I implement my concept with a table view?" It's true that table views are natural for many informational and utility applications, but don't be constrained. Instead, think about what users will want to be able to do, how you can make it easier for them -- put things together that will be used together, etc. If you've never explored the concept of Use Cases, read up on them.

  8. Don't hesitate to build composite views. Many of the questions I have seen here on Stack Overflow have to do with putting a toolbar at the top of a table, or having an image in the background of a text field. I understand the desire to do things the easy way, and as I state in #1 above, if there is an easy way, use it. But in many cases the solution is just to layer a couple of views with appropriate placement and transparency.

like image 150
Amagrammer Avatar answered Oct 29 '22 07:10

Amagrammer


Think about what might be Apple-approved from the start.

App Rejected is one of several useful sites to help understand Apple's mostly undocumented standards. (One more.) (A previous question on app store rejection reasons.)

A few quick examples:

  • Using a UIWebView can get your app a 17+ rating.
  • Coding with an undocumented/private API = rejected
  • Version number < 1.0 might= rejected
  • Not enough feedback about network success/fail = rejected
  • Too much network use = rejected
  • Clearly limited free version vs full version = rejected
  • The word 'iPhone' in the app name = rejected

The above links contain many more examples, and more details about those examples.

like image 23
Tyler Avatar answered Oct 29 '22 06:10

Tyler


Don't neglect the programming guides. While the documentation is quite extensive, the programming guides contains a veritable trove of useful tips and "insider" information that simply cannot be gleaned from reading method definitions. I spend just as much time reading the guides for a technology (say, Core Data) as I do actually implementing it.

Don't assume you know what a method does. If you have any degree of doubt about the functionality of a method, it is well worth your time to go look it up in the documentation to verify.

like image 3
Dave DeLong Avatar answered Oct 29 '22 08:10

Dave DeLong


Wonderful examples from @Amagrammer above.

I would love to add that the first place to start is iPhone development is Photoshop. This is still the best advice I can give to anyone who is starting out. I now use OmniGraffle because it has awesome stencil templates.

What I find is that even for super simple app's, draw up your prototype and look for usability issues and work flow issues. It is 100x quicker to redraw your app than re-code it. I have fallen into this trap numerous times and now actually draw up some pretty simple functionality to see what it will look and feel like.

This advice will save you 10s maybe even 100s of hours in hopefully getting your app right first time and getting you to think through what the issues are. Throwing away code sucks and I have done it not because the code was bad but because it made the usability or solution worse. I think the best of us end up throwing code away and prototyping your design definitely will help in having to RTFM for something you did not have to build in the first place.

like image 2
John Ballinger Avatar answered Oct 29 '22 06:10

John Ballinger