Friday, November 22, 2013

Why We Build Yet Another PDF App

There are over 4 gazillion PDF apps in the Apple Store. So why would anyone spend more than a year developing and marketing yet another PDF app???

There is NO app for that...
I do quite a lot of research. When studying or doing research, I usually use two or more documents at the same time. One as the document I'm studying, and the other as a reference. So I started looking for an app that would allow me to show two PDFs side-by-side and annotate them. Guess what!? There is NO app for that...

More than 1 million apps in the App Store...
Just saw that there are over a million apps in the app store (link). So how could it be that the app I was looking for was non-existent? No idea. There should be loads of persons studying, reviewing, doing research that could use a side-by-side PDF app. That’s why we’ve developed Easy Annotate.

We decide to develop ourselves...
Together with some friends we thus decided to develop our own iPad app. It would be of great use to us, and hopefully for many others. We had already developed an iPhone game, so we had a little experience, but none in productivity apps.

We've launched...
After developing for about a year, this week (20th november) we launched our app, Easy Annotate
It allows two PDFs to be shown, studied and linked side-by-side. And while we were on it, we added full dropbox support, to easily get files from our desktop to our app. It fulfills our needs and we hope it helps many more. 

Lesson
There are still unserved markets in the App Store.When you're looking for functionality and can't find it, don't complain. Fill the gap.

Have Fun & Keep Koding!  
Freek Sanders.
Easy Annotate

Monday, July 15, 2013

Asynchronous Synchronization - A Warning !

In my last post, Asynchronous Synchronization, I explained how to wait for an I/O process to finish before resuming your app.

This works fine, unless you're working with false assumptions.
And that's what I'm writing about today.

Taking the same code sample as in Asynchronous Synchronization:

 - (void)actionOnDocument:(void (^)(PDFDocument *pdfDoc))actionHandler  
 {  
   __block bool isFileOpened = NO;  
   [doc openWithCompletionHandler:^(BOOL success) {  
     if (success) {  
       actionHandler(doc.data);  
       // save and close  
       [doc saveWithCompletion:^(BOOL success) {  
         isFileOpened = YES;  
       }];  
     }  
     else {  
       actionHandler(nil);  
       isFileOpened = YES;  
     }  
   }];  
   // loop-lock  
   while(!isFileOpened){  
     [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]];  
   }  
 }  

Now the problem: What if the local 'doc' variable turns out to be NIL ???

I had this issue today. After hours of hunting for memory problems, this was the problem.

What happens when doc is nil:

1 - doc is nil
2 - openWithCompletionHandler is called on a nil-object (i.e. nothing happens)
3 - the completion handler is never called
4 - isFileOpened remains NO forever
5 - the app remains in the while-loop forever
6 - we have a memory problem ;)

In this case the solution was simple. Encapsulate the whole function in a if(doc){...} caption, and we're safe.

This reminds me of why while(...) loops are so dangerous ;)


Have Fun & Keep Koding!  
Freek Sanders.
MakeMeBlue









Monday, July 8, 2013

Asynchronous Synchronization

Asynchronous is the way to go!
Blocking synchronization functions are evil!

Usually these statements are true. Especially when handling I/O, blocking function calls can bog down your code.

But there are exception.
Sometimes your application can only continue AFTER a file is opened / saved / closed / etc.
This is usually where completion handlers come in handy. With these you can perform actions after the opening / saving / etc has been completed.

But once in a while, you need everything to wait until some I/O is finished. How do you go about this.

Here's some magic:

 - (void)actionOnDocument:(void (^)(PDFDocument *pdfDoc))actionHandler  
 {  
   __block bool isFileOpened = NO;  
   [doc openWithCompletionHandler:^(BOOL success) {  
     if (success) {  
       actionHandler(doc.data);  
       // save and close  
       [doc saveWithCompletion:^(BOOL success) {  
         isFileOpened = YES;  
       }];  
     }  
     else {  
       actionHandler(nil);  
       isFileOpened = YES;  
     }  
   }];  
   // loop-lock  
   while(!isFileOpened){  
     [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]];  
   }  
 }  

