I'm creating login and registration page in iOS using Parse.com. Now if a user is logged in in one device than same user is logging in in different device than the first logged in device should get logged out.
How to achieve this thing in iOS objective C?
You could create a "logged in"-token for each device, based on device id. When you log in as a user, the current device id is stored in this field.
Then, every time your app is opened, it performs a check against this device id. If the stored device id does not match the current device id, you log out the user.
Related
I am trying to make an application that when user logged in once, user will not log in again. In Android, i can get Android ID but in iOS, i cannot get anything unique. When user deletes the app, unique id changes. I tried to get identifierForVendor but it changes too. Is there a solution to get a uuid does not change when user deletes the app?
I am Developing an App, that needs Registration, After launch Screen it shows Registration Screen. After Registration it allows to move on home Screen, and then any Task can be performed on the App.
Now I want my App to save the username and password into device, and on Launch, Application automatically registers the user.
if registration Successfully Achieved, then it automatically shows HomeScreen.
So my Question is, How do I achieve this?
I am beginner, Any Suggestion will be appreciated.
Thanks in Advance.
You should not to save password on your device. It's very not adviser to do that.
At the login, your API should return a session token. It is this one you have to save on device in Keychain. On launch, just retrieve the token in Keychain to be sure there is a session and go to HomeScreen, otherwise log out the user.
You can use this Lib https://github.com/matthewpalmer/Locksmith
You can use UserDefaults or Keychain.
https://developer.apple.com/reference/foundation/userdefaults
https://developer.apple.com/library/content/documentation/Security/Conceptual/keychainServConcepts/iPhoneTasks/iPhoneTasks.html
I am new to Swift and is currently developing an Multipeer Connectivity app for a course project. The app also has an online log-in feature that stores each user information in Firebase(the backend support).
Once the app gets wifi connection, I want to have a 'friends list' feature in my app and add other app users to this list from the nearby devices found. So far, the only way I could think of is to associate the peerID with an existing app user from Firebase. However, according to the documentation, peerID seems to be associated with the device itself so if two different users used the same device to sign in, this approach can't really work. Is there a better way to achieve my goal?
In my opinion, it depends on what do you want to go with your application as well as how you develop it regarding your business. One of possibility is that one user as a point of time is just registered one device. So you can provide a simple login screen that users will enter their name then map it with device id and save to Firebase. The username is considered as user id as well. So if they try to sign in from another device, you will check whether or not it existed in the system. if existed, ask them that wish to register this device or not, then update your map (user id and device id) from Firebase.
From your friend list, it is still a list of the username of your friends,in which you can add any nearby devices found.
I am getting started with Xamarin iOS and writing an app that requires the user to log in, using their phone number (which can hopefully be pulled from the phone via API). What I would like is the first time they use the app, to see log in and sign up buttons. Sign up takes them through a storyboard to enter information which ends up saving their details in my server database so their account is now open. Log in will check if their phone number is registered and if so, sign them in to the app based on their phone number.
However if the app closes or the phone restarts, I would like them to be automatically logged in the next time they open the app, if they have previously created an account.
I am reading a lot of tutorials on sign up/login screens but none talk about how to have an "automatic" log-in option once they have authenticated, at least until they manually click the log out button. Lots of apps do this so Im sure it should be trivial, can anyone point me in the right direction? Do I have to store a value in the iOS file system or preferences folder structure? Maintain a local iOS DB with these settings?
iOS has a NSUserDefaults class that let's you store small bits of user configuration data in a persistent manner.
You can also use the iOS Keychain to securely store user credentials.
i have requirement where in my app i can send some data as attachment via email to people in my contact. when the user opens attachment, it opens with the help of my app and saves the data in the receiver's app's database. also actions assigned to that person gets saved in his device's calendar as an event. the problem is that i will be sending the data to multiple recipients and action tasks assigned to everyone, so i need to know the receiving person's identity to save only task assigned to him in his device's calendar as event. now the requirement given to me is when creating action task for each person i also need to save his email-id[as person is selected from contacts stored in that device], so if i can find the receiver's email id i can identify tasks assigned to only him and save to his calendar.
As This is not possible to get Configured Email details in iOS Device (in Non Jailbroken device, no idea with Jail broken device) it breaks user privacy.