How can we help?

Configuring Marketplace Connect (SVOD) on iOS Follow

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 Make Money > 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 Make Money > 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

 

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 Make Money > 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

marketplace-connect-10.png

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_2019-05-14_at_5_19_08_PM-2.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.

Comments

Article is closed for comments.