As you see, we want to perform some kind of action on a PDFDocument. However, we also want to make sure that the application does not continue before this function is completed (and the document is closed again).

The secret here is to run a check in a loop. Of course this loop should not check continually as that would suck up all resources. Instead we check every little while if something has changed in the status of the isFileOpened value.

Now we build synchronization into an asynchronous function.

Have Fun & Keep Koding!  
Freek Sanders.
MakeMeBlue

Wednesday, July 3, 2013

Exploring App Space Usage

Currently we're working on a new PDF application (top secret).
One of the issues we ran into was the large amount of space the app uses.

Of course, loads of PDF's use loads of space. Still it was very improbable that the files I had imported to 830 MB!

The size of our App's Documents & Data ran over 830 MB!!!
(find this info in: iPad -> Settings -> General -> Usage -> App Name)

I needed to know what was eating this space, but had no idea how.
Then, this morning while debugging I mis-clicked something in XCode, and suddenly found what I was looking for.

How to explore your App Space Usage

  1. Connect your iPad / iPhone to your development machine
  2. Open XCode
  3. Open the Organizer (in XCode: Window -> Organizer)
  4. Go to Devices (top menu)
  5. Go to your iPad / iPhone (left menu)
  6. Go to Applications
  7. Now you'll see a list of all the apps you've developed and their data files (see image)
  8. By clicking the Download button in the bottom, you can download all the files in the App.



Problem Found

After downloading all the files, I quickly found the problem. All the PDF's were being cached and the cache had become more than 500 MB.

Solution: purge the cache on every App restart.
Simple solution, bye bye problematic space usage ;)

Do you have any suggestions or comments?
Don't hesitate to leave them!

Success & Keep Koding!
Freek Sanders.
MakeMeBlue

Monday, July 1, 2013

How NOT to Launch a Game

Our game launched last year. Well... launched?
It's more like it was vomited on the App Store and died there.

What did we do? What was the result? Why was this stupid?

Launch day!

We launched our flag ship game MakeMeBlue in 2012.
We did no marketing whatsoever. Well, we told some friends about it but that's all. We hoped to launch soft and to grow our sales gradually as persons would download the game, play it and tell their friends about it.

We did not have a website
We did not write to game review sites
We did not have a youtube channel / facebook fan page / twitter account
We did not have an advertisement campaign

Why this is Bad?

This strategy stinks.

Even if people would love the game, they need to find it before they can love it. You can't tell your friends about games you don't know.

There are thousands and thousands of games on the App Store.Most gamers don't go through lists for hours and hours to find your game. Why would they? They just look at the top 10 or 100 and download something that looks nice. Or their friends did and told them about it.

This strategy is a certain path to take if you want to fail. And fail we did, just look at these wonderful statistics...

The Results

The first week reaped most downloads, with days ranging in the 20 downloads. We also had one day with about 60 downloads when testing out facebook integration.

Stats

Total downloads last half year: 336
Total in-app purchases after one year: € 3.01
Total iAd income after one year: € 3.05
Total admob income after one year: $6.35 (17.382 ad requests)

Lesson Learned

Actually it's pretty amazing that more than 300 persons were able to find our app and downloaded it. Wonder how they found it!?

The main lesson I learned is that marketing is vital to the success of any app. Thus with version 2.0 of our game we decided to relaunch it and spend more time on marketing.

We now have a website
We now wrote to game review sites
We now have a youtube channel / facebook fan page / twitter account
We now launched an advertisement campaign

The result of this?
We'll find out soon and let you know.

Do you have any stories or advice to share?
Please post it so we can all learn.

Success & Keep Koding!
Freek Sanders.

How to Build an iOS Game


Before you start, please read the warning notes in my last post: Why you should NOT build an iOS game

So, we've got that covered, and you're obviously obstinate about building an iOS game anyway.

Buiding an iOS app is not that hard if you know what you're doing. If you don't it is. I came from the latter position, and am happy to make the road somewhat smoother.

What to do:

1. Get a Mac


Yep, if you don't have one yet, you need to get one. iOS development can only be done on a OSX system, thus get a MacBook or something.

2. Get an iPhone / iPad


