Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions content/docs/ios/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,64 @@ title: "Changelog"
description: "Release notes for the Superwall iOS SDK"
---

## 4.12.8

### Fixes

- Stop logging `paywallWebviewLoad_timeout` events because they were confusing.
- Only refreshes terminated webviews once to avoid infinite reloading loops on low RAM devices.

## 4.12.7

### Fixes

- Fixes microphone permission request to prevent App Store Connect warnings.

## 4.12.6

### Enhancements

- Adds post purchase actions support.

### Fixes

- Fixes a rare issue where TestFlight products could display in a different currency on the paywall than on Apple's payment sheet.

## 4.12.5

### Enhancements

- Adds microphone permission request support.

### Fixes

- Fixes issue where the notification permission prompt would not appear if provisional notification permission was already granted.

## 4.12.4

### Enhancements

- Adds back in contacts and location permission requests but this time will not get flagged in App Store review if they're not being used.
- Adds App Tracking Transparency permission request.

## 4.12.3

### Fixes

- Removes contacts and location permission APIs to prevent App Store warnings.

## 4.12.2

### Fixes

- Fixes issue building for Mac Catalyst.

## 4.12.1

### Enhancements

- Adds `redemptionInfo.paywallInfo.product` which contains information about the product that was purchased. This deprecates `redemptionInfo.paywallInfo.productIdentifier` in favor of `redemptionInfo.paywallInfo.product.identifer`.

## 4.12.0

### Enhancements
Expand All @@ -15,6 +73,32 @@ description: "Release notes for the Superwall iOS SDK"

