GO FURTHER, FASTER: Try the Swift Career Accelerator today! >>

Storing Users to log into my app

Forums > SwiftUI

Hi All,

I am very new to app development but have been developing with PHP, JS for some time (keen amateur).

I have started building an app that will be used for interviewing staff - a personal project that that will very likely never see the light of day - but its learning eh...?

I started building and then i realised that if i wanted several people to be using it at the same time, it feels like i need a way to log in.

I will work out how to make the log in functionality but my question is - where should i be storing the user information.

My first thought was a mysql database, with a php api - i know how to build this.

What would be the best way considering best practices coming from people who do this for a living.

I would appeciate as much information as you are willing to give me on this. It sounds like swift data is not appropraite and json, clearly not.

Second question, i am using a mysql database - can anyone provide any compelling reason as to why this may be suboptimal and if there are better options i should be investogating.

Third question, if it came to storing user settings, should i continue to use the mysql database or should i then be using user defaults for these small settings.

And then last question - when programming for the web, i would normally store something in session data that lets the application know that the user has authenticated and that they are logged in - else, go back to the logged out screen - is there a similar process in swiftui?

Kind Regards

Adam

   

Hacking with Swift is sponsored by RevenueCat.

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's all new Paywall Editor allow you to remotely configure your paywall view without any code changes or app updates.

Click to save your free spot now

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

Reply to this topic…

You need to create an account or log in to reply.

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.