You need a server which running a web page for you. This web page should have a text field which takes user email to identify each user uniquely, a button to start download your app, and a label to holds some information about what's going on?. When a user request to share the app with his/her friends, your server should generate a url. Which shall be something like, http://yourapp.com/share?referral=<USER_ID>
, this will be unique for each users in your system and who wants to share. When a user will give the link to their friends and if any of the friend would open this link then, he/she needs to input his/her email address (or mobile number) into that textfield and when he/she would tap on Download
button then you need to update an entry into your database for that particular user and referral, and your app would start downloading (not exactly read ahead). It'll open AppStore if webpage is opened from iDevice. Please look after for each case can be possible with this.