question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[IOS] Subscribing promoted/introductory subscription

See original GitHub issue

Version of react-native-iap :

4.5.2

Version of react-native :

ejected expo SDK38 0.62.2

Platforms you faced the error :

IOS only

Expected behavior

As already mentioned by closed issue #978 , it is not clearly stated if it is possible or not and how one can activate promoted subscriptions offer (not product, but subscription based offer). Reference : https://developer.apple.com/app-store/subscriptions/#offer-types

_Note for Android : even if the topic is iOS here, for Android, it’s easy to setup on Play Store an intro offer (free trial period), it is well activated with iap without any additional configuration. 👍 _

Actual behavior

When I list subscriptions, I have in the record a discounts entry including an offer that matches the one I’ve setup in AppStoreConnect : here an annual subscription with 1 month of trial

[ { 
    productId: 'com.XXX.sdk38.annual',
    subscriptionPeriodUnitIOS: 'YEAR',
    description: 'Activate Premium features on XXX',
    introductoryPrice: '',
    title: 'Annual',
    introductoryPriceSubscriptionPeriodIOS: '',
    introductoryPriceNumberOfPeriodsIOS: '',
    discounts: 
     [ { localizedPrice: '€0,00',
         numberOfPeriods: '1',
         type: 'SUBSCRIPTION',
         identifier: 'com.XXX.sdk38.tryannual',
         paymentMode: 'FREETRIAL',
         price: '0',
         subscriptionPeriod: 'MONTH' } ],
    type: 'Do not use this. It returned sub only before',
    localizedPrice: '€54,99',
    introductoryPricePaymentModeIOS: '',
    price: '54.99',
    currency: 'EUR',
    subscriptionPeriodNumberIOS: '1'
 }

If I try to activate the subscription with “com.XXX.sdk38.tryannual”, it tells me that productID does not exists. If I activate with “com.XXX.sdk38.annual”, it buys the subscription but without the trial period. If I setup an introductory offer and activate with “com.XXX.sdk38.annual”, it buys the subscription with the trial period.

Tested environment :

Real device iPhone 6S 13.x, sandbox account

Steps to reproduce the behavior

Ouch ! Maybe it just need a documentation update or clarification 😉

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:5

github_iconTop GitHub Comments

2reactions
doyomaycommented, Sep 30, 2020

I was having the same issue and for the “withOffer” object you need to get your signed from your backend.

first, you need to follow this steps to get your key and privatekey https://help.apple.com/app-store-connect/#/dev689c93225

and when you get this values, you need to follow this tutorial, is an example with nodejs at the backend

https://developer.apple.com/documentation/storekit/in-app_purchase/subscriptions_and_offers/generating_a_subscription_offer_signature_on_the_server

cheers.

0reactions
stale[bot]commented, Jul 8, 2021

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Implementing Promotional Offers in Your App - Apple Developer
Offer discounted pricing for auto-renewable subscription products to ... you can use introductory offers and promote the in-app purchase on the App Store....
Read more >
In-App Promotions: Introductory & Promotional Offers for iOS
Customers are eligible for one introductory offer per subscription group; Can be used to acquire new customers. Only one current and one future...
Read more >
iOS Subscription Offers: How They Work - SaaStr
The SKProductDiscount class is the same class used for introductory offers and includes information like the price, the payment mode, number of ...
Read more >
Ultimate guide on Apple Subscription Offers. Part 1 - Adapty
You can set up a Subscription Offer, the catch-all term used by Apple in three ways: as an Introductory Offer, Promotional Offer, ...
Read more >
How to increase the subscription revenue using ... - Apphud
Read how to integrate subscription offer into your iOS app. ... subscriptions or promote an upgrade to another subscription at a special ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found