To create a simple analytics backend for my iOS app, what do I need to learn?

I am a self-taught iOS developer, who knows Swift and iOS development only. I don’t have any experience with web development of any kind, including HTML or CSS.

I have an iOS app. I want to create my own analytics service without relying on any third parties. I want to create a simple REST API. I just need to be able to send simple JSON to my server (such as iOS version number, app version installed, iPhone model, etc). I will need that data to be stored in a database. I have a basic GoDaddy Hosting plan with a database.

What resource might help me out? What are the things I need to learn?

It’s a bit of a steep learning curve (at least it was for me), but you could use AWS serverless. They have a free tier which will work well for lower volume. You would likely need to learn and setup: Route53, DynamoDB, Lambda, IAM security, and possibly Cognito if you want to start saving user data etc. If you have low volume this would cost around a dollar a month, you’d have to check their pricing to see where you would maybe end up.

I think it would be easier to use a managed hosting plan and create a rest api using PHP and a MySQL database, but it may cost a little bit more monthly.

There are a ton of other options too, but I haven’t used them.

My last project I used Firebase analytics because it was free and incredibly easy to setup. The drawback is, Google sinks their claws into even more data about people, and their data collection in my opinion is somewhat invasive.

Here are some FCC links that may help:
AWS Serverless
FCC PHP articles

If you can learn iOS and Swift, you can learn ASP.NET Core and C# too. There are plenty of tutorials and example code available for building REST API’s with ASP.NET. A lot of hosting plans provide the framework as well. Try Microsoft’s tutorial site. Good luck!

Your problem sounds pretty simple, so I’ll suggest a simple solution.

You could:

  • Build a Node.js + express app that receives HTTP requests from your mobile app and stores them in a database.
  • Deploy that application on Heroku (a lot simpler that the AWS Lamdba suggestion)

The reasons why I suggests this approach are:

  • You know Swift so JavaScript is not so difficult to learn (in my experience working with Swift developers)
  • Node.js + express in a very common setup for API development, there are many resources on the web, blogs & stack overflow. You are likely to find help
  • Heroku hides the complexity of deploying the many different components of backend systems (infrastructure, load balancer, databases, networking, application, logging, etc.) so you can focus on building the web API instead of fighting with the deployment setup.

There are a couple of resources for this on free code camp:

I hope this help :v: