Skip to content

Commit bde9939

Browse files
committed
fix demo & preview urls
1 parent 4e13a15 commit bde9939

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ApphudSDK.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'ApphudSDK'
3-
s.version = '4.0.0-beta3'
3+
s.version = '4.0.0-beta4'
44
s.summary = 'Build and Measure In-App Subscriptions on iOS.'
55
s.description = 'Apphud covers every aspect when it comes to In-App Subscriptions from integration to analytics on iOS and Android.'
66
s.homepage = 'https://github.com/apphud/ApphudSDK'

Sources/ApphudUI/ApphudView.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ internal class ApphudView: WKWebView {
6666

6767
public func replaceProductsInfo(infos: [[String: any Sendable]]) {
6868

69-
if ((self.url?.absoluteString.contains("demo=true")) != nil && (self.url?.absoluteString.contains("preview=true")) != nil) {
69+
let urlString = self.url?.absoluteString ?? ""
70+
71+
if (urlString.contains("demo=true") && urlString.contains("preview=true")) {
7072
self.viewDelegate?.apphudViewDidExecuteJS(error: nil)
7173
return
7274
}

0 commit comments

Comments
 (0)