-1

After searching Google for my question, all I could find was Ad-hoc distribution options and tutorials, and it seems the results are over saturated for questions such as mine.

I simply need to make a method in my program that brings up the typical share options (action sheet) to allow my user to select ALL/ANY of the available options to inform his or her contacts about downloading my app, via any means of which the iOS divide is capable.

I'm hoping this can be handled by the iOS since I don't yet know the URL to the App Store to download my app.

EDIT: I'm a bit annoyed with the fact that so many people have rushed to mark this as a duplicate when in fact it is not. The link to the pre existing question is that of an EMAIL ONLY share option. As above, i clearly state: "I simply need to make a method in my program that brings up the typical share options to allow my user to select all the available options to inform his or her contacts about downloading my app." EMAIL IS NOT ALL THE OPTIONS THAT ARE AVAILABLE...!

phpN00b
  • 138
  • 13
  • 1
    How do you want the friend to be notified about your app? Email? Text message? Carrier Pigeon? – rmaddy May 12 '14 at 01:29

2 Answers2

3

To use the inbuilt API for the share options like the image below, you will have to import the Social Framework.

enter image description here

Check out the following SO questions:

Community
  • 1
  • 1
aksh1t
  • 5,410
  • 1
  • 37
  • 55
2

To address the last part of your question: You can know the URL to your App Store page even before it's in stores.

As soon as you create the app in iTunes Connect, your app is associated with a link that can be found by right-clicking on the "View in App Store" button within your app's iTunes Connect information. When creating your "share options," this is the link you should share in order to link to your page in the app store.

As far as programming the actual sharing goes, you'll need to be more specific about the type of sharing you want to do. If you want to share via Facebook or Twitter for example you'll need to use the relevant SDK/API to do so; if you want to share via email, you can use MFMailComposeViewController or perhaps an SMTP client; if you want to share via SMS, you can use MFMessageComposeViewController or an SMS service like Twilio... all depends...

Edit: Someone just now down-voted this answer, probably just because there was no mention of the action sheet; but the initial question had no mention of an action sheet until 5 days after its post. Like aksh1t said, yes, you can use the Social framework in that case.

Lyndsey Scott
  • 37,080
  • 10
  • 92
  • 128