diff --git a/content/docs/ios/changelog.mdx b/content/docs/ios/changelog.mdx index 0c320da..735ebdd 100644 --- a/content/docs/ios/changelog.mdx +++ b/content/docs/ios/changelog.mdx @@ -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 @@ -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 diff --git a/content/docs/ios/guides/advanced/request-permissions-from-paywalls.mdx b/content/docs/ios/guides/advanced/request-permissions-from-paywalls.mdx index 9830aef..bbfffe9 100644 --- a/content/docs/ios/guides/advanced/request-permissions-from-paywalls.mdx +++ b/content/docs/ios/guides/advanced/request-permissions-from-paywalls.mdx @@ -4,13 +4,17 @@ 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`. -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. ## 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). @@ -18,18 +22,23 @@ The **Request permission** action is rolling out to the paywall editor and is no ## 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. @@ -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. @@ -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. diff --git a/content/docs/ios/index.mdx b/content/docs/ios/index.mdx index 3d3ec2d..dd7bde1 100644 --- a/content/docs/ios/index.mdx +++ b/content/docs/ios/index.mdx @@ -9,7 +9,11 @@ description: "Welcome to the Superwall iOS SDK documentation" Get up and running with the Superwall iOS SDK - + Most common features and use cases @@ -18,13 +22,21 @@ description: "Welcome to the Superwall iOS SDK documentation" Guides for specific use cases - + Example apps for the Superwall iOS SDK Documentation for the Superwall Dashboard - + Guides for troubleshooting common issues @@ -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). - \ No newline at end of file + diff --git a/content/docs/ios/sdk-reference/index.mdx b/content/docs/ios/sdk-reference/index.mdx index 311ab80..113079b 100644 --- a/content/docs/ios/sdk-reference/index.mdx +++ b/content/docs/ios/sdk-reference/index.mdx @@ -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 @@ -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). - \ No newline at end of file + diff --git a/next-env.d.ts b/next-env.d.ts index c4b7818..9edff1c 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -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.