Skip to content

Commit 5890403

Browse files
committed
Remove support for session replay and autocapture on visionOS; ensure example project dependencies are wired up on all platforms
1 parent c731186 commit 5890403

14 files changed

+72
-72
lines changed

PostHog.xcodeproj/project.pbxproj

+49-55
Original file line numberDiff line numberDiff line change
@@ -157,16 +157,16 @@
157157
DA1044882D0B1D2D00C4ACF3 /* View+PostHogLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA1044852D0B1D2D00C4ACF3 /* View+PostHogLabel.swift */; };
158158
DA1044892D0B1D2D00C4ACF3 /* UIView+PostHogLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA1044872D0B1D2D00C4ACF3 /* UIView+PostHogLabel.swift */; };
159159
DA1044902D0B1D4300C4ACF3 /* AssociatedKeys.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA10448F2D0B1D4300C4ACF3 /* AssociatedKeys.swift */; };
160-
DA1044D42D0B34F200C4ACF3 /* PostHog.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AC745B5296D6FE60025C109 /* PostHog.framework */; platformFilters = (ios, maccatalyst, ); };
161-
DA1044D52D0B34F200C4ACF3 /* PostHog.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3AC745B5296D6FE60025C109 /* PostHog.framework */; platformFilters = (ios, maccatalyst, ); settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
160+
DA1044D42D0B34F200C4ACF3 /* PostHog.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AC745B5296D6FE60025C109 /* PostHog.framework */; };
161+
DA1044D52D0B34F200C4ACF3 /* PostHog.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3AC745B5296D6FE60025C109 /* PostHog.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
162162
DA1D295E2D10B7B2003A31DA /* ApplicationLifecyclePublisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA1D29582D10B7A6003A31DA /* ApplicationLifecyclePublisher.swift */; };
163163
DA1D29602D10C810003A31DA /* PostHogSessionManagerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA1D295F2D10C80D003A31DA /* PostHogSessionManagerTest.swift */; };
164164
DA1D29622D115E17003A31DA /* DI.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA1D29612D115E13003A31DA /* DI.swift */; };
165165
DA26419C2CC0499300CB427B /* PostHogAutocaptureEventTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA26419A2CC0499300CB427B /* PostHogAutocaptureEventTracker.swift */; };
166166
DA4AF61F2D1195D20053EA38 /* PostHog.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AC745B5296D6FE60025C109 /* PostHog.framework */; };
167167
DA4AF6202D1195D20053EA38 /* PostHog.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3AC745B5296D6FE60025C109 /* PostHog.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
168-
DA4AF6242D119FC60053EA38 /* PostHog.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AC745B5296D6FE60025C109 /* PostHog.framework */; platformFilter = ios; };
169-
DA4AF6252D119FC60053EA38 /* PostHog.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3AC745B5296D6FE60025C109 /* PostHog.framework */; platformFilter = ios; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
168+
DA4AF6242D119FC60053EA38 /* PostHog.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AC745B5296D6FE60025C109 /* PostHog.framework */; };
169+
DA4AF6252D119FC60053EA38 /* PostHog.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3AC745B5296D6FE60025C109 /* PostHog.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
170170
DA4AF6292D119FCD0053EA38 /* PostHog.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AC745B5296D6FE60025C109 /* PostHog.framework */; };
171171
DA4AF62A2D119FCD0053EA38 /* PostHog.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3AC745B5296D6FE60025C109 /* PostHog.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
172172
DA578E982D6768BC00B3A56C /* PostHogScreenViewIntegration.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA578E972D6768B400B3A56C /* PostHogScreenViewIntegration.swift */; };
@@ -176,8 +176,8 @@
176176
DA578EA02D6858CE00B3A56C /* MockScreenViewPublisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA578E9F2D6858C900B3A56C /* MockScreenViewPublisher.swift */; };
177177
DA5AA7192CE245D2004EFB99 /* UIApplication+.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA5AA7132CE245CD004EFB99 /* UIApplication+.swift */; };
178178
DA5B85882CD21CBB00686389 /* AutocaptureEventProcessing.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA5B85872CD21CBB00686389 /* AutocaptureEventProcessing.swift */; };
179-
DA6B7C0B2D118C4E0024419F /* PostHog.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AC745B5296D6FE60025C109 /* PostHog.framework */; platformFilter = ios; };
180-
DA6B7C0C2D118C4E0024419F /* PostHog.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3AC745B5296D6FE60025C109 /* PostHog.framework */; platformFilter = ios; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
179+
DA6B7C0B2D118C4E0024419F /* PostHog.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AC745B5296D6FE60025C109 /* PostHog.framework */; };
180+
DA6B7C0C2D118C4E0024419F /* PostHog.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3AC745B5296D6FE60025C109 /* PostHog.framework */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
181181
DA6F24822D4A6CA100CA2777 /* PostHogApiTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA6F24812D4A6CA100CA2777 /* PostHogApiTest.swift */; };
182182
DA703C0A2D6606EA0069097B /* PostHogIntegrationInstallationTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA703C042D6606E50069097B /* PostHogIntegrationInstallationTest.swift */; };
183183
DA703C1C2D6616FD0069097B /* PostHogAppLifeCycleIntegration.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA703C1B2D6616F20069097B /* PostHogAppLifeCycleIntegration.swift */; };
@@ -296,13 +296,6 @@
296296
/* End PBXBuildFile section */
297297

