Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@
338739072A7D7D2800950DDD /* RNSentryReplay.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RNSentryReplay.h; path = ../ios/RNSentryReplay.h; sourceTree = "<group>"; };
33958C672BFCEF5A00AD1FB6 /* RNSentryOnDrawReporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RNSentryOnDrawReporter.h; path = ../ios/RNSentryOnDrawReporter.h; sourceTree = "<group>"; };
33AFDFEC2B8D14B300AAB120 /* RNSentryFramesTrackerListenerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNSentryFramesTrackerListenerTests.m; sourceTree = "<group>"; };
33AFDFEE2B8D14C200AAB120 /* RNSentryFramesTrackerListenerTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNSentryFramesTrackerListenerTests.h; sourceTree = "<group>"; };
33AFDFF02B8D15E500AAB120 /* RNSentryDependencyContainerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNSentryDependencyContainerTests.m; sourceTree = "<group>"; };
33AFDFF22B8D15F600AAB120 /* RNSentryDependencyContainerTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNSentryDependencyContainerTests.h; sourceTree = "<group>"; };
33AFE0132B8F31AF00AAB120 /* RNSentryDependencyContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RNSentryDependencyContainer.h; path = ../ios/RNSentryDependencyContainer.h; sourceTree = "<group>"; };
33DEDFE92D8DBE5B006066E4 /* RNSentryOnDrawReporterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RNSentryOnDrawReporterTests.swift; sourceTree = "<group>"; };
33DEDFEB2D8DC800006066E4 /* RNSentryOnDrawReporter+Test.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RNSentryOnDrawReporter+Test.h"; sourceTree = "<group>"; };
Expand All @@ -52,6 +50,8 @@
33F58ACF2977037D008F60EA /* RNSentryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNSentryTests.m; sourceTree = "<group>"; };
650CB718ACFBD05609BF2126 /* libPods-RNSentryCocoaTesterTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNSentryCocoaTesterTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
E2321E7CFA55AB617247098E /* Pods-RNSentryCocoaTesterTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNSentryCocoaTesterTests.debug.xcconfig"; path = "Target Support Files/Pods-RNSentryCocoaTesterTests/Pods-RNSentryCocoaTesterTests.debug.xcconfig"; sourceTree = "<group>"; };
F48F26542EA2A481008A185E /* RNSentryEmitNewFrameEvent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RNSentryEmitNewFrameEvent.h; path = ../ios/RNSentryEmitNewFrameEvent.h; sourceTree = SOURCE_ROOT; };
F48F26552EA2A4D4008A185E /* RNSentryFramesTrackerListener.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RNSentryFramesTrackerListener.h; path = ../ios/RNSentryFramesTrackerListener.h; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -108,9 +108,7 @@
33F58ACF2977037D008F60EA /* RNSentryTests.m */,
3339C4802D6625570088EB3A /* RNSentryUserTests.m */,
33AFDFEC2B8D14B300AAB120 /* RNSentryFramesTrackerListenerTests.m */,
33AFDFEE2B8D14C200AAB120 /* RNSentryFramesTrackerListenerTests.h */,
33AFDFF02B8D15E500AAB120 /* RNSentryDependencyContainerTests.m */,
33AFDFF22B8D15F600AAB120 /* RNSentryDependencyContainerTests.h */,
3360843C2C340C76008CC412 /* RNSentryBreadcrumbTests.swift */,
332D33462CDBDBB600547D76 /* RNSentryReplayOptionsTests.swift */,
3380C6C32CE25ECA0018B9B6 /* RNSentryReplayPostInitTests.swift */,
Expand Down Expand Up @@ -138,6 +136,8 @@
33958C672BFCEF5A00AD1FB6 /* RNSentryOnDrawReporter.h */,
33AFE0132B8F31AF00AAB120 /* RNSentryDependencyContainer.h */,
338739072A7D7D2800950DDD /* RNSentryReplay.h */,
F48F26542EA2A481008A185E /* RNSentryEmitNewFrameEvent.h */,
F48F26552EA2A4D4008A185E /* RNSentryFramesTrackerListener.h */,
);
name = RNSentry;
sourceTree = "<group>";
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#import "RNSentryDependencyContainerTests.h"
#import "RNSentryDependencyContainer.h"
#import <OCMock/OCMock.h>
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
@import Sentry;

@interface RNSentryDependencyContainerTests : XCTestCase

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#import "RNSentryFramesTrackerListenerTests.h"
#import "RNSentryDependencyContainer.h"
#import "RNSentryFramesTrackerListener.h"
#import <OCMock/OCMock.h>
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
@import Sentry;