- Updates Superscript version to 1.0.12. This fixes an issue with `appVersionPadded` comparison. View the original Rust release changelog [here](https://github.com/superwall/superscript/releases/tag/1.0.12).

## 4.11.2

### Fixes

- Deprecates `device.isApplePayAvailable` and defaults it to `true`. This also removes the PassKit import, which was getting flagged for some developers in review.

## 4.11.1

### Fixes

- Fixes issue where `isApplePayAvailable` being calculated off the main thread could cause a crash.
- Fixes potential crashes in WebKit navigation delegate methods.

## 4.11.0

### Enhancements

- Adds the ability to override introductory offer eligibility via the paywall editor.
- Adds dynamic notification support and scheduling.
- Adds `refreshConfiguration()` to manually refresh the SDK configuration. This should only be used in wrapper SDKs in development for hot reloading.
- Adds `offerType`, `subscriptionGroupId` and `store` to `SubscriptionTransaction` and `NonSubscriptionTransaction`.

### Fixes

- Fixes an issue where not all product IDs belonging to `Entitlement`s in `CustomerInfo` were being included.

## 4.10.8

### Enhancements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,41 @@ description: "Trigger the iOS system permission dialog directly from a Superwall
---

## Overview

Use the **Request permission** action in the paywall editor when you want to gate features behind iOS permissions without sending users into your app settings flow. When the user taps the element, SuperwallKit presents the native prompt, reports the result back to the paywall so you can update the design, and emits analytics events you can forward through `SuperwallDelegate`.

<Note>
The **Request permission** action is rolling out to the paywall editor and is not visible in the dashboard just yet. We're shipping it very soon, so keep an eye on the changelog if you don't see it in your editor today.
The **Request permission** action is rolling out to the paywall editor and is
not visible in the dashboard just yet. We're shipping it very soon, so keep an
eye on the changelog if you don't see it in your editor today.
</Note>

## Add the action in the editor

1. Open your paywall in the editor and select the button or element you want to wire up.
2. Set its action to **Request permission**.
3. Choose the permission to request. You can add multiple buttons if you need to prime more than one permission (for example, notification + camera).
4. Republish the paywall. No code changes are required beyond making sure the necessary Info.plist strings exist in your app.

## Supported permissions and Info.plist keys

| Editor option | `permission_type` sent from the paywall | Required Info.plist keys | Notes |
|---------------|-----------------------------------------|--------------------------|-------|
| Notifications | `notification` | _None_ | Uses `UNUserNotificationCenter` with alert, badge, and sound options. |
| Location (When In Use) | `location` | `NSLocationWhenInUseUsageDescription` | Prompts for foreground access only. |
| Location (Always) | `background_location` | `NSLocationWhenInUseUsageDescription`, `NSLocationAlwaysAndWhenInUseUsageDescription` | The SDK first ensures When-In-Use is granted, then escalates to Always. |
| Photos | `read_images` | `NSPhotoLibraryUsageDescription` | Requests `.readWrite` access on iOS 14+. |
| Contacts | `contacts` | `NSContactsUsageDescription` | Uses `CNContactStore.requestAccess`. |
| Camera | `camera` | `NSCameraUsageDescription` | Uses `AVCaptureDevice.requestAccess`. |
| Editor option | `permission_type` sent from the paywall | Required Info.plist keys | Notes |
| ------------------------- | --------------------------------------- | ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| Notifications | `notification` | _None_ | Uses `UNUserNotificationCenter` with alert, badge, and sound options. |
| Location (When In Use) | `location` | `NSLocationWhenInUseUsageDescription` | Prompts for foreground access only. |
| Location (Always) | `background_location` | `NSLocationWhenInUseUsageDescription`, `NSLocationAlwaysAndWhenInUseUsageDescription` | The SDK first ensures When-In-Use is granted, then escalates to Always. |
| Photos | `read_images` | `NSPhotoLibraryUsageDescription` | Requests `.readWrite` access on iOS 14+. |
| Contacts | `contacts` | `NSContactsUsageDescription` | Uses `CNContactStore.requestAccess`. |
| Camera | `camera` | `NSCameraUsageDescription` | Uses `AVCaptureDevice.requestAccess`. |
| Microphone | `microphone` | `NSMicrophoneUsageDescription` | Uses `AVAudioSession.requestRecordPermission()`. |
| App Tracking Transparency | `tracking` | `NSUserTrackingUsageDescription` | iOS 14+ only. Uses `ATTrackingManager.requestTrackingAuthorization()`. |

If a required Info.plist key is missing—or the platform does not support the permission, such as background location on visionOS—the action finishes with an `unsupported` status, and the delegate receives a `permissionDenied` event so you can log the misconfiguration.

> **Note**: In iOS SDK 4.12.3, Contacts and Location permission requests were temporarily removed to prevent App Store warnings. If you need those, update to 4.12.4+.

## What the SDK tracks

Each button tap generates three analytics events that flow through `handleSuperwallEvent(withInfo:)`:

- `permission_requested` when the native dialog is about to appear.
Expand Down Expand Up @@ -66,6 +75,7 @@ func handleSuperwallEvent(withInfo eventInfo: SuperwallEventInfo) {
```

## Status values returned to the paywall

The paywall receives a `permission_result` event with one of the following statuses so you can branch in your paywall logic (for example, swapping a button for a checklist item):

- `granted` – The system reported success.
Expand All @@ -75,6 +85,7 @@ The paywall receives a `permission_result` event with one of the following statu
Because the permissions are requested from real user interaction, you can safely stack actions—for example, ask for notifications first and, on success, show a camera prompt that immediately appears inside the same paywall session.

## Troubleshooting

- See `unsupported`? Double-check the Info.plist keys in the table above and confirm the permission exists on the target OS (background location is not available on visionOS).
- Nothing happens when you tap the button? Make sure the action is published as **Request permission** and that the app has been updated with the new paywall revision.
- Want to show fallback copy after a denial? Configure `PaywallOptions.notificationPermissionsDenied` or handle the `permissionDenied` event in your delegate to display a Settings deep link.
23 changes: 19 additions & 4 deletions content/docs/ios/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ description: "Welcome to the Superwall iOS SDK documentation"
<Card title="Quickstart" icon="sparkles" href="/ios/quickstart/install">
Get up and running with the Superwall iOS SDK
</Card>
<Card title="Common Use Cases" icon="lightbulb" href="/ios/guides/web-checkout">
<Card
title="Common Use Cases"
icon="lightbulb"
href="/ios/guides/web-checkout"
>
Most common features and use cases
</Card>
<Card title="SDK Reference" icon="hammer" href="/ios/sdk-reference">
Expand All @@ -18,13 +22,21 @@ description: "Welcome to the Superwall iOS SDK documentation"
<Card title="Guides" icon="book" href="/ios/guides/using-revenuecat">
Guides for specific use cases
</Card>
<Card title="Example Apps" icon="code" href="https://github.com/superwall/Superwall-iOS/tree/develop/Examples">
<Card
title="Example Apps"
icon="code"
href="https://github.com/superwall/Superwall-iOS/tree/develop/Examples"
>
Example apps for the Superwall iOS SDK
</Card>
<Card title="Dashboard Docs" icon="PanelsTopLeft" href="/dashboard">
Documentation for the Superwall Dashboard
</Card>
<Card title="Troubleshooting" icon="bug" href="https://support.superwall.com/articles/8881818609-troubleshooting-ios-sdk">
<Card
title="Troubleshooting"
icon="bug"
href="https://support.superwall.com/articles/8881818609-troubleshooting-ios-sdk"
>
Guides for troubleshooting common issues
</Card>
</CardGroup>
Expand All @@ -37,4 +49,7 @@ If you have feedback on any of our docs, please leave a rating and message at th

If you have any issues with the SDK, please [open an issue on GitHub](https://github.com/superwall/superwall-ios/issues).

<SdkLatestVersion version="4.12.0" repoUrl="https://github.com/superwall/Superwall-iOS" />
<SdkLatestVersion
version="4.12.7"
repoUrl="https://github.com/superwall/Superwall-iOS"
/>
7 changes: 5 additions & 2 deletions content/docs/ios/sdk-reference/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Overview
description: Reference documentation for the Superwall iOS SDK.
description: Reference documentation for the Superwall iOS SDK.
---

## Welcome to the Superwall iOS SDK Reference
Expand All @@ -15,4 +15,7 @@ If you have feedback on any of our docs, please leave a rating and message at th

If you have any issues with the SDK, please [open an issue on GitHub](https://github.com/superwall/superwall-ios/issues).

<SdkLatestVersion version="4.12.0" repoUrl="https://github.com/superwall/Superwall-iOS" />
<SdkLatestVersion
version="4.12.7"
repoUrl="https://github.com/superwall/Superwall-iOS"
/>
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
import "./.next/types/routes.d.ts";

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.