It's nearly impossible to develop a good app without being able to test it on the final product. So if you're building an iPhone game, you need an iPhone. Building an iPad game? Get an iPad.

3. Get the Tools


Download the most recent XCode application for your (shiny new?) mac. Go to the Mac App Store and type in XCode.

4. Get the SDK's


This step depends on you're game. In most cases it's an excellent idea to get a gamekit SDK to do much of the tedious work for you. It helps getting the graphics and sound together and aids in making animated transitions, etc easier. My pick was Kobold2D, which includes Cocos2D. It's free and you can download it at: http://www.kobold2d.com. At the moment it doesn't support 3D animations so if you need those, you need to get a different SDK. (most iOS games do without 3D anyway, see Angry Birds, Hay Day, etc and only use 2D images). Another popular option is to buy the Unity SDK. It's being used in many games as well. Check which fits your need best.

Make sure that the SDK you pick is able to do what you want. Do not save a couple of bucks on the SDK, just to spend weeks or months programming the missing features.

5. Get an iOS Developer License


It's needed to put your app on the App Store. Also useful if you need to ask question to the Apple Developer staff. Where to get it: https://developer.apple.com

6. Learn Objective C


To build an iOS app you need to program in Objective C. Get to know the language and the possibilities before starting out on your dream app. It saves you from having to keep rewriting parts of it.

Assuming you can programming already, I found the video tutorials by Paul Hegarty fantastic. You can download them for free here: iTunes Paul Hegarty Following these will help you to build simple iOS apps. Another wonderful resource is the site of Ray Wenderlich. Once you've mastered the basics, let Google be your friend ;) If you can't program yet, the tutorials of Paul Hegarty might be steep learning curve. Not impossible, just hard. Maybe it'll be a better starting point to take some programming classes off or online and to follow some basic tutorials.

7. Get to Know the SDK  


Get to know how to do stuff with the SDK you chose. Follow some tutorials and see the best practices. Again, Ray Wenderlich has some good ones for the Kobold2D/Cocos2D SDK.

8. Think Out the Game


Coding costs lots of time. Changing plans midway costs lots of time. Thus, write down you plans beforehand. Try to think out as much as possible before starting out.
  • What's the goal of the game?
  • Why would I play it again? 
  • How do I earn points? 
  • Do I compete against others or myself? How do I compete? 
  • Is the game too hard? Too easy? 
  • Is the game paid for/free? 
  • Do I want in-app purchases? If yes, why? where? Why would someone buy them?  

9. Marketing


Yes, you need to start marketing before you start building.
Unless of course you don't mind if nobody plays it. Hoping to make the top app lists by chance is like hoping to win the lottery. Not the best of business plans.

Ask yourself:
  • What's the earning model for this game? (free with ads, paid, in-app purchases) 
  • Who would play this game?
  • How can I reach these players?
  • Do they visit certain blogs, websites, read certain magazines?
Steps: 
  • Identify ways you can get to the pottential end users 
  • Build a teaser website 
  • Build a facebook page, twitter account, blog, etc.
  • Get in contact with your future users and keep them updated on the progress of your game
  • Build an audience before you launch, so users will download the game when it launches
  • Bring out teaser images, videos, etc.
  • Keep doing this until you launch
Marketing your app is the hardest and most overlooked step in developing a successful game. You can find more info on how NOT to do it here.

10. Draw the Game


Don't save time on planning. The more you know in advance, the better. Draw out all the game transitions. Draw out all the graphics.

  • How does the menu look?
  • How does the game background look?
  • How do the controls work?
  • What does the player see on launch?
  • Where are all the labels located?
  • How do you transition from screen-to-screen?
  • When and where is sound played?  

11. Design the Software


Before starting to code, always design the software first. It saves time later on.
  • How will you save data?
  • Do you need a database? If so, what fields, etc do I need?
  • What classes are you going to need? What functions?
  • Do you need additional SDK's for things such as Facebook integration?
  • What settings will you allow? Can you save them in NSUserDefaults?
  • How will you load images? As seperate files? As sprite sheets?
  • What about sound? How will you load it?  

12. Design the Graphics


Though luck creating your own graphics. Unless you're a graphical artist this is probably not your cup of tea.