@interface RNSentryFramesTrackerListenerTests : XCTestCase

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#import "RNSentryEmitNewFrameEvent.h"
#import "RNSentryOnDrawReporter.h"
#import <Foundation/Foundation.h>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#import "RNSentryTests.h"
#import <OCMock/OCMock.h>
#import <RNSentry/RNSentry.h>
#import <Sentry/SentryDebugImageProvider+HybridSDKs.h>
#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>
@import Sentry;
Expand Down Expand Up @@ -66,8 +65,7 @@ - (void)testCreateOptionsWithDictionaryNativeCrashHandlingDefault
error:&error];
XCTAssertNotNil(actualOptions, @"Did not create sentry options");
XCTAssertNil(error, @"Should not pass no error");
XCTAssertEqual([actualOptions.integrations containsObject:@"SentryCrashIntegration"], true,
@"Did not set native crash handling");
XCTAssertTrue(actualOptions.enableCrashHandler, @"Did not set native crash handling");
}

- (void)testCreateOptionsWithDictionaryAutoPerformanceTracingDefault
Expand Down Expand Up @@ -99,8 +97,7 @@ - (void)testCreateOptionsWithDictionaryNativeCrashHandlingEnabled
error:&error];
XCTAssertNotNil(actualOptions, @"Did not create sentry options");
XCTAssertNil(error, @"Should not pass no error");
XCTAssertEqual([actualOptions.integrations containsObject:@"SentryCrashIntegration"], true,
@"Did not set native crash handling");
XCTAssertTrue(actualOptions.enableCrashHandler, @"Did not set native crash handling");
}

- (void)testCreateOptionsWithDictionaryAutoPerformanceTracingEnabled
Expand Down Expand Up @@ -133,8 +130,7 @@ - (void)testCreateOptionsWithDictionaryNativeCrashHandlingDisabled
error:&error];
XCTAssertNotNil(actualOptions, @"Did not create sentry options");
XCTAssertNil(error, @"Should not pass no error");
XCTAssertEqual([actualOptions.integrations containsObject:@"SentryCrashIntegration"], false,
@"Did not disable native crash handling");
XCTAssertFalse(actualOptions.enableCrashHandler, @"Did not disable native crash handling");
}

- (void)testCreateOptionsWithDictionaryAutoPerformanceTracingDisabled
Expand Down Expand Up @@ -348,7 +344,7 @@ - (void)testCreateOptionsWithDictionaryEnableLogsDisabled

XCTAssertNotNil(actualOptions, @"Did not create sentry options");
XCTAssertNil(error, @"Should not pass no error");

BOOL enableLogs = [[actualOptions valueForKey:@"enableLogs"] boolValue];
XCTAssertFalse(enableLogs, @"enableLogs should be disabled");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ - (void)testValidUser
[expected setIpAddress:@"192.168.1.1"];
[expected setEmail:@"test@example.com"];
[expected setUsername:@"testuser"];
[expected setSegment:@"testsegment"];
[expected setData:@{
@"foo" : @"bar",
@"baz" : @123,
Expand All @@ -26,7 +25,6 @@ - (void)testValidUser
@"ip_address" : @"192.168.1.1",
@"email" : @"test@example.com",
@"username" : @"testuser",
@"segment" : @"testsegment",
}
otherUserKeys:@{
@"foo" : @"bar",
Expand Down Expand Up @@ -67,7 +65,6 @@ - (void)testInvalidUser
@"ip_address" : @ {},
@"email" : @ {},
@"username" : @ {},
@"segment" : @[],
}
otherUserKeys:nil];

Expand All @@ -84,7 +81,6 @@ - (void)testPartiallyInvalidUser
@"ip_address" : @ {},
@"email" : @ {},
@"username" : @ {},
@"segment" : @[],
}
otherUserKeys:nil];

Expand All @@ -100,7 +96,6 @@ - (void)testNullValuesUser
@"ip_address" : [NSNull null],
@"email" : [NSNull null],
@"username" : [NSNull null],
@"segment" : [NSNull null],
}
otherUserKeys:nil];

Expand Down
2 changes: 0 additions & 2 deletions packages/core/ios/RNSentry+fetchNativeStack.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
#import <Sentry/PrivateSentrySDKOnly.h>
#import <Sentry/SentryAppStartMeasurement.h>
#import <Sentry/SentryBreadcrumb.h>
#import <Sentry/SentryDebugImageProvider+HybridSDKs.h>
#import <Sentry/SentryDebugMeta.h>
#import <Sentry/SentryDependencyContainer.h>
#import <Sentry/SentryEvent.h>
#import <Sentry/SentryException.h>
#import <Sentry/SentryFormatter.h>
Expand Down
1 change: 0 additions & 1 deletion packages/core/ios/RNSentry.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#import <dlfcn.h>

#import <Sentry/Sentry.h>
#import <Sentry/SentryDebugImageProvider.h>

typedef int (*SymbolicateCallbackType)(const void *, Dl_info *);

Expand Down
12 changes: 2 additions & 10 deletions packages/core/ios/RNSentry.mm
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
#import <Sentry/PrivateSentrySDKOnly.h>
#import <Sentry/SentryAppStartMeasurement.h>
#import <Sentry/SentryBreadcrumb.h>
#import <Sentry/SentryDebugImageProvider+HybridSDKs.h>
#import <Sentry/SentryDebugMeta.h>
#import <Sentry/SentryDependencyContainer.h>
#import <Sentry/SentryEvent.h>
#import <Sentry/SentryException.h>
#import <Sentry/SentryFormatter.h>
Expand All @@ -49,7 +47,7 @@
#endif

