Part 3: Actually Getting Started With Your App Development

socialite

This is the third in a series of articles on getting into mobile app development. Feel free to look back at the previous articles:

Part 1: Mobile App Development – Much Easier Than You Think

Part 2: Targeting The Right First App

post-divider

Remember the blank sheet of paper and pen from my previous post?

paper

Well, the good news is that these days you never have to start with nothing, and you can thank GitHub for this.

Let’s start with a thing called Git. It’s a really cool mechanism  (amongst many, many other features) for tracking changes to source code on a computer. Essentially it tracks everything a developer does when writing code, recording every single change. It’s so powerful that if you make substantive changes in your code (perhaps over several files) only to realise that you want to back to how it was before you started, Git can do that for you – in an instant.

GitHub is an extension of Git in that all your files are stored in the cloud. Not only does this provide a useful offsite backup, but it also means you can develop on more than one laptop.

Very cool stuff, but why is all this good for you? Well, it comes down to what’s highlighted in yellow below:

github.png

You don’t have to pay to use GitHub, but the deal is this: if you use it for free then all your source code is publicly available. A genius move from Linus Torvalds (Git and GitHub inventor) that helped GitHub use explode overnight, and that same move now helps you. Millions of developers don’t want to, or have the means to pay for GitHub so all their code is available to you to use – again, Google is your friend. Just search for the code snippets you need or even an entire project to start with.

Read the end of that last sentence again, because those five words will save you a whopping 80% of the work. Think about it, it’s hard to start from nothing. You may have never written an app before, and if you start from scratch it could take you weeks for you’ve actually managed to get your code syntax correct so that your app runs, let alone does anything useful!

Starting from something that already works is like having a glorious achievement without doing very much at all.

Don’t Just Take My Word for it – Try it Yourself!

Hmmm, I guess this might be the “proof of the pudding” then as to whether you really do have what it takes to get into app development. Your first task:

Look on GitHub for an iOS project written in Swift that you like the look of, or you think is not a million miles away from the app you have in mind, then download that project onto you computer. Then look for the “.xcode”project file and double-click on it. This will load the project files into Xcode (Apple’s dedicated IDE). Select run and (assuming that the source code files are not out of date with the latest version of Swift) you should get a good feeling of achievement, without too much effort.

That’s your first step taken then, in developing your first app. I would say that you’re already half-way there, but that would be a lie. There’s still a lot of work to do, but that step was an important one, because now you have some source code that you can make small changes to, and see the impact of those changes in the app (either the simulator in Xcode, or your actual mobile phone if you’ve been brave enough to connect it yet).

Build an Engine First…

Now, before I forget… whilst your app idea might be for a specific purpose, try to take a step back for a moment and think about the eventual inner workings of the app. Could those inner workings be made generic so that they can be used for other apps?

For example, if you’re writing an app that provides ratings of builders, plumbers and other tradesmen in your local area, it is likely that the inner workings of that might also be applicable to other things like takeaway restaurants etc.

If you design your app in a generic fashion to begin with it’s much easier to then use that code to produce other apps as required, and in fact (at least in the case of iOS) the development environment is specially set up for that way of working.

Intellectual Property Rights (IPR)

And one other thing, remember that you might be using other people’s code (or data) in your apps, so always remember this: Don’t rip off people – always look after their IPR. Some people are happy to publish source code for you to use freely, others ask that you make mention in your app that you’re using their code/data. Others ask for a financial donation. My advice is to always play fair, otherwise why should anyone respect your own IPR? Ok, end of legal school 🙂

A Case Study

In my next article I’ll take you through the process of how I went about designing Peak Scanner, my very first commercial application, that even after 3 years still generates a few£1000 every year…

ps2_screen1_iPhone47

post-divider

Want to read more? Take a look at the next article in this series:

Part 4 – Case Study with Peak Scanner

Here are all the articles in mobile app development series:

Part 1: Mobile App Development – Much Easier Than You Think

Part 2: Targeting The Right First App

Part 3: Actually Getting Started With Your App Development

 

Advertisements

Part 2: Targeting The Right First App to Develop

