开发者

How to implement an iOS app personalized start page?

开发者 https://www.devze.com 2023-04-02 14:33 出处:网络
I\'m developing my first iOS app and I\'m facing a challenge. I\'d like to present new users a personalized screen when the app starts at the first time. Let me explain more.

I'm developing my first iOS app and I'm facing a challenge.

I'd like to present new users a personalized screen when the app starts at the first time. Let me explain more.

The flow should be more or less like this:

  1. My app isn't installed on the user's device.
  2. Then the user gets an SMS on his iPhone with a short message and a link to install my app. The message is part of a conversation. Another user of this app had sent this message (through my backend) in order to join this user to the conversation.
  3. This install URL doesn't necesarrily link directly to the itunes store, it can link to a conversations specific link such as myapp.com/conv/12345
  4. The page at myapp.com/conv/* will detect the device and if it's an iPhone would redirect the user to the appstore to install myapp.
  5. The user then installs myapp and launches it.
  6. Now I'd like to present the same conversation 12345 to the user, before he even needs to login, register or what have you. That's the difficult part... I don't want the user to start an a blank page, I'd like to take it right to the conversation 12345 page.

I assume steps 1-5 are easy, but I can't think of a way to implement 6. I admit that I'm not familiar enough with the intrinsic of the appstore but as far as my understanding goes, "all apps are made equal", I mean the app itself when it gets installed it has no context, it doesn't know what "caused" it to be installed, it isn't aware of the click on myapp.com/conv/12345. Is this correct?

  • If there was a way for an app to know something like a referrer URL for the instllation or something along these lines that would be awesome.
  • If there was a way for app to query the device for its phone number then I could make this work (b/c the SMS was sent to a specific phone number, so I can track the most recent conversation sent to this number on my backend). But since apps are sandboxed, accessing the phone number is off limit.
  • Well, I suppose I could ask the user to type a unique code from the SMS when the app starts, say 12345 and then I'd be able to display the conversation to him. But that's problematic in two ways, first, security - the user can join a conversation not meant for him, and second, that's less than optimal user experience, I want this to work like magic, I don't want to make users memorize and type strings into my app the first time they install, I'm sure they won't appreciate it... (they could copy-paste, but still...)
  • Another option is asking the user to type his phone number. But that again has a few drawbacks, one is that again it's less than optimal UX, I'm asking a user to type his phone number to an app he doesn't yet know or trust, second I'll need to verify (authenticate) the phone nu开发者_JS百科mber, I mean what prevents that user from typing a phone number that doesn't belong to him?
  • If I had access to the SMSs then I could dig up that code, but I find it hard to believe that apps get access to SMSs, it's just sounds like another reasonable sandbox restriction. Of course I'm not speaking of jailbroken devices.

BTW, if the user just went over to the appstore to install my app (and didn't go through a conversation SMS) that's fine, in this case I'll just present a normal register/login page. The interesting case is where the user was already part of the conversation when receiving the SMS and now I want him to (effortlessly) become part of the same conversation through my app.

To sum up - is there a trick to present "personalized" pages the first time an app is installed and launched that would get that user right into the context of the conversation sent to him over SMS without having to request additional input?

Thanks!


It's impossible to do. Your application is installed without the knowledge you need whatsoever. As you pointed out, it's a reasonable sandboxing restriction.

What you could do is a challenge-response based system, but it would be about as intrusive to the user as is registering/login in.


Ran, you can keep a flag in NSUserDefaults (equivalent to Android's SharedPreferences) http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSUserDefaults_Class/Reference/Reference.html

0

精彩评论

暂无评论...
验证码 换一张
取 消