Aug
21

“DiggIt News” iPhone App Review

This past week, we have discovered an interesting new Digg client for the iPhone. “DIggIt News” is a random news reader that is powered by the Digg.com API. In a nutshell, it allows the reader to randomly generate news stories until they find one that they want to read. Once they have found it they can:

  • Read the full story
  • Save the story to read later
  • Tweet the story to their followers
  • Email the Story to a friend

The app doesn’t stop there, it also allows you to filter your news by category. So you can select sports and then randomly generate sports stories until you find something interesting. In our opinion, this is a great idea. Rather then having to scour the web looking for interesting news, the news comes to you with a tap of the button. After 10 minutes of using the app, we discovered interesting news that we wouldn’t usually look for, yet were pleasantly surprised with.

It’s a fast, easy way to keep up to date with what your interested in. And best of all, its soo easy to use. No complicated interface. Everything is very clean and in HD no less.

Here is the iTunes Link to check it out: DiggIt News

Official iPhoneDevAdventures.com rating:  4.5 stars out of 5

Screenshots (taken from iTunes):

 

Aug
17

Database Access from iPhone Apps

In my journeys through iPhone Dev I have come to realize that the ability to access database materials and bring those materials back to an app is extremely important. In reality, if you have the right tools, it is not all that difficult either. I will explain how I have accomplished this at a high level (overall description) and then I will get into the details of how it’s done.

From a high level, my application will make a URL call to a PHP page that I have on my server. This PHP page will handle any interactions with the database and, once finished, will format the output as XML. This may seem overwhelming at first but in reality, this is actually quite easy. Let’s start by covering the server side aspects (PHP) and then we will go back to the actual application code (Objective-C).

The great thing with having a server side page handling the database interaction and returning XML is that you can really use any server side language (not just PHP) and communicate with any sort of database (MYSQL, SQL, etc…). The only thing that must be the same, is that your result must be formated as XML. Below is a sample PHP page that queries a MYSQL database and returns the results in XML format:

As you can see, lines 3-6 set up the credentials needed to connect to the database. The connection is made in lines 9-11. A query is used to get some data from the database and lastly, an xml formatted response is generated. The keyword “echo” in PHP simply prints the data to the screen. So once this code is run, the output may look like:

An XML formatted response like this will make it easy for our iPhone application to get the response, parse it, and store the needed values. Not that you have a general understanding of how you might format a response after you initially get data from the database, we can cover the more important part, getting the data back to the app.

To simplify the process, we are going to use a free pre-written document parser for objective-C called “TBXML – Free”. This will make your life alot easier when it comes to reading the generated data from the web.

You can take a look at TBXML here

You will need to download their .zip folder which contains a few files that you will add to your Xcode project. Their website has a comprehensive guide on how to install it and detailed documentation on how to use it. I suggest you spend some time looking it over.

Here is a link to the Guide to using TBXML

This method is perfectly legal in the sense that Apple will not frown upon it because it is a third-party API. All the methods/procedures that TBXML uses abide by Apple’s strict rules and regulations.

Lastly, I have included a chunk of code that is an example of how to make a URL call and get back the XML data from the above PHP output using TBXML.

I understand that this is a basic overview. However, I find that sometimes all you need is a little direction. If you have any more questions, please feel free to ask…

Mar
08

Getting Started with iPhone Dev

Starting something new can always be overwhelming. If your looking to start developing for the iPhone, take comfort in knowing that the iPhone development community is a large one, and their is a number of awesome resources to help get you started. I started coding in my second year of college as a Computer Science major, so I had some background in programming before I decided to try my hand with Objective-C and the iPhone iOS. However, even if you don’t have much background in programming, the unlimited resources that are available on the web make anything possible.

I’ll try to walk you through some of the great resources I have found and use on a regular basis.

First of all, Apple has done a tremendous job documenting the iOS and all of its delicate intricacies. They have provided a number of different articles, code samples, how-to’s, videos, references, guides, and more. This can all be found here: iOS Reference Library

Although the above link to Apple’s documentation may be useful, sometimes it can be overwhelming for a true beginner. I know it was not as useful to me until I had the basics down and was able to understand better what I was looking at when I went through their code samples, etc… I used a number of online tutorials to learn the bare bones and try to establish a foundation and really understand the structure of Objective-C, while also learning how to use Xcode and the SDK. Every programmer knows that when your just starting to learn a language, you always start with the “Hello World” example where you simply print the words “Hello World” to the screen. This is the first thing I looked for when staring in iPhone dev. You can find the same Hello World tutorial that I used here.