Target Mobile

This is the second in a series of articles on getting into mobile app development. Feel free to look back at the first article, Mobile App Development – Much Easier Than You Think.

For a list of all the articles in the series, see the end of this post.
post-dividerSo, you want to get into mobile app development, and hopefully make a bit of money at the same time. But which app should to target? That’s quite a big question, and hopefully I can provide some advice based on my own experiences with my first ever commercial mobile app, Peak Scanner.

I just need a Brilliant idea!

With a brilliant idea, you’ve inextricably shortened your road to fortune – all you need to do now is code it up and launch it.

Hmmm… I see a problem though – the chances of you, me, or anyone coming up with a brand new brilliant idea – something that has not been done or thought of before – is slim. Here’s how slim:

Screen Shot 2016-04-04 at 08.11.29.png

Source: Statistica

This chart was from last summer. If we extrapolate to Spring 2016 we’re looking at over two million different mobile apps available across all the stores. Crikey! That’s not only a lot of apps, but a lot of developers, and of course they’re all looking for the next brilliant idea, like you.

Lightbulb

Now, I’m not saying you won’t have the next brilliant idea – I sincerely hope you do. But I want to show you a different approach – and one, particularly for your first app, is far better.

You Don’t Actually Need a Brilliant Idea!

Really? Oh, cool. Because I’m right out of ideas. Pressure off.

It’s true though, you don’t have to invent something that the world has never seen. All you have to do is pick a subject area (could be anything), look at the apps already out there – perhaps some of those apps you are already using, and… here come’s the clincher: do it better!

Yup – that’s the secret. Well, it’s not the only approach, but it’s one that worked for me with my first app, and it could also work for you.

And that’s the thing about mobile app development, especially your first app. It all starts with you…

Choose a subject area that you are interested in

“What? That doesn’t make sense. My interest is in paragliding – way too niche! I want to choose an app idea that’ll quickly go mass market and make me millions!”, I hear you say.

That’s true, but this is your first app. And it’s going to be an up-hill battle to get it development – a lot of learning, a lot of bug fixing, a lot of headaches, a lot of exacerbation at times… effectively plenty opportunities for you to give up – so you should choose a subject area that is of deep personal interest to you. That way, when the going gets tough, you’ll still (hopefully) have the motivation to keep going to the end.

There’s also another reason for doing this – you are not guaranteed financial success – you may end up developing a great app, and it may never sell well. Two weeks ago, I launched my third app, Train Catcher. I (of course) think it’s brilliant, but there’s a ton of competition – many other apps doing a similar thing, and they’re all free – mine isn’t.

(Worth mentioning here that I’ll be writing a future post on how you can compete with free, using Train Catcher as a case study.)

tcad

But the absolute worst-case scenario is this – even if the app never sells, I’ll have an app that fully meets my own personal tailored requirements. Not a bad result for a worst-case, don’t you think? The same was true of my first and second apps, Peak Scanner and Stay On Track.

I’d urge you to consider the same approach, at least for your first app, therefore.

Go Niche or Mass Market?

Is your app a mass market app, either in a particular country – or even globally? For example, a new kind of messaging platform. Or is your app targeting a niche market, like paragliding or camping holidays in France?

Mass market apps may seem like the fastest route to a billion dollar payday, but the more mass market the idea, the greater likelihood that many developers are already all over it, and therefore the  lesser the chance you have to shine above that – but that should not necessarily put you off, of course!

ps2_screen1_iPhone47

My first app, Peak Scanner, was certainly niche market. It allows walkers and hikers to find out the names of the mountains around them, just by pointing their phone. Even then, there were still four or five other apps doing something similar, but I still manage to achieve revenue of several £1000 a year from it.

My advice would still be to let your personal interests dictate at least your first app choice.

Free or Paid App?

“Excuse me – but I’m trying to make money here! Why on earth would I want to give my app away?”, you exclaim! Don’t panic – I’ve not gone mad. It’s just another option open to you.

