Configuring Marketplace Connect (SVOD) on iOS Configuring Marketplace Connect (SVOD) on iOS

Configuring Marketplace Connect (SVOD) on iOS

Tomas Dieguez Tomas Dieguez

This guide acts as complementary documentation to Creating an iOS App with our App Template. The purpose of this article is to guide Zype users through configuring Marketplace Connect in the iOS template. This article covers updating the iOS template in XCode, setting up in-app purchases in the Apple marketplace, and testing the iOS app prior to public release.

Note: This article covers subscription purchases only.

Summary

  1. Unlock Marketplace Connect
  2. Update app in XCode
  3. Set Privacy Policy and Terms of Service links
  4. Configure In-App Purchases on App Store Connect
  5. Configure In-App Purchases on Zype Admin

If you have not already done so, please contact Zype to unlock Marketplace Connect. You can do so with the Contact Zype to learn more button under the Marketplace Connect Setup tab under any subscription plan on the Zype platform.

  • You can access a plan under VIDEO CRM > Settings > Subscription Plans

marketplace-connect-2.png

 

ZypeCommon.h

Inside the ZypeCommon.h file inside the Zype/Utilities folder

marketplace-connect-1.png

update the following:

#define kZypeAppId @"ZypeAppID" // Find by going to app under Zype Admin -> Video Apps

#define kZypeSiteId @"ZypeSiteID" // Ask Zype Support for your site id

#define kNativeSubscriptionEnabled YES // Set to "YES"

#define kZypeSubscriptionIds [NSArray arrayWithObjects: @"monthly_plan_id", @"yearly_plan_id", nil] // Set the plan ids to match your subscription plans on the Zype platform

*Make sure you fill in the kZypeSubscriptionIds above with the corresponding Subscription Plans' IDs found in your Zype Account on VIDEO CRM > Settings > Subscription Plans. You will find the relevant ID by scrolling down to the bottom of the page after selecting the plan.

Zype___Plan__Monthly_Plan.jpg

XCode App Capabilities

Under your project in XCode, go to the project settings (click the blue icon in the directory) and go to the Capabilities tab in the project settings. Enable In-App Purchase.

marketplace-connect-3.png

 

Apple requires that apps with IAPs show the user the appropriate info before they purchase IAPs. Among the required info is your privacy policy and your terms of service. If you have not already configured these for another app, you will need to do the following on the Zype platform:

1. Create a "content" Zobject Type. The Zobject Type should have a title of "content" and a custom attribute of "link" with the String type

ios-privacy-policy-1.png

2. After creating the "content" Zobject Type, create "content" Zobjects for privacy_policy_url and a terms_of_service_url. The titles are case sensitive and the links should be links to your privacy policy and terms of service on your website. The links appear on the IAP selection screen and will redirect the user to these links when clicked.

ios-privacy-policy-2.png

 

In order to set up your In-App Purchases on App Store Connect, you will need to do the following:

1. Have an Apple Developer account with a valid Paid Applications Contract. You can submit your info for a contract under App Store Connect > Agreements, Tax and Banking. Once it is active, you should be able to create your in-app products

2. Select your app under App Store Connect. If you have not created it yet, you need to do the following:

  • Create your Apple App ID under the Apple Developer portal
  • Create your app with the same app id under App Store Connect

3. Create your In-App Purchases by going to your app under App Store Connect. Under Features > In-App Purchases, there should be a (+) button that will allow you to create a new In-App Purchase. You should select an Auto-Renewable Subscription as your IAP type. Make sure your subscriptions have a status of Active or Ready to Submit after saving.

marketplace-connect-4.png

4. When creating multiple subscription products, e.g. premium, standard, and basic subscription plans, you can add them to the same Subscription Group. All products inside the Subscription Group must be ordered from highest to lowest in order to ensure subscription upgrades and downgrades are processed properly. Read Apple's documentation on how to configure this here.

 

Configure In-App Purchases on Zype Platform

1. Get the product id(s) for your In-App Purchase(s) and save them on the Zype Platform. To do this, go your subscription plan(s) under VIDEO CRM > Settings > Subscription Plans. Select your plan and add your IAP's product id under the Marketplace Connect Setup tab. The marketplace field should be set to itunes when saving the product id.

marketplace-connect-5.png

Screen_Shot_2021-02-09_at_2.03.16_PM_copy.png

As part of this step, you'll need to make sure that your product settings match between the Zype Platform and App Store Connect. This includes product price, currency, billing interval, interval count, trial days and discount amount. If your product settings do not match between the Zype Platform and App Store Connect, you may experience issues with plan updates. In the case where an In App Purchase is set with a Free Trial, but this is not reflected on the Zype Plan side, the subscription will be created with in active state instead of trialing state. 

Confirming your product settings is also managed under VIDEO CRM > Settings > Subscription Plans. You can read more about configuring these fields in the Zype Platform here.

 

2. After saving your IAP(s) on both Zype platform and App Store Connect, an App-Specific Shared Secret needs to be created. NOTE: Only Apple accounts with Admin level permissions can create shared secrets under App Store Connect. You can check your permissions in App Store Connect under Users and Access

marketplace-connect-5.1.png

 

marketplace-connect-7.png

3. After creating the shared secret, update Zype Admin with this secret key for the Zype platform to have permission to validate iTunes Receipts on your behalf. The Zype platform receives the iTunes Receipt after the user purchases the subscription in app and will confirm that the receipt is for a valid subscription.

Screen_Shot_2021-02-09_at_2_35_48_PM.png

4. Save the Subscription Status URL under your app on App Store Connect. This URL is a webhook URL which tells Apple where to send notifications when a user updates their iTunes subscription (i.e. renews, cancels or changes subscription). This URL will allow Zype to receive notifications for your users' subscriptions and properly update the associated subscriptions on the Zype platform. To find this, go to: App Store Connect -> your app -> App Store tab -> App Store Information -> App Information -> General Information

  • Your Subscription Status URL should be saved in this format: https://mkt.zype.com/v1/itunes/hook/{ site ID }/{ app ID }
  • The site id and app id should match what you have in your ZypeCommon.h file from the app code

marketplace-connect-8.png

5. After you have saved the Subscription Status URL, you also need to associate the right IAPs to your app. To do this go to the iOS App under the App Store tab of your app on App Store Connect. Under the In-App Purchases section, there should be a (+) button next to the section header that will allow you to add the IAPs to your iOS app. Select and save the IAPs for your iOS app.

  • If you do not save the IAPs, they will not appear in your iOS app.

marketplace-connect-9.png

6. After saving your IAPs for your iOS app, everything is configured for native, in-app subscription purchases using Zype's Marketplace Connect.