This leaves three options:
  • Make it yourself anyway and suffer with bad graphics (really bad idea)
  • Hire someone to do the graphics. Make sure you're on the same line regarding the image your game needs to portrait. This is a good option if you have the budget and want to create a specific/unique look for your game.
  • Buy graphics online. Many graphics such as buttons, icons, etc can be bought online at a reasonable price. Don't spend hours designing a bad looking version of a button that costs $8 to download.  

13. Create the Sound


Like for graphics, you probably are not a sound magician. So again, take you're pick of the above three options.

14. Build the Game


With all the previous steps taken, you should now know how to build the game.

15. Test, Test, Test Again  


A game that crashes is a bad game. The following steps should take care of the most obvious mistakes.
  • Try all different ways of playing your game.
  • Finish the game multiple times.
  • Press all the buttons in random and various orders  

16. Get Dumb Users


Yep, your nemesis as developer is the end user.
They will use your game in a way you did not expect and not use it in the way you did expect.
They will ignore your instructions and help buttons.
They will crash the game in ways you can't.
They won't understand the menu.
They will get bored after one game.

Make sure you tested the game on real life users. Don't test just on your co-developers or on your boss. Test the game on persons who have never seen it before. Don't explain the game. If you need to explain it, you're lost. Ask them to criticize anything about the game. What do they like? What do they dislike?

How to find these users?
  • Friends
  • Family
  • Co-workers from different departments (finance for example)
  • Online (distribute the game for free to beta-testers)  

17. Get it On the App Store


Upload your app to the App Store. Don't make the game pubic yet, as you need to market your game

18. Market the Game


The hardest part of it all. This is a whole different story all together. Read the story.

19. Get a Swiss Bank Account / Enroll for Unemployment Benefits

(in case of the former, don't forget me ;))

Any steps I missed?
Do you have any suggestions?
If you're developing an app, keep me posted!
Please leave your comments below.

Success & Keep Koding!
Freek Sanders
MakeMeBlue

Building Apps Stinks

App developers are cool, and ios game developers are totally awesome, hip and happening. Being an app developer might seem to be one of life's most wonderful prospects. It's not. I've done it, and I know it. Listen to my advice...

Making an app stinks.
Why?


1. Your Idea Stinks


Problem: Your idea is thirteen in a dozen / Your idea is so bad the world is better off without it

There's an App for that...
All obvious and many, many, unobvious ideas already have an app.
When you have an idea, the first thing to do is to go to the App Store and see if there's not already a fantastic app that does exactly that.
Usually there are a whole bunch of them. Download them. Use them. Then ask yourself:

- what would make my app stand out?
- why would anyone download my app instead of one of the others?
- am I able to compete with the other apps out there?
- what have users come to expect from this type of app?
- what is the pricing of the apps out there?
- how much are these apps downloaded? Is there a market?

If there are many strong apps out there, maybe it's better to rethink your idea. Could you modify it to fit a gap in the current offering? If there are no competitors at all then maybe there's a good reason for that! Maybe there's no market for it. Maybe the world's not waiting for a TriTone Fart App. Or maybe you hit gold.

How do you find out? Ask your friends, family and colleges about their opinion. (don't be afraid that they'll run off and steal the idea. Building an app is loads of hard work and most people are lazy)
Do they honestly think it's a good idea? Would they pay for it?
This kills most ideas. If it didn't, carry on...

Tip: Search the App Store for similar apps. Test drive your idea with friends, family and colleagues.


2. Your Skills Stink  


Problem: You never build an App before

It's a chicken-and-egg problem. Your app will stink because you don't have any experience, which you don't have because you never build an app.
The only way to get out of this circle of doom is to build an app and acknowledge that it will stink.
Consider the first app(s) you build as lessons. These will teach you how to build better apps in the future. Apps that don't stink. How to build your first app? Read my next post ;).
Just don't quit your job yet.

Another option is to pay someone to build your app. Yes, this is probably costly. But if you're certain it's going to rain money afterwards then this might be a good option.
Especially if the app will support your business instead of being your business (eg: an app to support your online shop).

Tip: View your first app as a lesson, not a money maker. Pay someone else to build your app.


3. Development Stinks


Problem: 80/20 rule: 20% is fun, 80% is torture.  

Actually more like 90/10 or 99/01 ;) The first bout of developing is always great fun. There are high hopes, fun things to do and quick improvements. Then things start to slow down. The whole app needs to be redesigned. The database is too slow and needs to be replaced. The memory consumption is too high. There is the mystery bug that only occurs at midnight on the second Tuesday of June. Etcetera, etcetera.
These things suck the lifeblood out of developers, cause premature aging, balding scalps and random anger bouts.

