Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.2.0 #134

Merged
merged 35 commits into from
Jul 12, 2024
Merged

1.2.0 #134

merged 35 commits into from
Jul 12, 2024

Conversation

ianrumac
Copy link
Collaborator

1.2.0

Changes in this pull request

Enhancements

  • Adds DSL methods for configuring the SDK. You can now use a configuration block:
    fun Application.configureSuperwall(
          apiKey: String,
          configure: SuperwallBuilder.() -> Unit,
    )

This allows you to configure the SDK in a more idiomatic way:

   configureSuperwall(CONSTANT_API_KEY){
      options {
        logging {
          level = LogLevel.debug
        }
        paywalls {
          shouldPreload = false
        }
      }
  }

Deprecations

This release includes multiple deprecations that will be removed in upcoming versions.
Most are internal and will not affect the public API, those that will are marked as such and a simple migration
path is provided. The notable ones in the public API are as follows:

  • Deprecated DebugViewControllerActivity in favor of DebugViewActivity

  • Deprecated PaywallViewController in favor of PaywallView

    • Deprecated belonging methods:
      • viewWillAppear in favor of beforeViewCreated
      • viewDidAppear in favor of onViewCreated
      • viewWillDisappear in favor of beforeOnDestroy
      • viewDidDisappear in favor of destroyed
      • presentAlert in favor of showAlert
  • Deprecated PaywallViewControllerDelegate in favor of PaywallViewCallback

    • Deprecated belonging methods:
      • didFinish in favor of onFinished
  • Deprecated PaywallViewControllerEventDelegate in favor of PaywallViewEventCallback

    • Users might also note deprecation of PaywallWebEvent.OpenedUrlInSafari in favor of PaywallWebEvent.OpenedUrlInChrome
      • didFinish in favor of onFinished
  • In Superwall, the following methods were deprecated:

    • Superwall.paywallViewController in favor of Superwall.paywallView
    • Superwall.eventDidOccur argument paywallViewController in favor of paywallView
    • Superwall.dismiss in favor of `Superwall.presentPaywallView
    • Superwall.presentPaywallViewController in favor of Superwall.presentPaywallView
  • Deprecated Paywallmanager.getPaywallViewController in favor of PaywallManager.getPaywallView

  • Deprecated DebugManager.viewController in favor of DebugManager.view

  • Deprecated DebugViewController in favor of DebugView

  • Deprecated LogScope.debugViewController in favor of LogScope.debugView

  • Deprecated PaywallPresentationRequestStatus.NoPaywallViewController in favor of NoPaywallView

Checklist

  • All unit tests pass.
  • All UI tests pass.
  • Demo project builds and runs.
  • I added/updated tests or detailed why my change isn't tested.
  • I added an entry to the CHANGELOG.md for any breaking changes, enhancements, or bug fixes.
  • I have run ktlint in the main directory and fixed any issues.
  • I have updated the SDK documentation as well as the online docs.
  • I have reviewed the contributing guide

ianrumac and others added 30 commits June 25, 2024 13:16
Add screenshot testing support & workflow
…gates with callbacks and safari with browser
Deprecate ViewController methods in favor of Android names and accessors
Add idiomatic DSL for prettier configuration
…dd teardown support to JS evaluators to use with tests
@ianrumac ianrumac merged commit 5305202 into main Jul 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant