New User (Again)

Discussion in 'iOS Programming' started by oo7ml, Aug 8, 2014.

  1. oo7ml macrumors 6502

    Joined:
    Jan 20, 2010
    #1
    Hi,

    I have just built a small messaging app where users sign up with their mobile number, and a verification code is then sent to their mobile.

    As soon as a user enters their name on the Sign Up screen, the account is created and the status is set to ‘created’.

    Once the enter their phone number, the account status is updated to ‘pending’.

    As soon as the enter the verification code, the account status is set to ‘live’.



    How should i handle the following case:

    A user signs up and is live on the app. They use it for 1 week, sending and receiving messages. The user looses their phone, and downloads the app on their new replacement phone, however the mobile number is the same as their previous account.

    What is the best option:

    A - allow the user to sign up on multiple devices with the same number (does this mean push notifications will be sent out to all of the devices AND all data will be downloaded to two devices)
    B - make the mobile number unique and destroy all the previous data when a user enters a new mobile number AND verification code (if they have entered the verification code, then they obviously own the phone, so we should delete all previous data for this person)
    C - any other suggestions

    Thanks in advance for your help.
     
  2. markyr17 macrumors 65816

    markyr17

    Joined:
    Apr 8, 2010
    #2
    I would say a.

    The user still has to verify their phone number when creating the new account

    The other suggestion is, why not make it so the user can log into their old account if they get a new device instead of creating a new one?
     
  3. oo7ml thread starter macrumors 6502

    Joined:
    Jan 20, 2010
    #3
    Hi, thanks for your reply. My only worry with A is, that several phones could then access the same account.

    I don't want to get users to create usernames and passwords... i want to keep the onboarding process very simple, similar to Whatsapp
     
  4. PinkyMacGodess macrumors 68040

    PinkyMacGodess

    Joined:
    Mar 7, 2007
    Location:
    Midwest America.
    #4
    The only way around the sending to two devices issue with A is to also, on account creation, snag a unique identifier for the device. It makes management perhaps difficult in the what if you mention. Someone gets a new phone, the unique ID will change, then what? How does the user update their account with the new phone data. Although having that unique ID for the device also adds security so that if someone clones the phone number, they can't get to the messages. I don't know what's available programmatically for the iPhone. IMEI? Serial number? Would it be worth the trouble on the backend?
     
  5. oo7ml thread starter macrumors 6502

    Joined:
    Jan 20, 2010
    #5
    Yeah good point. It's only an edge case, so i think it would probably be best to just delete all of their old data once they verify their number again and then just start them from new again (lose your phone, lose your data :)

    They are only messages so it's not like it is really important information.

    My only worry is, would there be a conflict if two+ live phones were using the same number, because all a user needs to do is receive the verification code, and they could do that multiple times over for several different phones... so would there be a problem.
     
  6. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #6
    No, push notifications are sent to individual devices, via the device token that you receive when the device registers for remote notifications.

    Local and Push Notification Programming Guide
     
  7. oo7ml thread starter macrumors 6502

    Joined:
    Jan 20, 2010
    #7
    Ah ok cool so based on that, we should destroy all old data for previous number, and start fresh?
     
  8. PinkyMacGodess macrumors 68040

    PinkyMacGodess

    Joined:
    Mar 7, 2007
    Location:
    Midwest America.
    #8
    I guess it would depend on the time that the device is lost. I'd not take too kindly to having all of my data disappear because I lost my phone, but if it's spelled out up front that 'you lose, you lose', there shouldn't be any surprises. Maybe a few irate users, but...

    You say 'previous number' and in your example you say that the number doesn't change. Confused...

    If 'new' number is different, wipe the data. If 'new' number is same, give option to save?
     
  9. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #9
    You should use the feedback service to determine if you should continue attempting to send notifications to devices where the app no longer exists.
     
  10. oo7ml thread starter macrumors 6502

    Joined:
    Jan 20, 2010

Share This Page