iOS SDK

For Adapty iOS SDK to work you need to enter a couple of keys.

A part of iOS related settings

Field

Description

Bundle ID

Your app bundle ID

App Store Connect shared secret

A key for receipts' validation and preventing fraud in your app. Read below how to find it

Subscription Key

A key for using Subscription Offers. Read below how to find it

App Store Connect subscription status URL

URL that is user to enable server2server notifications from the App Store to monitor and respond to users' subscription status changes

Push notifications certificates

To send Push notifications in Promo campaigns Adapty certificate to sign them. Adapty support both dev and prod certificates

App Store Connect shared secret

Adapty uses this key for receipt verification. This key is app specific be sure to generate it for each of your apps.

However, you can generate one Master Shared Secret and use one key for all your apps. Just choose Master Shared Secret as an option when generating shared secret.

Navigate to any of your apps and jump into In-App Purchases section on the left.

Code generation link will be on the right.

Generate a Shared Secret or Master Shared Secret and copy it.

Subscription Key

Subscription key is used for Subscription offers. For example, you can offer user up front payment for 6 months with 40% discount and after that user will pay monthly. To generate subscription key:

  1. Log in into App Store Connect and open Users and Access

Click + and generate subscription key

2. Generate a Subscription key and Download it as a .p8 file

3. Upload .p8 file to Adapty and copy-paste KEY ID from

Paste KEY ID and upload .p8 file

App Store Connect subscription status URL

Apple offers server-to-server notifications, so you can instantly be notified about subscription events.

Adapty helps you with that. The only thing you need to do is to set Subscription url inside your App Store Connect to Adapty status URL.

  1. Copy App Store Connect subscription status URL in Adapty App Settings

To copy simply click on a copy icon on the right

This URL is specific to each of your apps. So if your have multiple apps, you need to set different URLs

2. Sign in into your App Store Connect account and on the app's main page and paste URL to Subscription Status URL field

Subscription status URL is on the down right coner

Push notifications

With Adapty you can automate promo campaigns in Push notifications. For that, Adapty needs a certificate to securely sign notifications. It takes a several steps to generate and may take about 15 minutes.

Create a signing certificate

Open Keychain Access and on the upper menu choose Keychain Access -> Certificate Assistant -> Request a Certificate From a Certificate Authority.

Choose Request a Certificate From a Certificate Authority

Enter your email and name and save certificate to a disk. It'll be names like CertificateSigningRequest.certSigningRequest.

Create a folder to save all files in one place. For example, name it Adapty Push Certificates

Enter email, choose save to disk

Create an Identity and Apple Certificate

Open Apple Developer and then Certificates -> Identifiers.

Identifiers

Choose your identifier, activate Push Notifications and hit Save.

Activating Push Notifications

Do not configure/edit Push Notifications settings on the page above. It's a legacy stuff. The method below allows you create certificate much easier.

Go to Certificates section and start new certificate generation

Creating a new certificate

Scroll down and select Apple Push Notification service SSL (Sandbox & Production)

Choose your Identifier and upload a certificated generated on your Mac earlier

And download a certificate as aps.cer file.

Open the aps.cer file in the Keychain and export in as a p12 file.

Export certificate as p12 file

Please be sure that you choose Certificate category! Otherwise you can't export it a p12 file. Yeap, that's super weird.

The last thing, convert your p12 file to a plain text. Open terminal and enter a command

openssl pkcs12 -in cert.p12 -nodes > open_cert.p12

change cert.p12 to your file name.

And the last, upload a certificate to Adapty.

Upload p12 certificate