-
Notifications
You must be signed in to change notification settings - Fork 3
iOS App Extensions
: add warning to mention that purchases aren't allowed
#157
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can do a callout in a more typical markdown style and Readme will pick it up.
> 🚧 Purchases aren't allowed on extensions
>
> Even though you can configure the SDK, it's only read-only. Purchasing will not work because extensions don't have access to the parent's app Bundle and therefore can't extract the receipt after a purchase.
https://www.revenuecat.com/docs/readme-markdown-tutorial#callouts
I just copied this example from another file. @vegaro is that what the block will get converted to? |
afaik that block won't get changed by GH automation. Readme will parse both those (legacy) json-style blocks and their own flavored markdown |
Hmm I'm confused, this is what we use for code blocks now too. |
Both versions work:
and
They are equivalent. The first one is preferred because it's the new way of doing callouts. |
…lowed We had a customer recently try to purchase directly from a Safari extension. Hopefully calling out this limitation will save time for some people.
9099d41
to
f0800b5
Compare
Oooh I understand. I thought the second version was the new format, I understand what you meant now @rglanz-rc. I updated this. |
Gotta update this to make sure it's correct for |
@vegaro this is so goooood |
PreviewsSee contentsTo set up products for Android devices, start by logging into Google Play Console. Google Play Console is Google's central hub for managing app releases, testing, in-app purchases, and more. This guide assumes basic knowledge of Google Play Console, as well as having an app set up and ready for adding in-app purchases. For more information, visit Google's documentation and guides for Google Play Console. Create an In-App Product or Subscription
To create an in-app product or subscription, go to Google Play Console's 'All Applications' page and select your app from the list. In the sidebar, select the Products dropdown. Depending on your in-app product type, you will either choose In-app products or Subscriptions. After clicking Create, provide a couple pieces of metadata to Google:
Tips for creating robust product IDsAfter you use a Product ID for one product in Google Play Console, it can’t be used again across any of your apps, even if the product is deleted. It helps to be a little organized here from the beginning - we recommend using a consistent naming scheme across all of your product identifiers such as:
For example, using this format the identifier for your first product that grants access to a "premium" subscription would be:
Create a base planFor subscription products, you'll need to add a base plan. Base plans define a billing period, price, and renewal type for purchasing your subscription. Customers never purchase a subscription product directly, they always purchase a base plan of a subscription. Click "Add base plan" and fill out the associated fields. Make sure to set a price, and click "Activate". Since Google introduced multiple base plans with Billing Client 5, it's good practice to be as clear as possible when naming your plans, such as: [block:callout] [block:callout] [block:callout] (Optional) Create an offerIf you wish to create an offer for your base plan, you can do so from the subscription page by clicking "Add offer". Offers can be free trials, discounts, or simply special price setups that apply when a customer first purchases a subscription. You can then select a product ID, eligibility, and offer phases. Making Subscriptions Editable, InAppProduct APIRevenueCat does not use the InAppProduct API for subscriptions. You are safe to make subscriptions editable, unless you are manually using this API outside of RevenueCat. This is related to this notice: If you are relying solely on RevenueCat for your subscriptions, you can safely select "Make editable". Integrate with RevenueCatIf you're ready to integrate your new Google Play in-app product with RevenueCat, continue our product setup guide . See contentsApp Extensions in iOS are an important component of the iOS ecosystem that are supported by RevenueCat. The most popular use of App Extensions for subscription apps are Today Widgets and iMessage apps. Configuring for App ExtensionsTo enable data sharing between the main app and extensions, you'll need to use Xcode or the Developer portal to enable app groups for the containing app and its contained app extensions. Then, register the app group in the portal and specify the app group to use in the containing app. After you enable app groups, you will be able to access a user's active subscriptions in your App Extension by configuring Purchases with a custom UserDefaults that's shared across your App Extension. Purchases.configure(
with: Configuration.Builder(withAPIKey: <your_api_key)
.with(appUserID: <app_user_id>)
.with(userDefaults: .init(suiteName: <group.your.bundle.here>))
.build()
) Now the app extension and parent app can both use the shared UserDefaults suite.
|
We had a customer recently try to purchase directly from a Safari extension. Hopefully calling out this limitation will save time for some people.