Is it possible to delete a user from a server if they delete your app from their phone?
I am using UUID to create users so they do not have to register but I do not want users to delete the app then rejoin and have a new uuid while the old one is still in the database.
Are there any alternatives to using UUID to avoid registering. Apparently UDID which would have been ideal has been deprecated for IOS 6 and upwards.
Please help, thanks in advance.
Alternatively,
You can create a service in App that ping server once a day. if any device didnt respond from long time then delete it from database.
You can't know if user deleted your app or not. So the method you mentioned is not possible.
One-way is, if you are using any advertisement in your app, you will get the advertisement identifier. It's unique for a device, so if user installs your app again, you will get the same advertisement identifier and you can identify the user. But I won't recommend this method, as I can sell my phone at anytime and the new owner can use your app. But he will be considered as old user in this scenario.
So my suggestion is keep a login for individual users. There are a lot of pitfalls in this approach also. You can't identify whether the app is deleted or not. Also same user can create multiple usernames and use it from same device.
You can save DeviceId into database associated with your user and then check if that device is already registered, delete old one and set new UUID. You can get DeviceId like following:
[[UIDevice currentDevice] identifierForVendor].UUIDString;
This will be the same for all your apps(on the appstore) but unique for device
I think that you can't catch delete event with your application.
Also, check this link as well:
Can I know when the user delete my app?
instead of catching a delete event what you can do is store the user info in your database, if the same user tries to join again throw a prompt indicating the user is already present and don't allow him to sign up
Related
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.
Is anyone aware of a method to get the user's App Store nickname? I know about the CloudKit method fetchUserRecordIDWithCompletionHandler, but this returns the user first and last name, not the nickname that the user uses to e.g. write reviews on iTunes.
Thanks
Using fetchUserRecordIDWithCompletionHandler and discoverUserInfoWithUserRecordID is the only way to get information about the current iCloud user.
Besides that you do have to be aware that starting from iOS 9 you wont't get the first and last name anymore only a displayname. For more info see https://developer.apple.com/library/prerelease/ios/documentation/CloudKit/Reference/CKDiscoveredUserInfo_class/index.html#//apple_ref/swift/cl/c:objc(cs)CKDiscoveredUserInfo
I want to know who the user is without them actually logging in. There are bunch of methods on the internet and the one I am currently using is:
static let DeviceId = UIDevice.currentDevice().identifierForVendor.UUIDString
The problem is this resets when the user deletes and reinstalls my app. Also somehow this value changes in about 1-5% of the users without them actually deleting the app. It happens after they upgraded to a new iOS version. Possibly happens when they change appstore country too.
I want the user id to be unique no matter whatever the user does. Kind of like how Whisper app works.
What is the best way to do this? Advertising identifier looks really good on paper, but does apple allow using that just for user login info?
Should I use keychain? icloud? Is there some other value I can use?
Here are some sources I read about this topc:
http://tinymission.com/post/ios-identifierforvendor-frequently-changing
http://possiblemobile.com/2013/04/unique-identifiers/
How to preserve identifierForVendor in ios after uninstalling ios app on device?
In iOS7 my application is automatically updated... Is there any way I can release an update of my app and make the plist or something so that the app will NOT be auto-updated by the device, but instead users will only get the update if the manually go to the AppStore and update it?
This is not possible. You need to find a way to notify your users their app has been updated. For example, alert your users the first time their open the app that it has been updated.
Clash of Clans app prompts an alert telling that there is a new update available. The caveat is that this is a online game so the user needs to have internet access to play it. If the user expects to use your application offline and you previously stored an information that the app needs an update and you don't allow the user use it can be frustrating.
I'm developing an application which holds a list of objects.
The user should be able to favorite some of these objects, which then gets saved for easy access. Simple enough, right.
However, in addition to that, I want it so that the application notifies the user (using a notification, like when you get a new SMS), whenever one of the favorited objects have had something changed (in my application the objects represent a pub, and a change to the pub is when it has a new event scheduled). The change is done on a remote server, using a webpage.
When my app is active I can just poll the server every few minutes and compare the properties of the object, and if I see a change notify the user.
But how will I do to make this work when my app is NOT in the foreground? I want the user to get a notification even if he/she is not currently running my app.
The app does not have any login-functionality, so I can't send out specific push notifications to specific users. So the only thing the server might have access to is perhaps the device ID. I.e. there is no real way for the server to know which favorites a device ID holds.
Is there some smart way to do this? On Android I can just use polling but as iOS doesn't allow code to run in the background in the same way I don't really know how to do.
All help greatly appreciated. Even if it's just a "I don't think that's possible".
Just create a table that associates device ID with favorites. When a favorite changes, send that device ID a push notification
The user is the device ID