Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to fully automate iOS in-app purchase creation/editing/deletion in iTunes Connect?

I'm working iOS client for a site where users can create and sell courses. Since Apple wants all the purchasable products in iOS app to be available as in-app purchases, I need a way to automate that in-app purchases generation. For now I've read 'App Metadata Specification' and 'Transporter User Guide' docs and that seems like a way to do it: generate metadata package when any course edited (created or deleted) and automatically (some script?) feed it to transporter. But I'm lacking playground and experience here - app is not in AppStore yet. So I can't play with in-app purchases for it. So I wonder about that created via transporter in-app purchases: will they be immediately available for sale? What if I need to change for example name of in-app purchase (because course on server got it's name edited). Should I just upload package with the whole bunch of in-app purchases?

PS good example of my app I want to be like is Udemy: lots of courses available as in-app purchases, each course represented by it's own non-consumable product (since product title while purchasing matches course name)

like image 908
HARDWARRIOR Avatar asked Aug 20 '14 16:08

HARDWARRIOR


People also ask

How do I set up automation on my iPhone?

Open the Home app on your iPhone, iPad, iPod touch, or Mac and go to the Automation tab. Tap or click the automation. Turn Enable This Automation on or off.


1 Answers

Yes, there is. It's Spaceship - a ruby gem part of fastlane that uses web scraping to interact with Apple's web services.

I added 45 IAPs to ITC in under 10 minutes with screenshots and all by:

  • Creating a .csv file with the data for my IAPs
  • Making a ruby script using fastlane that uploads the IAPs

Instructions on how to do the same I did: https://goodkindoflazy.com/2017/12/11/automating-iap-creation-in-itunes-connect/

The gist of it is this, which I found in this blogpost:

app.in_app_purchases.create!(
    type: Spaceship::Tunes::IAPType::NONCONSUMABLE, 
    versions: {
      "en-US" => {
        name: "Display name",
        description: "Description has at least 10 characters"
      }
    },
    reference_name: "IAP reference name",
    product_id: "com.your.app.consumable",
    cleared_for_sale: true,
    review_notes: "A note for a reviewer",
    review_screenshot: "/Users/you/Desktop/iap.jpg", 
    pricing_intervals: 
      [
        {
          country: "WW",
          begin_date: nil,
          end_date: nil,
          tier: 1
        }
      ] 
)
like image 102
Abel Dantas Avatar answered Sep 28 '22 10:09

Abel Dantas