Skip to content

Commit b95199d

Browse files
committed
Add tvOS support
- Declare tvOS support in Package.swift - Remove unnecessary available annotations - Fix test reference for UID2 target
1 parent e92eeb4 commit b95199d

File tree

9 files changed

+21
-10
lines changed

9 files changed

+21
-10
lines changed

.github/workflows/test-pull-request.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,14 @@ jobs:
1919
- name: Lint code
2020
run: swiftlint lint --config .swiftlint.yml --reporter github-actions-logging
2121

22-
- name: Build
23-
run: xcodebuild -scheme UID2 -sdk iphonesimulator16.2 -destination "OS=16.2,name=iPhone 14"
22+
- name: Build for iOS
23+
run: xcodebuild -scheme UID2 -destination "generic/platform=iOS"
24+
25+
- name: Build for tvOS
26+
run: xcodebuild -scheme UID2 -destination "generic/platform=tvOS"
2427

2528
- name: Run unit tests
26-
run: xcodebuild test -scheme UID2Tests -sdk iphonesimulator16.2 -destination "OS=16.2,name=iPhone 14"
29+
run: xcodebuild test -scheme UID2Tests -sdk iphonesimulator16.2 -destination "OS=16.2,name=iPhone 14"
30+
31+
- name: Run unit tests on tvOS
32+
run: xcodebuild test -scheme UID2Tests -sdk appletvsimulator16.1 -destination "OS=16.1,name=Apple TV"

.swiftpm/xcode/xcshareddata/xcschemes/UID2.xcscheme

+10
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
3030
<Testables>
31+
<TestableReference
32+
skipped = "NO">
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "UID2Tests"
36+
BuildableName = "UID2Tests"
37+
BlueprintName = "UID2Tests"
38+
ReferencedContainer = "container:">
39+
</BuildableReference>
40+
</TestableReference>
3141
</Testables>
3242
</TestAction>
3343
<LaunchAction

Development/UID2SDKDevelopmentApp/UID2SDKDevelopmentApp/Networking/AppUID2Client.swift

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import Foundation
1010
import Security
1111
import UID2
1212

13-
@available(iOS 13.0, *)
1413
internal final class AppUID2Client {
1514

1615
enum RequestTypes: String, CaseIterable {

Package.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ let package = Package(
77
name: "UID2",
88
defaultLocalization: "en",
99
platforms: [
10-
.iOS(.v13)
10+
.iOS(.v13),
11+
.tvOS(.v13)
1112
],
1213
products: [
1314
.library(

Sources/UID2/KeychainManager.swift

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import Foundation
66
import Security
77

88
/// Securely manages data in the Keychain
9-
@available(iOS 13.0, *)
109
internal final class KeychainManager {
1110

1211
/// Singleton access point for KeychainManager

Sources/UID2/Networking/NetworkSession.swift

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import Foundation
99

1010
/// Common interface for networking and unit testing
11-
@available(iOS 13.0, *)
1211
protocol NetworkSession {
1312

1413
func loadData(for request: URLRequest) async throws -> (Data, Int)

Sources/UID2/UID2Client.swift

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import Foundation
99

10-
@available(iOS 13.0, *)
1110
internal final class UID2Client {
1211

1312
private let uid2APIURL: String

Sources/UID2/UID2Error.swift

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import Foundation
99

1010
/// UID2 Specifc Errors
1111

12-
@available(iOS 13.0, *)
1312
enum UID2Error: Error {
1413

1514
/// Unable to decrypt Payload Data

Sources/UID2/UID2Manager.swift

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import Combine
99
import Foundation
1010

11-
@available(iOS 13.0, *)
1211
public final actor UID2Manager {
1312

1413
/// Singleton access point for UID2Manager

0 commit comments

Comments
 (0)