#if SENTRY_HAS_UIKIT
# import "RNSentryFramesTrackerListener.h"
# import "RNSentryEmitNewFrameEvent.h"
# import "RNSentryRNSScreen.h"
#endif

Expand Down Expand Up @@ -263,9 +261,7 @@ - (SentryOptions *_Nullable)createOptionsWithDictionary:(NSDictionary *_Nonnull)
BOOL enableNativeCrashHandling = [mutableOptions[@"enableNativeCrashHandling"] boolValue];

if (!enableNativeCrashHandling) {
NSMutableArray *integrations = sentryOptions.integrations.mutableCopy;
[integrations removeObject:@"SentryCrashIntegration"];
sentryOptions.integrations = integrations;
sentryOptions.enableCrashHandler = NO;
}
}

Expand Down Expand Up @@ -711,10 +707,6 @@ + (SentryUser *_Nullable)userFrom:(NSDictionary *)userKeys
if ([username isKindOfClass:NSString.class]) {
[userInstance setUsername:username];
}
id segment = [userKeys valueForKey:@"segment"];
if ([segment isKindOfClass:NSString.class]) {
[userInstance setSegment:segment];
}

if ([userDataKeys isKindOfClass:NSDictionary.class]) {
[userInstance setData:userDataKeys];
Expand Down
3 changes: 2 additions & 1 deletion packages/core/ios/RNSentryDependencyContainer.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#import <Sentry/SentryDefines.h>

#import "RNSentryFramesTrackerListener.h"
#import "RNSentryEmitNewFrameEvent.h"
@class RNSentryFramesTrackerListener;

@interface RNSentryDependencyContainer : NSObject
SENTRY_NO_INIT
Expand Down
2 changes: 1 addition & 1 deletion packages/core/ios/RNSentryDependencyContainer.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#import "RNSentryDependencyContainer.h"
#import <Sentry/SentryDependencyContainer.h>
#import "RNSentryFramesTrackerListener.h"

@implementation RNSentryDependencyContainer {
NSObject *sentryDependencyContainerLock;
Expand Down
3 changes: 3 additions & 0 deletions packages/core/ios/RNSentryEmitNewFrameEvent.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#import <Foundation/Foundation.h>

typedef void (^RNSentryEmitNewFrameEvent)(NSNumber *newFrameTimestampInSeconds);
4 changes: 2 additions & 2 deletions packages/core/ios/RNSentryFramesTrackerListener.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

#if SENTRY_HAS_UIKIT

# import "RNSentryEmitNewFrameEvent.h"
# import <Foundation/Foundation.h>
# import <React/RCTEventEmitter.h>
# import <Sentry/SentryFramesTracker.h>

typedef void (^RNSentryEmitNewFrameEvent)(NSNumber *newFrameTimestampInSeconds);
@import Sentry;

@protocol RNSentryFramesTrackerListenerProtocol <SentryFramesTrackerListener>

Expand Down
2 changes: 2 additions & 0 deletions packages/core/ios/RNSentryFramesTrackerListener.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#if SENTRY_HAS_UIKIT

@import Sentry;

@implementation RNSentryFramesTrackerListener

- (instancetype)initWithSentryFramesTracker:(SentryFramesTracker *)framesTracker
Expand Down
3 changes: 2 additions & 1 deletion packages/core/ios/RNSentryOnDrawReporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

#if SENTRY_HAS_UIKIT

# import "RNSentryFramesTrackerListener.h"
# import <React/RCTViewManager.h>
# import <UIKit/UIKit.h>

@protocol RNSentryFramesTrackerListenerProtocol;

@interface RNSentryOnDrawReporter : RCTViewManager

@end
Expand Down
4 changes: 2 additions & 2 deletions packages/core/ios/RNSentryOnDrawReporter.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#import "RNSentryOnDrawReporter.h"
#import "RNSentryEmitNewFrameEvent.h"
#import "RNSentryFramesTrackerListener.h"
#import "RNSentryTimeToDisplay.h"

#if SENTRY_HAS_UIKIT

# import <Sentry/SentryDependencyContainer.h>

@implementation RNSentryOnDrawReporter

RCT_EXPORT_MODULE(RNSentryOnDrawReporter)
Expand Down
7 changes: 3 additions & 4 deletions packages/core/ios/RNSentryRNSScreen.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

#if SENTRY_HAS_UIKIT

# import <Sentry/SentryDependencyContainer.h>
# import <Sentry/SentryFramesTracker.h>
# import <Sentry/SentrySwizzle.h>

# import "RNSentryDependencyContainer.h"
# import "RNSentryFramesTrackerListener.h"
# import <Sentry/SentrySwizzle.h>
@import Sentry;

@implementation RNSentryRNSScreen

Expand Down
Loading