-
-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
95 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
$(SRCROOT)/Carthage/Build/iOS/Sentry.framework | ||
$(SRCROOT)/Carthage/Build/iOS/Sentry.framework |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Sentry.framework | ||
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Sentry.framework |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,11 @@ | ||
#import "SentryUIViewControllerSanitizer.h" | ||
#import "SentrySwift.h" | ||
|
||
@implementation SentryUIViewControllerSanitizer | ||
|
||
+ (NSRegularExpression *)viewControllerRegex | ||
{ | ||
static dispatch_once_t onceTokenRegex; | ||
static NSRegularExpression *regex = nil; | ||
dispatch_once(&onceTokenRegex, ^{ | ||
NSString *pattern = @"[<.](\\w+)"; | ||
regex = [NSRegularExpression regularExpressionWithPattern:pattern options:0 error:nil]; | ||
}); | ||
return regex; | ||
} | ||
|
||
+ (NSString *)sanitizeViewControllerName:(id)controller | ||
{ | ||
NSString *description = [NSString stringWithFormat:@"%@", controller]; | ||
|
||
NSRange searchedRange = NSMakeRange(0, [description length]); | ||
NSArray *matches = [[self.class viewControllerRegex] matchesInString:description | ||
options:0 | ||
range:searchedRange]; | ||
NSMutableArray *strings = [NSMutableArray array]; | ||
for (NSTextCheckingResult *match in matches) { | ||
[strings addObject:[description substringWithRange:[match rangeAtIndex:1]]]; | ||
} | ||
if ([strings count] > 0) { | ||
return [strings componentsJoinedByString:@"."]; | ||
} | ||
return description; | ||
return [SwiftDescriptor getDescription:controller]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef SentrySwift_h | ||
#define SentrySwift_h | ||
|
||
#if SWIFT_PACKAGE | ||
@import SentrySwift; | ||
#else | ||
# if __has_include(<Sentry/Sentry-Swift.h>) | ||
# import <Sentry/Sentry-Swift.h> | ||
# else | ||
# import "Sentry-Swift.h" | ||
# endif | ||
#endif | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Foundation | ||
|
||
@objc | ||
public class SwiftDescriptor: NSObject { | ||
|
||
@objc | ||
public static func getDescription(_ object: AnyObject) -> String { | ||
return String(describing: type(of: object)) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.