Here’s the thing, you put your app for sale, and if John Doe buys it for say £2.29 then you get that money less Apple’s 30% cut and in-country VAT. If the VAT is 20% then that works out to be £1.28. We’re not done yet though – as it’s income you’ll likely have to pay income tax on it too. And that’s it. For £2.29 John Doe has effectively bought the right to use your app on any device he wants, forever. You will get no more money out of him.

So, what to do. Well, you can accept that as I have done, and also accept that the average price of apps continues to fall (to I guess around the £1 mark, like iTunes songs) and you’re strategy is simply to sell to lots and lots of people – after all the market should be big enough. Price to highly though, and maybe only a few will buy. The good news (well, perhaps only perhaps marginally good news) is that you can change the price of your app as often as you like. This allows you to test the market, effectively trying to get to the point of maximum revenue before demand starts to tail off. You are allowed to make any paid app free at any time, but that’s a one-way journey – once an app is made free it remains free in the App Store forever.

Despite the above restrictions, there is a nice trick that some developers play, and introduce a “SuperDuperApp 2 in the course of time. An entirely separate app in the store, but with a link to it from the original app stating, “Like what you’ve seen so far? Then you’ll love this new version!”. And when you release that app, although as far as the App Store is concerned it has a “2” postfix, you can still name the app without the “2” on the user’s phone.

And of course you can make your app completely free. This sounds like a daft way to make money, until you consider these two facilities:

Advertising

If you are happy to allow ads to be shown in your app then you’ll receive revenue on those ad placements. Consider whether the screen layout would allow for this, and whether it might annoy the user. Needless to say such a facility really only generates revenue for mass market apps that a user might look at several times a day.

In-app Purchases

This is where your free app has extra features that can be enabled for a fee (just like an app purchase). All of the management is pretty much all handled for you by the App Store, so you don’t need to worry about that. You would need some extra code in your app to figure out what extra features/capability was purchased.

There are different types of in-app purchases too, so you have some flexibility here:

  • On-off fees for extra capability to be enabled
  • A regular subscription (say annually) for features to remain enabled

The user will be made aware of apps with in-app purchases prior to them downloading, and of course they decide not to download thinking that the app won’t really be useful unless the in-app upgrades are purchased.

If you’re thinking, “hey, I could time limit my app so they have to upgrade later”, unfortunately that seems to be a real no-no, and your app will not likely be approved as a result.

Consider on-going Support

The thing about most apps these days is that they’re not fire and forget. You don’t just release V1.0 then sit back and watch the money roll in until your retirement (although I wish it was like that!)

The trouble is, that on this planet, everything changes – all the time. Whilst that’s a great thing in life, it’s a real headache for app developers. Maybe the online data source you’re using decides to change its API – or worse still, ceases operation? Maybe there is a new version of the operating system that breaks your code? Maybe there’s a new hero iOS device out that you’re app now looks rubbish on?

You name it, it’ll happen, and any inaction here will likely result in bad reviews from those affected – not good.

Not much you can do to mitigate any of this, so, just be prepared, that’s all.

Ok, I’m ready – You’ve Convinced Me To Develop My First App! 🙂

Ah, this is good. Let’s get the show on the road then – here’s a blank sheet of paper and pen to get started:

paper.png

So, what are you waiting for………….?

Hmmm, it’s not easy to get started from nothing at all, eh?

I have some good news for you then…

You Don’t Need to Start From a Blank Sheet of Paper!

Phew! Really? Yes, really. Find out why in Part 3 of this series:

Part 3: Actually Getting Started With Your App Development

This is the second in a series of articles on getting into mobile app development. Feel free to look back at the first article, Mobile App Development – Much Easier Than You Think.

Mobile App Development – Much Easier Than You Think

mobiledev

Are you one of these people who loves all the different apps on your phone, and thinks, “I wish I could write apps – and maybe make some money!” Maybe this thought enters your mind every few months, and you set a To Do reminder to look into it,… but you never seem to get round to it. Or maybe you did get round to it, and had a look at a few websites, but quickly got scared? Don’t worry – if you’d still like to get into it, but don’t quite know how I’ll impart some of my experiences, and who knows? It might spur you into action!

Ok, I’m still reading…

