You can't patent most types of software. There are over 70,000 patent classifications recognised by the World Intellectual Property Organisation (and its those classifications which are now recognised and used by most countries, including here in the UK):
http://web2.wipo.int/classifications/ipc/ipcpub/#refresh=page
If something you invent (or develop) isn't listed there, then you can't take out a patent on it.
Further, patent applications are difficult, expensive and time consuming. In the UK only 1 in 20 of personal applicants for patents actually get them granted so, unless you use a patent agent, your chances of getting a patent are far from good. Using a patent agent typically costs around £4,000 but you'd then need to pay again for patent applications around the world. Given that it usually take 5 years to obtain a UK patent, it wouldn't be a quick process either!
Fortunately though, while it's usually impossible to patent software, 'original non-literary written work' (which includes software code) is automatically
copyrighted from the moment that you create it. You can't formally register that copyright though, simply because there's no official process for doing so. However you're free to declare your rights as the copyright holder by, for example, using the © symbol and/or stating "Copyright Fred Roberts 2016. Unauthorised copying, including for development purposes, prohibited".
So you should forget about patents (because they're almost certainly not applicable to your apps anyway) and concentrate on copyright. As stated above, your work needs to be 'original'. As long as it genuinely is, you'll automatically hold the copyright and be protected from legal action.