“Gift App” from inside the app

后端 未结 3 1115
难免孤独
难免孤独 2020-12-22 17:56

I noticed that on the latest angry birds update they added a feature to gift your app from inside the app.

Up till now I knew you can gift paid apps from the iTunes

3条回答
  •  执念已碎
    2020-12-22 18:38

    I have here some step-by-step instructions in how to add a 'Gift This App' button into your app:

    1. Add a button in your XIB and add an action to it.

    2. In your .m add the actions brackets e.g:

      -(IBAction)actionName {
      
      } 
      
    3. add this code in and replace APP_ID with the number in the apps web page link for e.g. itunes.apple.com/au/app/[APPNAME]/id**APP_ID**?mt=8

      this is a code e.g:

      - (IBAction)actionName 
      {
          [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/giftSongsWizard?gift=1&salableAdamId=**[APP_ID]**&productType=C&pricingParameter=STDQ"]];
      }
      

    Hope this helps!

提交回复
热议问题