298298
/* Begin PBXContainerItemProxy section */
299-
3AA34D05296D9523003398F4 /* PBXContainerItemProxy */ = {
300-
isa = PBXContainerItemProxy;
301-
containerPortal = 3AC745AC296D6FE60025C109 /* Project object */;
302-
proxyType = 1;
303-
remoteGlobalIDString = 3AA34CF6296D951A003398F4;
304-
remoteInfo = PostHogExample;
305-
};
306299
690FF0332AE7C5BB00A0B06B /* PBXContainerItemProxy */ = {
307300
isa = PBXContainerItemProxy;
308301
containerPortal = 690FF02F2AE7C5BA00A0B06B /* PostHogExampleWithPods.xcodeproj */;
@@ -331,49 +324,56 @@
331324
remoteGlobalIDString = 690FF15C2AF3CE8900A0B06B;
332325
remoteInfo = "PostHogExampleWatchOS Watch App";
333326
};
334-
DA1044D62D0B34F200C4ACF3 /* PBXContainerItemProxy */ = {
327+
DA8D37282CBEAC03005EBD27 /* PBXContainerItemProxy */ = {
328+
isa = PBXContainerItemProxy;
329+
containerPortal = DA8D37242CBEAC02005EBD27 /* PostHogExampleAutocapture.xcodeproj */;
330+
proxyType = 2;
331+
remoteGlobalIDString = 228DB9F318BC53F1002BA12A;
332+
remoteInfo = PostHogExampleAutocapture;
333+
};
334+
DCB801002D8AFFE700A05A74 /* PBXContainerItemProxy */ = {
335335
isa = PBXContainerItemProxy;
336336
containerPortal = 3AC745AC296D6FE60025C109 /* Project object */;
337337
proxyType = 1;
338338
remoteGlobalIDString = 3AC745B4296D6FE60025C109;
339339
remoteInfo = PostHog;
340340
};
341-
DA4AF6212D1195D20053EA38 /* PBXContainerItemProxy */ = {
341+
DCB801022D8AFFE900A05A74 /* PBXContainerItemProxy */ = {
342342
isa = PBXContainerItemProxy;
343343
containerPortal = 3AC745AC296D6FE60025C109 /* Project object */;
344344
proxyType = 1;
345-
remoteGlobalIDString = 3AC745B4296D6FE60025C109;
346-
remoteInfo = PostHog;
345+
remoteGlobalIDString = 3AA34CF6296D951A003398F4;
346+
remoteInfo = PostHogExample;
347347
};
348-
DA4AF6262D119FC60053EA38 /* PBXContainerItemProxy */ = {
348+
DCB801042D8AFFF000A05A74 /* PBXContainerItemProxy */ = {
349349
isa = PBXContainerItemProxy;
350350
containerPortal = 3AC745AC296D6FE60025C109 /* Project object */;
351351
proxyType = 1;
352352
remoteGlobalIDString = 3AC745B4296D6FE60025C109;
353353
remoteInfo = PostHog;
354354
};
355-
DA4AF62B2D119FCD0053EA38 /* PBXContainerItemProxy */ = {
355+
DCB801062D8AFFF300A05A74 /* PBXContainerItemProxy */ = {
356356
isa = PBXContainerItemProxy;
357357
containerPortal = 3AC745AC296D6FE60025C109 /* Project object */;
358358
proxyType = 1;
359359
remoteGlobalIDString = 3AC745B4296D6FE60025C109;
360360
remoteInfo = PostHog;
361361
};
362-
DA6B7C0D2D118C4E0024419F /* PBXContainerItemProxy */ = {
362+
DCB801082D8AFFF600A05A74 /* PBXContainerItemProxy */ = {
363363
isa = PBXContainerItemProxy;
364364
containerPortal = 3AC745AC296D6FE60025C109 /* Project object */;
365365
proxyType = 1;
366366
remoteGlobalIDString = 3AC745B4296D6FE60025C109;
367367
remoteInfo = PostHog;
368368
};
369-
DA8D37282CBEAC03005EBD27 /* PBXContainerItemProxy */ = {
369+
DCB8010A2D8AFFF900A05A74 /* PBXContainerItemProxy */ = {
370370
isa = PBXContainerItemProxy;
371-
containerPortal = DA8D37242CBEAC02005EBD27 /* PostHogExampleAutocapture.xcodeproj */;
372-
proxyType = 2;
373-
remoteGlobalIDString = 228DB9F318BC53F1002BA12A;
374-
remoteInfo = PostHogExampleAutocapture;
371+
containerPortal = 3AC745AC296D6FE60025C109 /* Project object */;
372+
proxyType = 1;
373+
remoteGlobalIDString = 3AC745B4296D6FE60025C109;
374+
remoteInfo = PostHog;
375375
};
376-
DA929C0A2D0B3A1D0018369C /* PBXContainerItemProxy */ = {
376+
DCB8010C2D8AFFFC00A05A74 /* PBXContainerItemProxy */ = {
377377
isa = PBXContainerItemProxy;
378378
containerPortal = 3AC745AC296D6FE60025C109 /* Project object */;
379379
proxyType = 1;
@@ -1414,7 +1414,7 @@
14141414
buildRules = (
14151415
);
14161416
dependencies = (
1417-
DA1044D72D0B34F200C4ACF3 /* PBXTargetDependency */,
1417+
DCB801052D8AFFF000A05A74 /* PBXTargetDependency */,
14181418
);
14191419
name = PostHogExample;
14201420
productName = PostHogExample;
@@ -1453,8 +1453,8 @@
14531453
buildRules = (
14541454
);
14551455
dependencies = (
1456-
3AA34D06296D9523003398F4 /* PBXTargetDependency */,
1457-
DA929C0B2D0B3A1D0018369C /* PBXTargetDependency */,
1456+
DCB801032D8AFFE900A05A74 /* PBXTargetDependency */,
1457+
DCB801012D8AFFE700A05A74 /* PBXTargetDependency */,
14581458
);
14591459
name = PostHogTests;
14601460
packageProductDependencies = (
@@ -1479,7 +1479,7 @@
14791479
buildRules = (
14801480
);
14811481
dependencies = (
1482-
DA6B7C0E2D118C4E0024419F /* PBXTargetDependency */,
1482+
DCB801072D8AFFF300A05A74 /* PBXTargetDependency */,
14831483
);
14841484
name = PostHogObjCExample;
14851485
productName = PostHogObjCExample;
@@ -1498,7 +1498,7 @@
14981498
buildRules = (
14991499
);
15001500
dependencies = (
1501-
DA4AF62C2D119FCD0053EA38 /* PBXTargetDependency */,
1501+
DCB8010B2D8AFFF900A05A74 /* PBXTargetDependency */,
15021502
);
15031503
name = PostHogExampleTvOS;
15041504
productName = PostHogExampleTvOS;
@@ -1517,7 +1517,7 @@
15171517
buildRules = (
15181518
);
15191519
dependencies = (
1520-
DA4AF6222D1195D20053EA38 /* PBXTargetDependency */,
1520+
DCB801092D8AFFF600A05A74 /* PBXTargetDependency */,
15211521
);
15221522
name = PostHogExampleMacOS;
15231523
productName = PostHogExampleMacOS;
@@ -1536,7 +1536,7 @@
15361536
buildRules = (
15371537
);
15381538
dependencies = (
1539-
DA4AF6272D119FC60053EA38 /* PBXTargetDependency */,
1539+
DCB8010D2D8AFFFC00A05A74 /* PBXTargetDependency */,
15401540
);
15411541
name = PostHogExampleStoryboard;
15421542
productName = PostHogExampleStoryboard;
@@ -1993,46 +1993,40 @@
19931993
/* End PBXSourcesBuildPhase section */
19941994

19951995
/* Begin PBXTargetDependency section */
1996-
3AA34D06296D9523003398F4 /* PBXTargetDependency */ = {
1996+
DCB801012D8AFFE700A05A74 /* PBXTargetDependency */ = {
19971997
isa = PBXTargetDependency;
1998-
target = 3AA34CF6296D951A003398F4 /* PostHogExample */;
1999-
targetProxy = 3AA34D05296D9523003398F4 /* PBXContainerItemProxy */;
1998+
target = 3AC745B4296D6FE60025C109 /* PostHog */;
1999+
targetProxy = DCB801002D8AFFE700A05A74 /* PBXContainerItemProxy */;
20002000
};
2001-
DA1044D72D0B34F200C4ACF3 /* PBXTargetDependency */ = {
2001+
DCB801032D8AFFE900A05A74 /* PBXTargetDependency */ = {
20022002
isa = PBXTargetDependency;
2003-
platformFilters = (
2004-
ios,
2005-
maccatalyst,
2006-
);
2007-
target = 3AC745B4296D6FE60025C109 /* PostHog */;
2008-
targetProxy = DA1044D62D0B34F200C4ACF3 /* PBXContainerItemProxy */;
2003+
target = 3AA34CF6296D951A003398F4 /* PostHogExample */;
2004+
targetProxy = DCB801022D8AFFE900A05A74 /* PBXContainerItemProxy */;
20092005
};
2010-
DA4AF6222D1195D20053EA38 /* PBXTargetDependency */ = {
2006+
DCB801052D8AFFF000A05A74 /* PBXTargetDependency */ = {
20112007
isa = PBXTargetDependency;
20122008
target = 3AC745B4296D6FE60025C109 /* PostHog */;
2013-
targetProxy = DA4AF6212D1195D20053EA38 /* PBXContainerItemProxy */;
2009+
targetProxy = DCB801042D8AFFF000A05A74 /* PBXContainerItemProxy */;
20142010
};
2015-
DA4AF6272D119FC60053EA38 /* PBXTargetDependency */ = {
2011+
DCB801072D8AFFF300A05A74 /* PBXTargetDependency */ = {
20162012
isa = PBXTargetDependency;
2017-
platformFilter = ios;
20182013
target = 3AC745B4296D6FE60025C109 /* PostHog */;
2019-
targetProxy = DA4AF6262D119FC60053EA38 /* PBXContainerItemProxy */;
2014+
targetProxy = DCB801062D8AFFF300A05A74 /* PBXContainerItemProxy */;
20202015
};
2021-
DA4AF62C2D119FCD0053EA38 /* PBXTargetDependency */ = {
2016+
DCB801092D8AFFF600A05A74 /* PBXTargetDependency */ = {
20222017
isa = PBXTargetDependency;
20232018
target = 3AC745B4296D6FE60025C109 /* PostHog */;
2024-
targetProxy = DA4AF62B2D119FCD0053EA38 /* PBXContainerItemProxy */;
2019+
targetProxy = DCB801082D8AFFF600A05A74 /* PBXContainerItemProxy */;
20252020
};
2026-
DA6B7C0E2D118C4E0024419F /* PBXTargetDependency */ = {
2021+
DCB8010B2D8AFFF900A05A74 /* PBXTargetDependency */ = {
20272022
isa = PBXTargetDependency;
2028-
platformFilter = ios;
20292023
target = 3AC745B4296D6FE60025C109 /* PostHog */;
2030-
targetProxy = DA6B7C0D2D118C4E0024419F /* PBXContainerItemProxy */;
2024+
targetProxy = DCB8010A2D8AFFF900A05A74 /* PBXContainerItemProxy */;
20312025
};
2032-
DA929C0B2D0B3A1D0018369C /* PBXTargetDependency */ = {
2026+
DCB8010D2D8AFFFC00A05A74 /* PBXTargetDependency */ = {
20332027
isa = PBXTargetDependency;
20342028
target = 3AC745B4296D6FE60025C109 /* PostHog */;
2035-
targetProxy = DA929C0A2D0B3A1D0018369C /* PBXContainerItemProxy */;
2029+
targetProxy = DCB8010C2D8AFFFC00A05A74 /* PBXContainerItemProxy */;
20362030
};
20372031
/* End PBXTargetDependency section */
20382032

PostHog/Autocapture/ForwardingPickerViewDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Created by Yiannis Josephides on 24/10/2024.
66
//
77

8-
#if os(iOS) || targetEnvironment(macCatalyst)
8+
#if os(iOS) || os(visionOS) || targetEnvironment(macCatalyst)
99
import UIKit
1010

1111
final class ForwardingPickerViewDelegate: NSObject, UIPickerViewDelegate, UIPickerViewDataSource {

PostHog/Autocapture/SwiftUI/View+PostHogLabel.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Created by Yiannis Josephides on 04/12/2024.
66
//
77

8-
#if os(iOS) || targetEnvironment(macCatalyst)
8+
#if os(iOS) || os(visionOS) || targetEnvironment(macCatalyst)
99
import SwiftUI
1010

1111
public extension View {

PostHog/Autocapture/UIView+PostHogLabel.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Created by Yiannis Josephides on 04/12/2024.
66
//
77

8-
#if os(iOS) || targetEnvironment(macCatalyst)
8+
#if os(iOS) || os(visionOS) || targetEnvironment(macCatalyst)
99
import UIKit
1010

1111
public extension UIView {

PostHog/PostHogConfig.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ import Foundation
106106
integrations.append(PostHogAppLifeCycleIntegration())
107107
}
108108

109-
#if os(iOS) || os(visionOS)
109+
#if os(iOS)
110110
if sessionReplay {
111111
integrations.append(PostHogReplayIntegration())
112112
}

PostHog/PostHogSDK.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ let maxRetryDelay = 30.0
308308
}
309309
// only Session replay requires $window_id, so we set as the same as $session_id.
310310
// the backend might fallback to $session_id if $window_id is not present next.
311-
#if os(iOS) || os(visionOS)
311+
#if os(iOS)
312312
if !appendSharedProps, isSessionReplayActive() {
313313
props["$window_id"] = sessionId
314314
}
@@ -967,7 +967,7 @@ let maxRetryDelay = 30.0
967967
}
968968
}
969969

970-
#if os(iOS) || os(visionOS)
970+
#if os(iOS)
971971
/**
972972
Starts session recording.
973973
This method will have no effect if PostHog is not enabled, or if session replay is disabled in your project settings
@@ -1051,7 +1051,7 @@ let maxRetryDelay = 30.0
10511051
return postHog
10521052
}
10531053

1054-
#if os(iOS) || os(visionOS)
1054+
#if os(iOS)
10551055
@objc public func isSessionReplayActive() -> Bool {
10561056
if !isEnabled() {
10571057
return false
@@ -1113,7 +1113,7 @@ let maxRetryDelay = 30.0
11131113
}
11141114
#endif
11151115

1116-
#if os(iOS) || os(visionOS)
1116+
#if os(iOS)
11171117
func getReplayIntegration() -> PostHogReplayIntegration? {
11181118
installedIntegrations.compactMap {
11191119
$0 as? PostHogReplayIntegration

PostHog/Replay/PostHogReplayIntegration.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
// Created by Manoel Aranda Neto on 19.03.24.
88
//
9-
#if os(iOS) || os(visionOS)
9+
#if os(iOS)
1010
import Foundation
1111
import PhotosUI
1212
import SwiftUI

PostHog/Replay/URLSessionExtension.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if os(iOS) || os(visionOS)
1+
#if os(iOS)
22
import Foundation
33

44
public extension URLSession {

PostHog/Replay/URLSessionInterceptor.swift

+4
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,11 @@
128128

129129
private func isCaptureNetworkEnabled() -> Bool {
130130
guard let postHog else { return false }
131+
#if os(visionOS)
132+
return false
133+
#else
131134
return postHog.config.sessionReplayConfig.captureNetworkTelemetry && postHog.isSessionReplayActive()
135+
#endif
132136
}
133137

134138
private func finish(task: URLSessionTask, sample: NetworkSample) {

PostHogTests/PostHogAutocaptureEventTrackerSpec.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Created by Yiannis Josephides on 31/10/2024.
66
//
77

8-
#if os(iOS) || os(visionOS)
8+
#if os(iOS)
99
import Foundation
1010
import Nimble
1111
@testable import PostHog

PostHogTests/PostHogAutocaptureIntegrationSpec.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Nimble
1010
@testable import PostHog
1111
import Quick
1212

13-
#if os(iOS) || os(visionOS)
13+
#if os(iOS)
1414
class PostHogAutocaptureIntegrationSpec: QuickSpec {
1515
override func spec() {
1616
var server: MockPostHogServer!

PostHogTests/PostHogConfigTest.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class PostHogConfigTest: QuickSpec {
4141
expect(config.host) == URL(string: "localhost:9000")!
4242
}
4343

44-
#if os(iOS) || os(visionOS)
44+
#if os(iOS)
4545
context("when initialized with default values for captureElementInteractions") {
4646
it("should enable autocapture by default") {
4747
let sut = PostHogConfig(apiKey: "123")

PostHogTests/PostHogIntegrationInstallationTest.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Testing
1111
@Suite("Test integration installation", .serialized)
1212
class PostHogIntegrationInstallationTest {
1313
init() {
14-
#if os(iOS) || os(visionOS)
14+
#if os(iOS)
1515
PostHogReplayIntegration.clearInstalls()
1616
#endif
1717
#if os(iOS) || targetEnvironment(macCatalyst)
@@ -31,7 +31,7 @@ class PostHogIntegrationInstallationTest {
3131
let config = PostHogConfig(apiKey: apiKey)
3232
config.captureApplicationLifecycleEvents = captureApplicationLifecycleEvents
3333

34-
#if os(iOS) || os(visionOS)
34+
#if os(iOS)
3535
config.sessionReplay = sessionReplay
3636
#endif
3737

@@ -47,7 +47,7 @@ class PostHogIntegrationInstallationTest {
4747
return PostHogSDK.with(config)
4848
}
4949

50-
#if os(iOS) || os(visionOS)
50+
#if os(iOS)
5151
@Test("replay integration installed only once, on first instance")
5252
func replayIntegrationInstalledOnce() {
5353
let first = getSut(apiKey: "123", sessionReplay: true)

0 commit comments

Comments
 (0)