-
-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Move SentryDefine enums to swift (#3963)
We can't use Objective-C enums from Swift as a function argument without breaking TestUtil compilation, but we can use Swift int enums from Objective-C. Session Replay will need SentryLevel, so a move it to swift, alongside with it I also moved SentryTransactionNameSource, both from SentryDefines.h
- Loading branch information
Showing
12 changed files
with
81 additions
and
27 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
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,4 +1,5 @@ | ||
#import "SentryDefines.h" | ||
#import "SentrySwift.h" | ||
|
||
@class SentryLogOutput; | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import Foundation | ||
|
||
@objc | ||
public enum SentryLevel: UInt { | ||
@objc(kSentryLevelNone) | ||
case none = 0 | ||
|
||
// Goes from Debug to Fatal so possible to: (level > Info) { .. } | ||
@objc(kSentryLevelDebug) | ||
case debug = 1 | ||
|
||
@objc(kSentryLevelInfo) | ||
case info = 2 | ||
|
||
@objc(kSentryLevelWarning) | ||
case warning = 3 | ||
|
||
@objc(kSentryLevelError) | ||
case error = 4 | ||
|
||
@objc(kSentryLevelFatal) | ||
case fatal = 5 | ||
} |
22 changes: 22 additions & 0 deletions
22
Sources/Swift/Integrations/Performance/SentryTransactionNameSource.swift
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,22 @@ | ||
import Foundation | ||
|
||
@objc | ||
public enum SentryTransactionNameSource: Int { | ||
@objc(kSentryTransactionNameSourceCustom) | ||
case custom = 0 | ||
|
||
@objc(kSentryTransactionNameSourceUrl) | ||
case url | ||
|
||
@objc(kSentryTransactionNameSourceRoute) | ||
case route | ||
|
||
@objc(kSentryTransactionNameSourceView) | ||
case view | ||
|
||
@objc(kSentryTransactionNameSourceComponent) | ||
case component | ||
|
||
@objc(kSentryTransactionNameSourceTask) | ||
case sourceTask | ||
} |
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