When I said “Mobile App Development – Much Easier Than You Think”, please note I didn’t actually say “Mobile App Development – It’ll Only Take You A Couple Of Days To Become An Expert” – because it won’t. In fact even today, after many, many years of developing software, I’m still learning how to code! Don’t panic though – keep reading – that is a good thing – it totally levels the playing field. If that wasn’t the case, then to get to (say) my level you’d have to invest years and years of your life too. But actually, because technology is always changing, improving, a lot of what I’ve learned over those many, many years is today utterly obsolete – I kid you not! That means even if you have no programming experience you can take a huge short cut to becoming as proficient as most developers. So, whilst you’re still going to have to put a fair amount of effort in, it’s nowhere near as much as think.

So what makes a good mobile app developer? And more importantly, have you got those skills? Well, if I could breakdown the kind of expertise you’d need to acquire to write mobile apps I reckon it comes down to these three things:

  1. How to think logically, procedurally and in terms of objects that are things, have things and can do things.
  2. The basic syntax of a suitable programming language for writing apps.
  3. The names of and how to use all the library functions that the programming language provides to make your app do the stuff you want it to.

And, er, that’s pretty much it. And I think you’ll find out shortly that all three are achievable to you without too much effort.

Let’s look at each in turn:

How to think logically, procedurally and in terms of objects that are things, have things and can do things

Maybe you’ve already had some experience in life writing computer programs, but keep reading as it’s all about objects these days, and early programming languages couldn’t handle that concept. Just skip the parts you already know…

Computer programming languages are essentially a way for a human (hopefully soon, you!) to tell a computer what things you would like it to do, what order you would like those things to be done, and perhaps some conditions under which some of things might not be done. Any computer language provides different types of data structure, starting with basic variables – essentially memory storage of numbers, text strings etc. by reference. Here are some examples:

var apples = 5
var oranges = 7
var firstName = "John"
var lastName = "Doe"
var sex = "male"
var wearsGlasses = true
var hasPassedDrivingTest = true

The var keyword means you are about to assign a value to a new variable name, which you will reference later on in your program. Normally, when you assign a name to a variable, it is lowercase, but to make code more readable, you may need for than one word. To do this, simply stick all the words together and make the first letter of the subsequent words uppercase, like this: “myNewIncrediblySelfExplantoryVariableName“. The more information in the name, the more readable your code will be to another person.

Once you have a bunch of variables, you can start manipulating them. Let’s start with numbers – we can add two numbers together like this:

var applesPlusOranges = apples + oranges

Pretty straight-forward stuff, eh? The answer here would be 12. You can also add strings, like this:

var fullName = firstName + lastName

Because the variables here are test strings not numbers, the computer will know to concatenate the two strings together to get “JohnDoe”. Hmmm, not quite right, so we’ll need to debug our code by adding a space between the first and last name, like this:

var space = " "    // This is needed to create a gap!
var FullName = firstName + space + lastName

Now the result is “John Doe” – all good. You’ve just fixed your first bug. Get used to this, because your code will likely have loads of bugs, and you’ll need to think like a computer to solve them – computers will do exactly what you tell it, and nothing else – and this, whilst logical, will infuriate you at times, because it’s not how we work as humans!

But what’s with the “// This is needed to create a gap!“? Won’t that confuse the computer? The good news is no, because its actually a comment. If the computer sees “//” it simply ignores that and the rest of that line. You’ll eventually find out that the more comments you have in your code, the more your code will make sense when you come back to it years later!

You can already see the beginnings of procedure, essentially the order in which program instructions are to be carried out. The computer will start at the top and execute each line of code in turn until it gets to the end of the program. We can modify this behaviour using conditional instructions, like this example:

if wearsGlasses is true
  var fact = fullName + " wears glasses."
else
  var fact = fullName + " does not wear glasses."

Here, depending on the value of a particular variable we can execute one statement or another. Notice that we’ve been clever here and added the space required after the name in each of the two text strings.

Ok, so far so good. We can step up a level now and look at grouping lines of code together and give that grouping a name, called a function, like this:

