Skip to content

Commit

Permalink
Reverting some things :(
Browse files Browse the repository at this point in the history
  • Loading branch information
brustolin committed Mar 25, 2024
1 parent d8ce8d6 commit 1afd0d9
Show file tree
Hide file tree
Showing 9 changed files with 407 additions and 232 deletions.
24 changes: 16 additions & 8 deletions Sentry.xcodeproj/project.pbxproj
Expand Up @@ -765,6 +765,10 @@
D8199DC229376FC10074249E /* Sentry.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63AA759B1EB8AEF500D153DE /* Sentry.framework */; };
D81A346C291AECC7005A27A9 /* PrivateSentrySDKOnly.h in Headers */ = {isa = PBXBuildFile; fileRef = D81A346B291AECC7005A27A9 /* PrivateSentrySDKOnly.h */; settings = {ATTRIBUTES = (Private, ); }; };
D81FDF12280EA1060045E0E4 /* SentryScreenShotTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D81FDF10280EA0080045E0E4 /* SentryScreenShotTests.swift */; };
D820CDB32BB1886100BA339D /* SentrySessionReplay.m in Sources */ = {isa = PBXBuildFile; fileRef = D820CDB22BB1886100BA339D /* SentrySessionReplay.m */; };
D820CDB42BB1886100BA339D /* SentrySessionReplay.h in Headers */ = {isa = PBXBuildFile; fileRef = D820CDB12BB1886100BA339D /* SentrySessionReplay.h */; };
D820CDB72BB1895F00BA339D /* SentrySessionReplayIntegration.m in Sources */ = {isa = PBXBuildFile; fileRef = D820CDB62BB1895F00BA339D /* SentrySessionReplayIntegration.m */; };
D820CDB82BB1895F00BA339D /* SentrySessionReplayIntegration.h in Headers */ = {isa = PBXBuildFile; fileRef = D820CDB52BB1895F00BA339D /* SentrySessionReplayIntegration.h */; };
D8292D7D2A39A027009872F7 /* UrlSanitizedTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8292D7C2A39A027009872F7 /* UrlSanitizedTests.swift */; };
D8370B6A273DF1E900F66E2D /* SentryNSURLSessionTaskSearch.m in Sources */ = {isa = PBXBuildFile; fileRef = D8370B68273DF1E900F66E2D /* SentryNSURLSessionTaskSearch.m */; };
D8370B6C273DF20F00F66E2D /* SentryNSURLSessionTaskSearch.h in Headers */ = {isa = PBXBuildFile; fileRef = D8370B6B273DF20F00F66E2D /* SentryNSURLSessionTaskSearch.h */; };
Expand Down Expand Up @@ -841,9 +845,7 @@
D8CAC02E2BA0663E00E38F34 /* SentryReplayOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8CAC02A2BA0663E00E38F34 /* SentryReplayOptions.swift */; };
D8CAC02F2BA0663E00E38F34 /* SentryVideoInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8CAC02B2BA0663E00E38F34 /* SentryVideoInfo.swift */; };
D8CAC0412BA0984500E38F34 /* SentryIntegrationProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8CAC0402BA0984500E38F34 /* SentryIntegrationProtocol.swift */; };
D8CAC06F2BA337F800E38F34 /* SentrySessionReplayIntegration.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8CAC06E2BA337F800E38F34 /* SentrySessionReplayIntegration.swift */; };
D8CAC0732BA4473000E38F34 /* SentryViewPhotographer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8CAC0722BA4473000E38F34 /* SentryViewPhotographer.swift */; };
D8CAC0752BA4843A00E38F34 /* SentrySessionReplay.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8CAC0742BA4843A00E38F34 /* SentrySessionReplay.swift */; };
D8CB74152947246600A5F964 /* SentryEnvelopeAttachmentHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = D8CB74142947246600A5F964 /* SentryEnvelopeAttachmentHeader.h */; };
D8CB7417294724CC00A5F964 /* SentryEnvelopeAttachmentHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = D8CB7416294724CC00A5F964 /* SentryEnvelopeAttachmentHeader.m */; };
D8CB74192947285A00A5F964 /* SentryEnvelopeItemHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = D8CB74182947285A00A5F964 /* SentryEnvelopeItemHeader.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand Down Expand Up @@ -1749,6 +1751,10 @@
D81A346B291AECC7005A27A9 /* PrivateSentrySDKOnly.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PrivateSentrySDKOnly.h; path = include/HybridPublic/PrivateSentrySDKOnly.h; sourceTree = "<group>"; };
D81A349F291D5568005A27A9 /* SentryPrivate.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; path = SentryPrivate.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
D81FDF10280EA0080045E0E4 /* SentryScreenShotTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryScreenShotTests.swift; sourceTree = "<group>"; };
D820CDB12BB1886100BA339D /* SentrySessionReplay.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SentrySessionReplay.h; sourceTree = "<group>"; };
D820CDB22BB1886100BA339D /* SentrySessionReplay.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentrySessionReplay.m; sourceTree = "<group>"; };
D820CDB52BB1895F00BA339D /* SentrySessionReplayIntegration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SentrySessionReplayIntegration.h; sourceTree = "<group>"; };
D820CDB62BB1895F00BA339D /* SentrySessionReplayIntegration.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentrySessionReplayIntegration.m; sourceTree = "<group>"; };
D8292D7A2A38AF04009872F7 /* HTTPHeaderSanitizer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HTTPHeaderSanitizer.swift; sourceTree = "<group>"; };
D8292D7C2A39A027009872F7 /* UrlSanitizedTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UrlSanitizedTests.swift; sourceTree = "<group>"; };
D8370B68273DF1E900F66E2D /* SentryNSURLSessionTaskSearch.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryNSURLSessionTaskSearch.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1833,9 +1839,7 @@
D8CAC02A2BA0663E00E38F34 /* SentryReplayOptions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SentryReplayOptions.swift; sourceTree = "<group>"; };
D8CAC02B2BA0663E00E38F34 /* SentryVideoInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SentryVideoInfo.swift; sourceTree = "<group>"; };
D8CAC0402BA0984500E38F34 /* SentryIntegrationProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryIntegrationProtocol.swift; sourceTree = "<group>"; };
D8CAC06E2BA337F800E38F34 /* SentrySessionReplayIntegration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySessionReplayIntegration.swift; sourceTree = "<group>"; };
D8CAC0722BA4473000E38F34 /* SentryViewPhotographer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentryViewPhotographer.swift; sourceTree = "<group>"; };
D8CAC0742BA4843A00E38F34 /* SentrySessionReplay.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SentrySessionReplay.swift; sourceTree = "<group>"; };
D8CB74142947246600A5F964 /* SentryEnvelopeAttachmentHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryEnvelopeAttachmentHeader.h; path = include/SentryEnvelopeAttachmentHeader.h; sourceTree = "<group>"; };
D8CB7416294724CC00A5F964 /* SentryEnvelopeAttachmentHeader.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SentryEnvelopeAttachmentHeader.m; sourceTree = "<group>"; };
D8CB74182947285A00A5F964 /* SentryEnvelopeItemHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SentryEnvelopeItemHeader.h; path = Public/SentryEnvelopeItemHeader.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3427,6 +3431,10 @@
D80694CC2B7E0A3E00B820E6 /* SentryReplayType.m */,
D88D6C1B2B7B5A8800C8C633 /* SentryReplayRecording.h */,
D88D6C1C2B7B5A8800C8C633 /* SentryReplayRecording.m */,
D820CDB12BB1886100BA339D /* SentrySessionReplay.h */,
D820CDB22BB1886100BA339D /* SentrySessionReplay.m */,
D820CDB52BB1895F00BA339D /* SentrySessionReplayIntegration.h */,
D820CDB62BB1895F00BA339D /* SentrySessionReplayIntegration.m */,
);
name = SessionReplay;
sourceTree = "<group>";
Expand Down Expand Up @@ -3577,9 +3585,7 @@
children = (
D8CAC02A2BA0663E00E38F34 /* SentryReplayOptions.swift */,
D8CAC02B2BA0663E00E38F34 /* SentryVideoInfo.swift */,
D8CAC06E2BA337F800E38F34 /* SentrySessionReplayIntegration.swift */,
D8CAC0722BA4473000E38F34 /* SentryViewPhotographer.swift */,
D8CAC0742BA4843A00E38F34 /* SentrySessionReplay.swift */,
D802994D2BA836EF000F0081 /* SentryOnDemandReplay.swift */,
D802994F2BA83A88000F0081 /* SentryPixelBuffer.swift */,
);
Expand Down Expand Up @@ -3722,6 +3728,7 @@
8EAE980B261E9F530073B6B3 /* SentryPerformanceTracker.h in Headers */,
63FE718520DA4C1100CDBAE8 /* SentryCrashC.h in Headers */,
8EA1ED0D2669028C00E62B98 /* SentryUIViewControllerSwizzling.h in Headers */,
D820CDB82BB1895F00BA339D /* SentrySessionReplayIntegration.h in Headers */,
7B98D7E425FB7A7200C5A389 /* SentryAppState.h in Headers */,
7BDEAA022632A4580001EA25 /* SentryOptions+Private.h in Headers */,
A8AFFCCD29069C3E00967CD7 /* SentryHttpStatusCodeRange.h in Headers */,
Expand Down Expand Up @@ -3760,6 +3767,7 @@
7B8713AE26415ADF006D6004 /* SentryAppStartTrackingIntegration.h in Headers */,
7B7D873224864BB900D2ECFF /* SentryCrashMachineContextWrapper.h in Headers */,
861265F92404EC1500C4AFDE /* NSArray+SentrySanitize.h in Headers */,
D820CDB42BB1886100BA339D /* SentrySessionReplay.h in Headers */,
63FE712320DA4C1000CDBAE8 /* SentryCrashID.h in Headers */,
D88D6C1D2B7B5A8800C8C633 /* SentryReplayRecording.h in Headers */,
7DC27EC523997EB7006998B5 /* SentryAutoBreadcrumbTrackingIntegration.h in Headers */,
Expand Down Expand Up @@ -4338,6 +4346,7 @@
6334314320AD9AE40077E581 /* SentryMechanism.m in Sources */,
63FE70D320DA4C1000CDBAE8 /* SentryCrashMonitor_AppState.c in Sources */,
639FCFA51EBC809A00778193 /* SentryStacktrace.m in Sources */,
D820CDB32BB1886100BA339D /* SentrySessionReplay.m in Sources */,
63FE70DF20DA4C1000CDBAE8 /* SentryCrashMonitorType.c in Sources */,
7BF9EF7E2722B91F00B5BBEF /* SentryDefaultObjCRuntimeWrapper.m in Sources */,
7BC3936E25B1AB72004F03D3 /* SentryLevelMapper.m in Sources */,
Expand All @@ -4363,7 +4372,6 @@
63FE712D20DA4C1100CDBAE8 /* SentryCrashJSONCodecObjC.m in Sources */,
7BBD18932449BEDD00427C76 /* SentryDefaultRateLimits.m in Sources */,
7BD729982463E93500EA3610 /* SentryDateUtil.m in Sources */,
D8CAC0752BA4843A00E38F34 /* SentrySessionReplay.swift in Sources */,
639FCF9D1EBC7F9500778193 /* SentryThread.m in Sources */,
8E8C57A225EEFC07001CEEFA /* SentrySampling.m in Sources */,
8454CF8D293EAF9A006AC140 /* SentryMetricProfiler.mm in Sources */,
Expand Down Expand Up @@ -4403,7 +4411,6 @@
D8F016B32B9622D6007B9AFB /* SentryId.swift in Sources */,
D865893029D6ECA7000BE151 /* SentryCrashBinaryImageCache.c in Sources */,
7BC9A20428F4166D001E7C4C /* SentryMeasurementValue.m in Sources */,
D8CAC06F2BA337F800E38F34 /* SentrySessionReplayIntegration.swift in Sources */,
D859696B27BECD8F0036A46E /* SentryCoreDataTrackingIntegration.m in Sources */,
7BD86EC7264A641D005439DB /* SentrySysctl.m in Sources */,
84281C432A578E5600EE88F2 /* SentryProfilerState.mm in Sources */,
Expand All @@ -4430,6 +4437,7 @@
63FE710520DA4C1000CDBAE8 /* SentryCrashLogger.c in Sources */,
0A2D8D5B289815C0008720F6 /* SentryBaseIntegration.m in Sources */,
639FCF991EBC7B9700778193 /* SentryEvent.m in Sources */,
D820CDB72BB1895F00BA339D /* SentrySessionReplayIntegration.m in Sources */,
632F43521F581D5400A18A36 /* SentryCrashExceptionApplication.m in Sources */,
620379DD2AFE1432005AC0C1 /* SentryBuildAppStartSpans.m in Sources */,
7B77BE3727EC8460003C9020 /* SentryDiscardReasonMapper.m in Sources */,
Expand Down
1 change: 1 addition & 0 deletions Sources/Sentry/SentryOptions.m
Expand Up @@ -15,6 +15,7 @@
#import "SentryOptions+Private.h"
#import "SentrySDK.h"
#import "SentryScope.h"
#import "SentrySessionReplayIntegration.h"
#import "SentrySwiftAsyncIntegration.h"
#import <objc/runtime.h>

Expand Down
32 changes: 32 additions & 0 deletions Sources/Sentry/SentrySessionReplay.h
@@ -0,0 +1,32 @@
#import "SentryDefines.h"
#import <Foundation/Foundation.h>

#if SENTRY_HAS_UIKIT
# import <UIKit/UIKit.h>

@class SentryReplayOptions;
@class SentryEvent;

NS_ASSUME_NONNULL_BEGIN

@interface SentrySessionReplay : NSObject

- (instancetype)initWithSettings:(SentryReplayOptions *)replaySettings;

/**
* Start recording the session using rootView as image source.
* If full is @c YES, we transmit the entire session to sentry.
*/
- (void)start:(UIView *)rootView fullSession:(BOOL)full;

/**
* Stop recording the session replay
*/
- (void)stop;

- (void)replayForEvent:(SentryEvent *)event;

@end

NS_ASSUME_NONNULL_END
#endif // SENTRY_HAS_UIKIT

0 comments on commit 1afd0d9

Please sign in to comment.