How do you prevent this?

Planning is the key.
Before you start building your app, write down what it does and how it does it.
Draw out all the different screens and transitions between them.
Draw the menu, the different buttons, the intro screen, etc.
Design the software structure. What classes and functions do you need?
What data will you store? How much will it be? Which storage would suite those needs?

Then, find toolkits and SDK's that could lighten your burden. Paying for these is usually much cheaper than building and testing them yourselves. For example if you're building an app with PDF support, don't build all the rendering yourself. Get PSPDFKit or something.

Tip: Plan the software in advance. Get toolkits to lighten the burden.


4. Your Graphics Stink


Problem: You're a programmer not a graphics wizard

Owning photoshop doesn't make you a designer, just as standing in a garage doesn't make you a car.
You might be able to shurn out a decent piece of code, but that doesn't mean you can also design beautiful graphics.
Unfortunately the first thing we seen about an app are the graphics. If they're bad, the first impression is bad.
If the first impression is bad, I don't download your app. End of story.

Your graphics need to be good. Probably you'll need outside help.
Do you have any friends or relatives with graphical experience? Ask them for help. Don't be shy to pay for it either.
A lot of stock images, buttons, icons and other graphics can be found online. Don't hesitate to pay a few dollars if it is what you're looking for.

Tip: Hire a graphics wizard. Find and buy graphics online.


5. Marketing Stinks


Problem: You build it, they won't come.

Building a game is a walk in the park compared to getting someone to download your game. Basic problem is that there are thousands and thousands of apps on the App Store and yours is just one of them.

Why would I ever download your app, instead of one of the others? Then again, how am I even going to find your app?

Of course, I your app is great, people will advice it to their friends, blah, blah, blah. But if those people never found your app in the first place, they can't advice it to their friends. So, the hardest part is bootstrapping.

You need to get your initial customers. Where do you find them? Get your friends, family, colleagues, neighbors, etc to download your app. That's a start. If you're ashamed of your app, you might as well not publish it, so talk about it whenever you can.

Also write a note to every person in the business. Ask for app reviews from all major sites (see this list: http://maniacdev.com/2012/05/ios-app-review-sites).

But marketing starts before you launch. Start telling the world as you start coding. This means building a network (twitter, facebook) and building a website.

Find more info on launching an app: How NOT to Launch a Game

Tip: Build a website before building your game. Build a network. Ask for reviews. Get the word out. More tips: How NOT to Launch a Game


6. Making Money Stinks


Problem: You don't have a revenue model.

Products don't just magically make money and apps are no exception.
Just dumping your game on the App Store doesn't make you rich.
There are many, many, many free apps out there on the App Store. Why would I pay for yours?

Is it that good? Can you convince me it is?

You're giving out a free version for trial and a paid version for those who like it. Why won't I just stick with your free version and never download the paid one? Is your app so good / original that I want to keep using it?

Oh, so you're going for the free-with-ads model? Do you know how much that makes? You don't? You'd better find out beforehand!
Just to give you a hint, we had 2737 ad requests for every dollar made. Thus to make 10,000 dollars you need 27.370.000 ad views. How many users do you need to get to that? Thought about it? You didn't? Thought so :D

Then there's In-App Purchase. Seems the highest grossing games jumped on this bandwagon. Want to go for this model? What in-app purchases do you have? Why would I buy them. Personally I hate to pay just to play. Can I play it without paying? What would motivate me to move from playing for free to paying for extra's?

Tip: Figure out your revenue model before starting to build your app. Think about what model would fit your app and users.


Succes & Keep Koding!
Freek Sanders.
MakeMeBlue