Skip to content

Commit 24600c5

Browse files
committed
pod lib lint
1 parent f6aef6d commit 24600c5

File tree

3 files changed

+38
-28
lines changed

3 files changed

+38
-28
lines changed

RevenueCat.xcodeproj/project.pbxproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -993,6 +993,7 @@
993993
887A60792C1D037000E1A461 /* UserInterfaceIdiom.swift in Sources */ = {isa = PBXBuildFile; fileRef = 887A5FDB2C1D037000E1A461 /* UserInterfaceIdiom.swift */; };
994994
887A607A2C1D037000E1A461 /* Variables.swift in Sources */ = {isa = PBXBuildFile; fileRef = 887A5FDC2C1D037000E1A461 /* Variables.swift */; };
995995
57B1D7B22F2A1F1800A77E21 /* PaywallSourceEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57B1D7B12F2A1F1800A77E21 /* PaywallSourceEnvironment.swift */; };
996+
57B1D7B42F2A213800A77E21 /* PaywallSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57B1D7B32F2A213800A77E21 /* PaywallSource.swift */; };
996997
887A607B2C1D037000E1A461 /* Bundle+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 887A5FDE2C1D037000E1A461 /* Bundle+Extensions.swift */; };
997998
887A607C2C1D037000E1A461 /* ColorInformation+MultiScheme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 887A5FDF2C1D037000E1A461 /* ColorInformation+MultiScheme.swift */; };
998999
887A607D2C1D037000E1A461 /* ImageLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 887A5FE02C1D037000E1A461 /* ImageLoader.swift */; };
@@ -2443,6 +2444,7 @@
24432444
887A5FDA2C1D037000E1A461 /* TestData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestData.swift; sourceTree = "<group>"; };
24442445
887A5FDB2C1D037000E1A461 /* UserInterfaceIdiom.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserInterfaceIdiom.swift; sourceTree = "<group>"; };
24452446
57B1D7B12F2A1F1800A77E21 /* PaywallSourceEnvironment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PaywallSourceEnvironment.swift; sourceTree = "<group>"; };
2447+
57B1D7B32F2A213800A77E21 /* PaywallSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaywallSource.swift; sourceTree = "<group>"; };
24462448
887A5FDC2C1D037000E1A461 /* Variables.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Variables.swift; sourceTree = "<group>"; };
24472449
887A5FDE2C1D037000E1A461 /* Bundle+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Bundle+Extensions.swift"; sourceTree = "<group>"; };
24482450
887A5FDF2C1D037000E1A461 /* ColorInformation+MultiScheme.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ColorInformation+MultiScheme.swift"; sourceTree = "<group>"; };
@@ -5205,6 +5207,7 @@
52055207
887A5FD72C1D037000E1A461 /* TemplateViewConfiguration.swift */,
52065208
887A5FD82C1D037000E1A461 /* TemplateViewConfiguration+Extensions.swift */,
52075209
887A5FD92C1D037000E1A461 /* TemplateViewConfiguration+Images.swift */,
5210+
57B1D7B32F2A213800A77E21 /* PaywallSource.swift */,
52085211
887A5FDA2C1D037000E1A461 /* TestData.swift */,
52095212
887A5FDB2C1D037000E1A461 /* UserInterfaceIdiom.swift */,
52105213
57B1D7B12F2A1F1800A77E21 /* PaywallSourceEnvironment.swift */,
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// swiftlint:disable missing_docs
2+
//
3+
// PaywallSource.swift
4+
//
5+
//
6+
// Created by RevenueCat on 2/26/25.
7+
//
8+
9+
/// Identifies where a paywall was presented from so that backend analytics can classify the event.
10+
@_spi(Internal) public struct PaywallSource: RawRepresentable, Hashable, Sendable, ExpressibleByStringLiteral {
11+
12+
/// Raw backend identifier describing the source.
13+
public let rawValue: String
14+
15+
public typealias StringLiteralType = String
16+
17+
/// Creates a typed paywall source from a raw backend identifier.
18+
public init(rawValue: String) {
19+
self.rawValue = rawValue
20+
}
21+
22+
/// Allows initializing from string literals (e.g. `PaywallSource("foo")`).
23+
public init(stringLiteral value: StringLiteralType) {
24+
self.init(rawValue: value)
25+
}
26+
27+
}
28+
29+
@_spi(Internal) public extension PaywallSource {
30+
31+
/// Source identifier used when the paywall originated from Customer Center.
32+
static let customerCenter: PaywallSource = "presented_from_customer_center"
33+
34+
}
35+
// swiftlint:enable missing_docs

RevenueCatUI/Data/PaywallSourceEnvironment.swift

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,6 @@ import SwiftUI
1111

1212
#if !os(tvOS)
1313

14-
// swiftlint:disable missing_docs
15-
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
16-
@_spi(Internal) public struct PaywallSource: RawRepresentable, Hashable, Sendable, ExpressibleByStringLiteral {
17-
18-
public let rawValue: String
19-
20-
public typealias StringLiteralType = String
21-
22-
/// Creates a typed paywall source from a raw string.
23-
public init(rawValue: String) {
24-
self.rawValue = rawValue
25-
}
26-
27-
/// Allows initializing from string literals (e.g. `PaywallSource("foo")`).
28-
public init(stringLiteral value: StringLiteralType) {
29-
self.init(rawValue: value)
30-
}
31-
}
32-
// swiftlint:enable missing_docs
33-
34-
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
35-
@_spi(Internal) public extension PaywallSource {
36-
37-
/// Source identifier used when the paywall originated from Customer Center.
38-
static let customerCenter: PaywallSource = "presented_from_customer_center"
39-
40-
}
41-
4214
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
4315
private struct PaywallSourceKey: EnvironmentKey {
4416

0 commit comments

Comments
 (0)