diff --git a/CHANGELOG.md b/CHANGELOG.md index 13b8770be..946414b8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ The changelog for `SuperwallKit`. Also see the [releases](https://github.com/superwall-me/Superwall-iOS/releases) on GitHub. +## 3.5.0-rc.2 + +### Fixes + +- Moves resources into their own resources bundle when installing via CocoaPods. + ## 3.5.0-rc.1 This is our first visionOS pre-release, we'll test this on a few devices to diff --git a/LICENSE b/LICENSE index 4662bb4c4..6b16f6f3a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 Nest22 +Copyright (c) 2024 Nest22 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Sources/SuperwallKit/Misc/Constants.swift b/Sources/SuperwallKit/Misc/Constants.swift index a4e8ae8d8..8f3bdcd96 100644 --- a/Sources/SuperwallKit/Misc/Constants.swift +++ b/Sources/SuperwallKit/Misc/Constants.swift @@ -18,5 +18,5 @@ let sdkVersion = """ */ let sdkVersion = """ -3.5.0-rc.1 +3.5.0-rc.2 """ diff --git a/Sources/SuperwallKit/Models/Triggers/Trigger.swift b/Sources/SuperwallKit/Models/Triggers/Trigger.swift index 8a9a77425..b351a6c82 100644 --- a/Sources/SuperwallKit/Models/Triggers/Trigger.swift +++ b/Sources/SuperwallKit/Models/Triggers/Trigger.swift @@ -10,14 +10,6 @@ import Foundation struct Trigger: Decodable, Hashable { var eventName: String var rules: [TriggerRule] - - init( - eventName: String, - rules: [TriggerRule] - ) { - self.eventName = eventName - self.rules = rules - } } extension Trigger: Stubbable { diff --git a/Sources/SuperwallKit/Network/Device Helper/DeviceHelper.swift b/Sources/SuperwallKit/Network/Device Helper/DeviceHelper.swift index c544ec45f..25fcd84f4 100644 --- a/Sources/SuperwallKit/Network/Device Helper/DeviceHelper.swift +++ b/Sources/SuperwallKit/Network/Device Helper/DeviceHelper.swift @@ -121,21 +121,21 @@ class DeviceHelper { } var interfaceStyle: String { - #if os(visionOS) + #if os(visionOS) + return "Unknown" + #else + let style = UIScreen.main.traitCollection.userInterfaceStyle + switch style { + case .unspecified: + return "Unspecified" + case .light: + return "Light" + case .dark: + return "Dark" + default: return "Unknown" - #else - let style = UIScreen.main.traitCollection.userInterfaceStyle - switch style { - case .unspecified: - return "Unspecified" - case .light: - return "Light" - case .dark: - return "Dark" - default: - return "Unknown" - } - #endif + } + #endif } var platformWrapper: String? diff --git a/Sources/SuperwallKit/Paywall/View Controller/PaywallViewController.swift b/Sources/SuperwallKit/Paywall/View Controller/PaywallViewController.swift index e855cab1f..8f91e5038 100644 --- a/Sources/SuperwallKit/Paywall/View Controller/PaywallViewController.swift +++ b/Sources/SuperwallKit/Paywall/View Controller/PaywallViewController.swift @@ -306,7 +306,7 @@ public class PaywallViewController: UIViewController, LoadingDelegate { } } - func loadingStateDidChange(from oldValue: PaywallLoadingState) { + func loadingStateDidChange(from oldValue: PaywallLoadingState) { switch loadingState { case .unknown: break @@ -341,9 +341,9 @@ public class PaywallViewController: UIViewController, LoadingDelegate { self.shimmerView = nil } ) - } - } - } + } + } + } private func addShimmerView(onPresent: Bool = false) { guard shimmerView == nil else { diff --git a/SuperwallKit.podspec b/SuperwallKit.podspec index 0c788baf0..dfbf4e5b4 100644 --- a/SuperwallKit.podspec +++ b/SuperwallKit.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.license = { :type => 'MIT', :text => <<-LICENSE MIT License - Copyright (c) 2023 Superwall + Copyright (c) 2024 Superwall Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -39,10 +39,12 @@ Pod::Spec.new do |s| s.requires_arc = true s.source_files = "Sources/**/*.{swift}" - s.resources = [ - "Sources/SuperwallKit/**/*.xcassets", - "Sources/SuperwallKit/**/*.xcdatamodeld", - "Sources/SuperwallKit/**/*.cer" - ] + s.resource_bundles = { + 'SuperwallKit' => [ + "Sources/SuperwallKit/**/*.xcassets", + "Sources/SuperwallKit/**/*.xcdatamodeld", + "Sources/SuperwallKit/**/*.cer" + ] + } end