function wearsGlassesAndCanDrive()
{
  if wearsGlasses is true and hasPassedDrivingTest is true
    return true
  else
    return false
}

The “{” and “}” indicate to the computer everything inside that function, and a function typically returns some kind of value (it doesn’t have to though). So now we can simply call the function any time we want:

if wearsGlassesAndCanDrive()
  var fact = fullName + " wears glasses."
else
  var fact = fullName + " does not wear glasses."

In essence, functions allow you to structure your code in a meaningful way, particularly for operations that you think you’ll use over and over again.

Ok, we could go on, but I hope that in just the minute or two it took you to get here you’re now thinking, this is pretty easy stuff. Let’s finish our mini-tutorial then and talk about objects:

In life everything is objects, and objects are things, sometimes they have things, and generally they can do things. Take cars, for example. They are things like a make, model and colour. They have things like a built-in Sat Nav or air-conditioning. And they can do things like move around. Modern computer languages allow you define a class, which incorporates everything about a particular object, like this:

class Car
{
  var make = ""
  var model = ""
  var colour = ""
  var horsePower = 0
  var hasSatNav = false
  var hasAirConditioning = false
  var currentLocation = "Dealership"
  var previousLocation = ""

  function moveCarTo(var newLocation)
  {
    previousLocation = currentLocation
    currentLocation = newLocation
  }

  var chipTheEngine()
  {
    horsePower = horsePower + 100
  }
}

Ok, the variables we have created seem sensible – but look, this class has functions inside too – that’s starting to get powerful – because these functions relate only to this object.

Ok, let’s try to use this new car class in a meaningful way. Perhaps we want to write a  computer program that allows the user to build and maintain a list of all the cars they’ve ever owned. We start like this:

var myFirstEverCar = Car()

Ok, straight away, this variable is not like the others – it’s not just a simple number or test string any more – it’s an entire class! How can we use this new variable then? Easy – like this:

myFirstEverCar.make = "Mini"
myFirstEverCar.model = "Cooper"
myFirstEverCar.colour = "A pretty horrid shade of green"
myFirstEverCar.horsePower = 100
myFirstEverCar.hasSatNav = false // Are you joking??
myFirstEverCar.moveCarTo("StreetNextToMyFlat")
var myCurrentCar = Car()
myCurrentCar.make = "Aston Martin"
myCurrentCar.model = "DB10"
myCurrentCar.colour = "Silver Lightning"
myCurrentCar.horsePower = 425
myCurrentCar.chipTheEngine()
myCurrentCar.hasSatNav = true
myCurrentCar.moveCarTo("My lengthy driveway")

I think without me saying too much, you’re beginning to see how objects work. Let’s make a list of our cars:

var allMyCars = array()
allMyCars.add(myFirstEverCar)
allMyCars.add(myCurrentCar)

Computer programming languages also allow lists (called arrays) of particular types of variable – in this case were creating a list of cars, then adding our two cars to that list. But once they’re in the list how do we get the information out? Easy, like this:

var index = 0
var checkColour = allMycars[index].colour
index = index + 1
var checkHorsePower = allMycars[index].horsePower

Can you figure out what the results would be, just by looking at the code?

Ok, enough of our mini programming tutorial then – I’m hoping that you’re already seeing that thinking logically, procedurally and in terms of objects that are things, have things and can do things is actually pretty straight-forward. If that’s the case then you’re already a third of the way there to becoming a half-decent mobile app developer. Really? Yup.

Let’s see how you get on with the next third…

The basic syntax of a suitable programming language for writing apps.

So, here you’re going to have to think about what mobile platform you’re going to start working with. There are essentially two platforms to choose from if you want maximum coverage; Android and iOS. Hmmm… let’s stop for a moment. Is that really true? What about Microsoft, Blackberry etc. Well, of course there are other platforms outside of Android and iOS, but take a look at this:

 

pie2

