UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Sharing backend DB between iOS and Android app

Forums > Server-side Swift

Hi, I’m designing a data driven app.

The UI deliberately simple, reflecting the state of remote data.

The app, potentially thousands+ users, will be able to share/publish into the backend.

The app will be iOS, iPadOS, macOS initially but I want to also create an Android version. (There might be a supporting webapp also. )

Please advise on the most appropriate components.

I’ve been researching.
On the Apple side it’s definitely Swift (Xcode). On the Google side - Kotlin. For them both (and the webapp) the shared backend - Vapor perhaps?

Any thoughts will be greatly appreciated. Thanks.

5      

Do you have experience with some other web frameworks? Vapor might be cool but other technologies are more mature and have tons of tutorials, SO answers available. For example with Django Rest Framework you can create basic REST API in one evening

5      

Many thanks for your reply.

I have mainly Java background, learning Swift. (Hence here :-)

Just been reading some more, perhaps going in the web framework direction might be a bit of an overkill right now. Might cloudKit be good enough for my needs? Or to be used as a starting point, encapsulated so that it can be replaced if necessary.

Also, there seems to be a way of coding Swift for Android, so perhaps no need for Kotlin either.

Many thanks in advance for any thoughts .

5      

Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.

Click to save your free spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

CloudKit could work very well and you wouldnt have to manage your own backend but it wont work on Android I think. On the other hand there is CloudKit JS for frontend so maybe you could somehow use it for Android

5      

Thanks again, very useful insight.

I'm still reading and some say that Firebase is the bees knees. Going to read some more.

Any experience/thoughts anyone? Thanks in advance.

5      

And another one just cropped up - Amazon Web Services.

Any thougts? Thanks. (going to continue reading :-)

5      

After some deliberating I've decided to run my own DB, probably integrated within a web framework. New questions - which one and how/where to host it. Again, thanks for any thoughts/advice.

5      

I am running my stuff on DigitalOcean. It is not the cheapest but they have very pleasant admin UI where stuff is easily accessible and also tons of helpful guides.

Since you have Java background it seems like finding good REST framework for it could work well? I am really fond of Django as I mentioned but Python is quite a departure from languages like Swift and Java.

5      

Looking again in the direction of Vapor. I’ve a spare old iMac (mid 2011) that I want to use as a server, to deploy Vapor to run my RESTfull app.

It seems that Vapor needs Swift toolchain installed, to be run. And Swift cannot be installed on macOS without Xcode. And Xcode won’t install on this iMac. Where am I wrong?

The development is done separately on brand new MacBook.

Some Linux could be used but I can’t wipe off the macOS, for hysterical reasons ;-)

Thanks for any thoughts.

5      

You want to have the iMac as a production server? I would not recommend that. Normal computers arent designed to run as a server and it could cause you a lot of headache. Plus what if your app explodes in popularity and your server suddently cannot handle that? You also need pretty fast internet connection.

5      

No, this is for protoyping only. Thanks.

5      

You would build a vapor app to handle the routes for requests and then hoist it into Heroku cloud hosting. It will live up there and you can shut all your computers off and sleep peacefully. This app will interface with the DB that is inside of your Heroku account.

5      

Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.

Click to save your free spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.