Next I went one step further, moving up in complexity but taking baby steps. I followed this tutorial which is an advanced Hello World application that actually has some functionality. You have an input box that you type into and the words you enter are regurgitated on the screen.

Following this, I discovered a 7 part tutorial (on tableviews) that would essentially help me understand, in great depth, the way that Objective-C operates, how to use Interface Builder with Xcode, instantiating views and objects, connecting those objects within a view, and in the process create my first app which would crack the top ten Reference Apps in the US. The first part of this tutorial can be found here. All 7 parts are linked to from that page.

As you learn more and more and become more comfortable with the language, the possibilities of what you can accomplish are endless. These links I have listed above are just a few examples of the plethora of content available on the web. They are good starting points for any developer or non-developer interested in working with the iPhone iOS platform. I have listed some other great tutorials I have discovered below:

Mar
04

Some Keys to iPhone App Development

Not that I am an expert by any means, but this post is really more about what I have learned in the little time that I have been developing for the iPhone iOS and through the submission process with Apple.

1. Functionality isn’t everything

What I mean by this is, the functionality of your application may not be enough to entice users. All users really have to go by when deciding whether or not to purchase or download your application is the description and 5 screenshots. You may have a really cool concept, but if the interface or look and feel of the app isn’t up to par with the functionality, you may lose potential users that would other wise be interested. There are a large percentage of users that will not even attempt to read the description of the application, they will go straight to the screenshots and make the decision based off of what they see. I, myself am guilty of this quite often. Therefore, if the look of the app as portrayed by the screenshots doesn’t capture their eye, they are likely to move on.

I have witnessed this largely from personal experience. I have made multiple game guide applications. These applications were not the only ones of their kind. For instance, I developed a game guide for Call of Duty: Black Ops. At the time of the release of the game, there were close to 30 Black Ops guide applications available in the store, yet mine took the #1 ranking. I believe this is a result of the time and care put into the interface.

2. Size Does Matter

Because of the 3G restrictions on application sizes that can be downloaded over the network, trying to keep your application under 20MB is a big deal. Certain practices can be used to help keep application size down, like using flattened JPG images rather than PNGs. For instance, I had a large PNG image that was 7.2MB in size. That same image as a JPG was only 388KB (thats 18x smaller). Avoiding embedded video is another easy way to save space but if you must include it, try compressing it into .m4v format.

The more you can do to keep your application under 20MB, the better odds your application has of being successful. However, this doesn’t mean that apps over 20MB are a lost cause. When my Call of Duty application went #1 (in reference) it was nearly 100MB. It really all depends on how much people want the information or the service that your app provides. In my case, this application was filled with useful information and video and people wanted access to that information. I don’t think that logic applies much to game dev though, because if I am bored and want to download a new game to play to pass the time, if I attempt to download an app that’s too large and I don’t have wifi access, I will most likely move onto the next one.

3. Be Aware of Copyrights

I have had a number of personal experiences with this issue. As a developer of game guides, the source of most of the material that I fill my app with is a result of material released by the company making the game. Certain companies, especially those that plan to release their own application do not look lightly on applications utilizing their material. In my case, my Call of Duty application went #1 and within 3 weeks and had received a cease and desist letter from Activision. The letter asked me to remove the application and gave my 5 days to comply.

It is important to be careful of what material you fill your applications with and if you are going to use media that isn’t your own, its important to understand legal contexts such as the “fair use policy” and how it can apply. Below is an excerpt from Wikipedia:

Fair use, a limitation and exception to the exclusive right granted by copyright law to the author of a creative work, is a doctrine in United States copyright law that allows limited use of copyrighted material without acquiring permission from the rights holders. Examples of fair use include commentary, criticism, news reporting, research, teaching, library archiving and scholarship.

4. Originality is the Spice of Life

This can’t be stated enough, original ideas are diamonds in the iPhone world. With so many applications out there, it is so difficult to come up with an idea that has not already been done. I try to think of new stuff all the time, go and search it and find that it already exists. If you can come up with something original and get it out there, chances are you will find some measure of success.

When thinking of a new idea, search key words that you might associate with your idea in the AppStore. See how many results you get back. These are your potential competition. If you want to make an app about ducks but search the word duck and there are 100+ results, it is going to be harder for your app to be discovered.

5. Choose Your Audience Wisely

This is also an important thing to consider when designing applications. When you are deciding what to build, keep in mind the audience that it appeals to. Don’t narrow the appeal down so much that it only applies to a very select group of people. That will result in minimal traffic. For instance, its only common sense that an application titled “Sports Guru” will attract more attention then one called “Cricket Guru” because the number of sports fans is much greater than the number of Cricket fans which are a subset of the sports fans.