|
407 | 407 | getSnippet: getSwiftSnippet, |
408 | 408 | tracesLine: "options.tracesSampleRate = 1.0", |
409 | 409 | profilingIfLine: "#if !(os(watchOS) || os(tvOS) || os(visionOS))", |
410 | | - replayIfLine: "#if os(iOS) || os(tvOS) || os(visionOS)", |
| 410 | + replayIfLine: "#if os(iOS) || os(tvOS)", |
411 | 411 | logsLine: "options.enableLogs = true", |
412 | 412 | }, |
413 | 413 | { |
|
416 | 416 | tracesLine: "options.tracesSampleRate = @1.0;", |
417 | 417 | profilingIfLine: |
418 | 418 | "#if !(TARGET_OS_WATCH || TARGET_OS_TV || TARGET_OS_VISION)", |
419 | | - replayIfLine: "#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION", |
| 419 | + replayIfLine: "#if TARGET_OS_IOS || TARGET_OS_TV", |
420 | 420 | logsLine: "options.enableLogs = YES;", |
421 | 421 | }, |
422 | 422 | ]; |
|
496 | 496 | } |
497 | 497 | #endif |
498 | 498 |
|
499 | | - #if os(iOS) || os(tvOS) || os(visionOS) |
| 499 | + #if os(iOS) || os(tvOS) |
500 | 500 | // Record Session Replays for 10% of sessions and 100% of sessions with an error. |
501 | 501 | // Visit https://docs.sentry.io/platforms/apple/guides/ios/session-replay/ to learn more. |
502 | 502 | options.sessionReplay.sessionSampleRate = 0.1 |
|
532 | 532 | // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/ |
533 | 533 | options.sendDefaultPii = true |
534 | 534 |
|
535 | | - #if os(iOS) || os(tvOS) || os(visionOS) |
| 535 | + #if os(iOS) || os(tvOS) |
536 | 536 | // Record Session Replays for 10% of sessions and 100% of sessions with an error. |
537 | 537 | // Visit https://docs.sentry.io/platforms/apple/guides/ios/session-replay/ to learn more. |
538 | 538 | options.sessionReplay.sessionSampleRate = 0.1 |
|
574 | 574 | }; |
575 | 575 | #endif |
576 | 576 |
|
577 | | - #if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION |
| 577 | + #if TARGET_OS_IOS || TARGET_OS_TV |
578 | 578 | // Record Session Replays for 10% of sessions and 100% of sessions with an error. |
579 | 579 | // Visit https://docs.sentry.io/platforms/apple/guides/ios/session-replay/ to learn more. |
580 | 580 | options.sessionReplay.sessionSampleRate = 0.1; |
|
610 | 610 | // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/ |
611 | 611 | options.sendDefaultPii = YES; |
612 | 612 |
|
613 | | - #if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION |
| 613 | + #if TARGET_OS_IOS || TARGET_OS_TV |
614 | 614 | // Record Session Replays for 10% of sessions and 100% of sessions with an error. |
615 | 615 | // Visit https://docs.sentry.io/platforms/apple/guides/ios/session-replay/ to learn more. |
616 | 616 | options.sessionReplay.sessionSampleRate = 0.1; |
|
630 | 630 | }); |
631 | 631 | }); |
632 | 632 |
|
633 | | - // sentry-cocoa 9.x only defines `sessionReplay` on iOS, tvOS, and visionOS, |
634 | | - // so the snippet must compile it out elsewhere, such as in macOS apps. |
| 633 | + // sentry-cocoa 9.x only defines `sessionReplay` on iOS and tvOS (visionOS |
| 634 | + // only since 9.28.0), so the snippet must compile it out elsewhere, such as |
| 635 | + // in macOS and visionOS apps. |
635 | 636 | describe("Session Replay platform check", () => { |
636 | 637 | const variations = [ |
637 | 638 | { |
638 | 639 | language: "Swift", |
639 | 640 | getSnippet: getSwiftSnippet, |
640 | | - ifLine: "#if os(iOS) || os(tvOS) || os(visionOS)", |
| 641 | + ifLine: "#if os(iOS) || os(tvOS)", |
641 | 642 | }, |
642 | 643 | { |
643 | 644 | language: "Objective-C", |
644 | 645 | getSnippet: getObjcSnippet, |
645 | | - ifLine: "#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_VISION", |
| 646 | + ifLine: "#if TARGET_OS_IOS || TARGET_OS_TV", |
646 | 647 | }, |
647 | 648 | ]; |
648 | 649 |
|
|
0 commit comments