The market is currently dominated by Android and iOS, and if anything Android’s share of the market is growing year on year – it might even reach 60% in 2016. You might think it’s a foregone conclusion then that you should pick Android, but wait… there’s more too it than that. If your ambition is to make money then in my experience Android is not the way to go. I’ve developed on both Android and iOS, and revenues from Android were only ever 10% of iOS. Why is that? Well, it could be because iOS users typically already have credit cards applied against their iTunes accounts, which makes it easy for them to buy (your app is just a single tap away). On Android it’s not the same. That means if a user is interested to buy your app, if they don’t already have a credit card associated with their Google Play account then you’re app is going to have to be something pretty special to make they add a card. Hmmm, unless you’ve written the next Halo app then that’s a tall order!

Another problem with Android is that is that there are literally thousands of Android devices in the market, all different shapes and sizes, and you’re going to have to work hard to make sure your app works perfectly on them all. And if there’s another thing I’ve learned with mobile app development is that your customers will not hesitate to leave you bad reviews if your app (which works great on Samsung Galaxy) does not work properly on their own particularly obscure Android device.

Contrast this with iOS where there are relatively few device types to support, and your prospective customers already have the means to buy your app with one tap.

Have I put you off Android yet? Sorry. But if you’re out to make money and it’s your first app, then you should choose your platform wisely.

But what if you want to have your cake and eat it? – you want access to all the mobile platforms in one go? Well, you can! You can use one of these cross-platform developer tools:

X_Mobile_FrameworksPlatforms1

The idea is simple – you write using their own language, and it automatically translates what you write into the various platforms. Sounds great eh? But there are some drawbacks:

  • The concept seems sound, but the reality is never as clean – your look and feel will still vary across platforms, so much so that you’ll tear your hair out
  • There is usually a licence fee to pay
  • Your app is limited to the common denominator of what all the platforms support, so if one platform has a super-duper capability (say fingerprint reading) that is not available on some of the other platforms then you can’t easily use it
  • If they go out of business you’re stuck

More on the pros and cons of cross platform support here. I would say that if your app has a relatively simple user interface, and uses widely available mobile phone features (phonebook, location etc.) then one of the above cross-platform tools could work for you.

But… let’s get real for a moment – if its money you want then go where the money is, and you may conclude (as I did the hard way) that the money is actually in iOS. And if you get rich with iOS you can always re-invest that cash into other platforms… But let’s get rich first, yeah?

Ok, I’ll let you into a little secret – if you pick iOS as your platform then a great language to use is Swift. And because it’s a totally brand new language – one which I’ve only been using for a few months now – it would only take you a short amount of time to know how much I know about it. Yes, I may know lots of other programming languages, like C, C++, Java, but those languages (which the exception of Java) are all-but-dead today.

So, if you choose Swift then just just need to learn the syntax (i.e. how to write in Swift – what keywords and symbols to use. That should not take you too long in fact, and Apple provides a Swift Playground so you can start writing code straight away, experimenting with things as much as you want without causing real-world armageddon. You can get started with this right away – just search “swift playground” or try this one I found here.

Ok, hopefully after a few hours effort you’ll be reasonably proficient in the basic Swift syntax, and then you’ll be almost ready to create your first app.

The final third then… Shall we?

The names of and how to use all the library functions that the programming language provides to make your app do the stuff you want it to

Whichever language you pick you will never ever ever learn all of the available library functions, like how to display data on the screen, or find out your current GPS location… But fear not… You don’t have to: Google is your friend.

I really mean that. No matter what you want to do, someone has likely done that before you. Just google the thing you want to do and see what results you get. More often than not you’ll actually get the Swift code you need to do it – just copy and paste in, then customise it for your needs. Here’s an example:

I googled “get the current time swift(notice add the word swift to limit the results to what I want) and I got this code in the first result:

var date = NSDate()
var hour = date.hour

Easy.

Final Thoughts on This, my First Post

Crikey, you’re still reading? This good. Maybe I’m being of some help already then. Ok, I think that should do it for this first post then. The next one will be looking at the issue of what kind of app to write and how to prepare for it, and following that, I’ll share my thought processes around the development of my first app, Peak Scanner.

ps2_screen1_iPhone47

Keep Reading

If you want to keep reading here is the next article in the series:

Part 2: Targeting The Right First App to Develop