@@ -9,7 +9,7 @@ import SwiftUI
99
1010/// A SwiftUI paywall view that you can embed into your app.
1111///
12- /// This uses ``Superwall/getPaywall(forEvent :params:paywallOverrides:delegate:)`` under the hood.
12+ /// This uses ``Superwall/getPaywall(forPlacement :params:paywallOverrides:delegate:)`` under the hood.
1313///
1414/// - Warning: You're responsible for the deallocation of this view. If you have a `PaywallView` presented somewhere
1515/// and you try to present the same `PaywallView` elsewhere, you will get a crash.
@@ -21,10 +21,10 @@ public struct PaywallView<
2121 @State private var hasLoaded = false
2222 @Environment ( \. presentationMode) private var presentationMode
2323
24- /// The name of the event , as you have defined on the Superwall dashboard.
25- private let event : String
24+ /// The name of the placement , as you have defined on the Superwall dashboard.
25+ private let placement : String
2626
27- /// Optional parameters you'd like to pass with your event . Defaults to `nil`.
27+ /// Optional parameters you'd like to pass with your placement . Defaults to `nil`.
2828 ///
2929 /// These can be referenced within the rules
3030 /// of your campaign. Keys beginning with `$` are reserved for Superwall and will be dropped. Values can be any
@@ -60,11 +60,11 @@ public struct PaywallView<
6060
6161 /// A SwiftUI paywall view that you can embed into your app.
6262 ///
63- /// This uses ``Superwall/getPaywall(forEvent :params:paywallOverrides:delegate:)`` under the hood.
63+ /// This uses ``Superwall/getPaywall(forPlacement :params:paywallOverrides:delegate:)`` under the hood.
6464 ///
6565 /// - Parameters:
66- /// - event : The name of the event , as you have defined on the Superwall dashboard.
67- /// - params: Optional parameters you'd like to pass with your event . These can be referenced within the rules
66+ /// - placement : The name of the placement , as you have defined on the Superwall dashboard.
67+ /// - params: Optional parameters you'd like to pass with your placement . These can be referenced within the rules
6868 /// of your campaign. Keys beginning with `$` are reserved for Superwall and will be dropped. Values can be any
6969 /// JSON encodable value, URLs or Dates. Arrays and dictionaries as values are not supported at this time, and will
7070 /// be dropped.
@@ -84,15 +84,15 @@ public struct PaywallView<
8484 /// - Warning: You're responsible for the deallocation of this view. If you have a `PaywallView` presented somewhere
8585 /// and you try to present the same `PaywallView` elsewhere, you will get a crash.
8686 public init (
87- event : String ,
87+ placement : String ,
8888 params: [ String : Any ] ? = nil ,
8989 paywallOverrides: PaywallOverrides ? = nil ,
9090 onRequestDismiss: ( ( PaywallInfo , PaywallResult ) -> Void ) ? = nil ,
9191 onSkippedView: ( ( PaywallSkippedReason ) -> OnSkippedView ) ? = nil ,
9292 onErrorView: ( ( Error ) -> OnErrorView ) ? = nil ,
9393 feature: ( ( ) -> Void ) ? = nil
9494 ) {
95- self . event = event
95+ self . placement = placement
9696 self . params = params
9797 self . paywallOverrides = paywallOverrides
9898 self . onRequestDismiss = onRequestDismiss
@@ -140,7 +140,7 @@ public struct PaywallView<
140140 hasLoaded = true
141141 Task {
142142 await manager. getPaywall (
143- forPlacement: event ,
143+ forPlacement: placement ,
144144 params: params,
145145 paywallOverrides: paywallOverrides
146146 )
@@ -154,10 +154,10 @@ public struct PaywallView<
154154extension PaywallView where OnSkippedView == Never , OnErrorView == Never {
155155 /// A SwiftUI paywall view that you can embed into your app.
156156 ///
157- /// This uses ``Superwall/getPaywall(forEvent :params:paywallOverrides:delegate:)`` under the hood.
157+ /// This uses ``Superwall/getPaywall(forPlacement :params:paywallOverrides:delegate:)`` under the hood.
158158 ///
159159 /// - Parameters:
160- /// - event : The name of the event , as you have defined on the Superwall dashboard.
160+ /// - placement : The name of the placement , as you have defined on the Superwall dashboard.
161161 /// - params: Optional parameters you'd like to pass with your event. These can be referenced within the rules
162162 /// of your campaign. Keys beginning with `$` are reserved for Superwall and will be dropped. Values can be any
163163 /// JSON encodable value, URLs or Dates. Arrays and dictionaries as values are not supported at this time, and will
@@ -174,13 +174,13 @@ extension PaywallView where OnSkippedView == Never, OnErrorView == Never {
174174 /// - Warning: You're responsible for the deallocation of this view. If you have a `PaywallView` presented somewhere
175175 /// and you try to present the same `PaywallView` elsewhere, you will get a crash.
176176 public init (
177- event : String ,
177+ placement : String ,
178178 params: [ String : Any ] ? = nil ,
179179 paywallOverrides: PaywallOverrides ? = nil ,
180180 onRequestDismiss: ( ( PaywallInfo , PaywallResult ) -> Void ) ? = nil ,
181181 feature: ( ( ) -> Void ) ? = nil
182182 ) {
183- self . event = event
183+ self . placement = placement
184184 self . params = params
185185 self . paywallOverrides = paywallOverrides
186186 self . onErrorView = nil
@@ -194,11 +194,11 @@ extension PaywallView where OnSkippedView == Never, OnErrorView == Never {
194194extension PaywallView where OnSkippedView == Never {
195195 /// A SwiftUI paywall view that you can embed into your app.
196196 ///
197- /// This uses ``Superwall/getPaywall(forEvent :params:paywallOverrides:delegate:)`` under the hood.
197+ /// This uses ``Superwall/getPaywall(forPlacement :params:paywallOverrides:delegate:)`` under the hood.
198198 ///
199199 /// - Parameters:
200- /// - event : The name of the event , as you have defined on the Superwall dashboard.
201- /// - params: Optional parameters you'd like to pass with your event . These can be referenced within the rules
200+ /// - placement : The name of the placement , as you have defined on the Superwall dashboard.
201+ /// - params: Optional parameters you'd like to pass with your placement . These can be referenced within the rules
202202 /// of your campaign. Keys beginning with `$` are reserved for Superwall and will be dropped. Values can be any
203203 /// JSON encodable value, URLs or Dates. Arrays and dictionaries as values are not supported at this time, and will
204204 /// be dropped.
@@ -216,14 +216,14 @@ extension PaywallView where OnSkippedView == Never {
216216 /// - Warning: You're responsible for the deallocation of this view. If you have a `PaywallView` presented somewhere
217217 /// and you try to present the same `PaywallView` elsewhere, you will get a crash.
218218 public init (
219- event : String ,
219+ placement : String ,
220220 params: [ String : Any ] ? = nil ,
221221 paywallOverrides: PaywallOverrides ? = nil ,
222222 onRequestDismiss: ( ( PaywallInfo , PaywallResult ) -> Void ) ? = nil ,
223223 onErrorView: @escaping ( Error ) -> OnErrorView ,
224224 feature: ( ( ) -> Void ) ? = nil
225225 ) {
226- self . event = event
226+ self . placement = placement
227227 self . params = params
228228 self . paywallOverrides = paywallOverrides
229229 self . onRequestDismiss = onRequestDismiss
@@ -237,11 +237,11 @@ extension PaywallView where OnSkippedView == Never {
237237extension PaywallView where OnErrorView == Never {
238238 /// A SwiftUI paywall view that you can embed into your app.
239239 ///
240- /// This uses ``Superwall/getPaywall(forEvent :params:paywallOverrides:delegate:)`` under the hood.
240+ /// This uses ``Superwall/getPaywall(forPlacement :params:paywallOverrides:delegate:)`` under the hood.
241241 ///
242242 /// - Parameters:
243- /// - event : The name of the event , as you have defined on the Superwall dashboard.
244- /// - params: Optional parameters you'd like to pass with your event . These can be referenced within the rules
243+ /// - placement : The name of the placement , as you have defined on the Superwall dashboard.
244+ /// - params: Optional parameters you'd like to pass with your placement . These can be referenced within the rules
245245 /// of your campaign. Keys beginning with `$` are reserved for Superwall and will be dropped. Values can be any
246246 /// JSON encodable value, URLs or Dates. Arrays and dictionaries as values are not supported at this time, and will
247247 /// be dropped.
@@ -261,14 +261,14 @@ extension PaywallView where OnErrorView == Never {
261261 /// - Warning: You're responsible for the deallocation of this view. If you have a `PaywallView` presented somewhere
262262 /// and you try to present the same `PaywallView` elsewhere, you will get a crash.
263263 public init (
264- event : String ,
264+ placement : String ,
265265 params: [ String : Any ] ? = nil ,
266266 paywallOverrides: PaywallOverrides ? = nil ,
267267 onRequestDismiss: ( ( PaywallInfo , PaywallResult ) -> Void ) ? = nil ,
268268 onSkippedView: @escaping ( PaywallSkippedReason ) -> OnSkippedView ,
269269 feature: ( ( ) -> Void ) ? = nil
270270 ) {
271- self . event = event
271+ self . placement = placement
272272 self . params = params
273273 self . paywallOverrides = paywallOverrides
274274 self . onErrorView = nil
0 commit comments