Skip to content

Commit 066f11f

Browse files
test fixes
1 parent 775315c commit 066f11f

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

UnitTests/SwiftTests/MParticle/MParticleSceneDelegateTests.swift

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ final class MParticleSceneDelegateTests: MParticleTestBase {
4141

4242
// MARK: - Method Existence Tests
4343

44+
@available(tvOS 13.0, *)
4445
func test_handleURLContext_methodExists() {
4546
// Verify the method exists with correct signature
4647
XCTAssertTrue(mparticle.responds(to: #selector(mparticle.handleURLContext(_:))))
@@ -51,19 +52,6 @@ final class MParticleSceneDelegateTests: MParticleTestBase {
5152
XCTAssertTrue(mparticle.responds(to: #selector(mparticle.handleUserActivity(_:))))
5253
}
5354

54-
// MARK: - handleURLContext Tests
55-
// Note: Testing with mock URLContext is complex due to system class limitations
56-
// These tests focus on method availability and basic functionality
57-
58-
func test_handleURLContext_availabilityCheck() {
59-
// Verify the method is only available on iOS 13+
60-
if #available(iOS 13.0, *) {
61-
XCTAssertTrue(mparticle.responds(to: #selector(mparticle.handleURLContext(_:))))
62-
} else {
63-
XCTAssertFalse(mparticle.responds(to: #selector(mparticle.handleURLContext(_:))))
64-
}
65-
}
66-
6755
// MARK: - handleUserActivity Tests
6856

6957
func test_handleUserActivity_invokesAppNotificationHandler() {
@@ -117,7 +105,9 @@ final class MParticleSceneDelegateTests: MParticleTestBase {
117105

118106
func test_bothMethods_exist() {
119107
// Verify both SceneDelegate support methods exist
120-
XCTAssertTrue(mparticle.responds(to: #selector(mparticle.handleURLContext(_:))))
108+
if #available(tvOS 13.0, *) {
109+
XCTAssertTrue(mparticle.responds(to: #selector(mparticle.handleURLContext(_:))))
110+
}
121111
XCTAssertTrue(mparticle.responds(to: #selector(mparticle.handleUserActivity(_:))))
122112
}
123113
}

mParticle-Apple-SDK.xcodeproj/project.pbxproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2368,6 +2368,7 @@
23682368
"$(inherited)",
23692369
);
23702370
INFOPLIST_FILE = ./UnitTests/Info.plist;
2371+
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
23712372
MARKETING_VERSION = 1.0;
23722373
PRODUCT_BUNDLE_IDENTIFIER = "com.mparticle.mParticle-Apple-SDK-NoLocationTests";
23732374
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -2380,6 +2381,7 @@
23802381
SWIFT_OBJC_BRIDGING_HEADER = "./UnitTests/mParticle_iOS_SDKTests-Bridging-Header.h";
23812382
SWIFT_VERSION = 5.0;
23822383
TARGETED_DEVICE_FAMILY = "1,2,3";
2384+
TVOS_DEPLOYMENT_TARGET = 15.6;
23832385
};
23842386
name = Debug;
23852387
};
@@ -2396,6 +2398,7 @@
23962398
"$(inherited)",
23972399
);
23982400
INFOPLIST_FILE = ./UnitTests/Info.plist;
2401+
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
23992402
MARKETING_VERSION = 1.0;
24002403
PRODUCT_BUNDLE_IDENTIFIER = "com.mparticle.mParticle-Apple-SDK-NoLocationTests";
24012404
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -2408,6 +2411,7 @@
24082411
SWIFT_OBJC_BRIDGING_HEADER = "./UnitTests/mParticle_iOS_SDKTests-Bridging-Header.h";
24092412
SWIFT_VERSION = 5.0;
24102413
TARGETED_DEVICE_FAMILY = "1,2,3";
2414+
TVOS_DEPLOYMENT_TARGET = 15.6;
24112415
};
24122416
name = Release;
24132417
};
@@ -2625,6 +2629,7 @@
26252629
CURRENT_PROJECT_VERSION = 1;
26262630
DEVELOPMENT_TEAM = DLD43Y3TRP;
26272631
INFOPLIST_FILE = ./UnitTests/Info.plist;
2632+
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
26282633
MARKETING_VERSION = 1.0;
26292634
PRODUCT_BUNDLE_IDENTIFIER = "com.mparticle.mParticle-Apple-SDKTests";
26302635
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -2636,6 +2641,7 @@
26362641
SWIFT_OBJC_BRIDGING_HEADER = "./UnitTests/mParticle_iOS_SDKTests-Bridging-Header.h";
26372642
SWIFT_VERSION = 5.0;
26382643
TARGETED_DEVICE_FAMILY = "1,2,3";
2644+
TVOS_DEPLOYMENT_TARGET = 15.6;
26392645
};
26402646
name = Debug;
26412647
};
@@ -2648,6 +2654,7 @@
26482654
CURRENT_PROJECT_VERSION = 1;
26492655
DEVELOPMENT_TEAM = DLD43Y3TRP;
26502656
INFOPLIST_FILE = ./UnitTests/Info.plist;
2657+
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
26512658
MARKETING_VERSION = 1.0;
26522659
PRODUCT_BUNDLE_IDENTIFIER = "com.mparticle.mParticle-Apple-SDKTests";
26532660
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -2659,6 +2666,7 @@
26592666
SWIFT_OBJC_BRIDGING_HEADER = "./UnitTests/mParticle_iOS_SDKTests-Bridging-Header.h";
26602667
SWIFT_VERSION = 5.0;
26612668
TARGETED_DEVICE_FAMILY = "1,2,3";
2669+
TVOS_DEPLOYMENT_TARGET = 15.6;
26622670
};
26632671
name = Release;
26642672
};

0 commit comments

Comments
 (0)