Skip to content

Commit

Permalink
Merge pull request #51 from CodingFriends/chore/update-to-yosemite
Browse files Browse the repository at this point in the history
Chore/update to yosemite
  • Loading branch information
greimers committed Jun 10, 2021
2 parents e9792f4 + af66e31 commit 9e00986
Show file tree
Hide file tree
Showing 40 changed files with 1,268 additions and 175 deletions.
40 changes: 40 additions & 0 deletions Source/Sentry.framework/Versions/A/Headers/PrivateSentrySDKOnly.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#import <Foundation/Foundation.h>

#import "SentryDefines.h"

@class SentryEnvelope, SentryDebugMeta;

NS_ASSUME_NONNULL_BEGIN

/**
* ATTENTION: This class is reserved for hybrid SDKs. Methods may be changed, renamed or removed
* without notice. If you want to use one of these methods here please open up an issue and let us
* now.
*
* The name of this class is supposed to be a bit weird and ugly. The name starts with private on
* purpose so users don't see it in code completion when typing Sentry. We also add only at the end
* to make it more obvious you shouldn't use it.
*/
@interface PrivateSentrySDKOnly : NSObject

/**
* For storing an envelope synchronously to disk.
*/
+ (void)storeEnvelope:(SentryEnvelope *)envelope;

+ (void)captureEnvelope:(SentryEnvelope *)envelope;

/**
* Create an envelope from NSData. Needed for example by Flutter.
*/
+ (nullable SentryEnvelope *)envelopeWithData:(NSData *)data;

/**
* Returns the current list of debug images. Be aware that the SentryDebugMeta is actually
* describing a debug image. This class should be renamed to SentryDebugImage in a future version.
*/
- (NSArray<SentryDebugMeta *> *)getDebugImages;

@end

NS_ASSUME_NONNULL_END
12 changes: 12 additions & 0 deletions Source/Sentry.framework/Versions/A/Headers/Sentry.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ FOUNDATION_EXPORT double SentryVersionNumber;
//! Project version string for Sentry.
FOUNDATION_EXPORT const unsigned char SentryVersionString[];

#import "PrivateSentrySDKOnly.h"
#import "SentryAttachment.h"
#import "SentryBreadcrumb.h"
#import "SentryClient.h"
#import "SentryCrashExceptionApplication.h"
#import "SentryDebugImageProvider.h"
#import "SentryDebugMeta.h"
#import "SentryDefines.h"
#import "SentryDsn.h"
Expand All @@ -22,14 +25,23 @@ FOUNDATION_EXPORT const unsigned char SentryVersionString[];
#import "SentryId.h"
#import "SentryIntegrationProtocol.h"
#import "SentryMechanism.h"
#import "SentryMechanismMeta.h"
#import "SentryMessage.h"
#import "SentryNSError.h"
#import "SentryOptions.h"
#import "SentrySDK.h"
#import "SentrySampleDecision.h"
#import "SentrySamplingContext.h"
#import "SentryScope.h"
#import "SentrySdkInfo.h"
#import "SentrySerializable.h"
#import "SentrySession.h"
#import "SentrySpanContext.h"
#import "SentrySpanId.h"
#import "SentrySpanProtocol.h"
#import "SentrySpanStatus.h"
#import "SentryStacktrace.h"
#import "SentryThread.h"
#import "SentryTransactionContext.h"
#import "SentryUser.h"
#import "SentryUserFeedback.h"
90 changes: 90 additions & 0 deletions Source/Sentry.framework/Versions/A/Headers/SentryAttachment.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#import "SentryDefines.h"
#import "SentrySerializable.h"

NS_ASSUME_NONNULL_BEGIN

/**
* You can use an attachment to store additional files alongside an event.
*/
NS_SWIFT_NAME(Attachment)
@interface SentryAttachment : NSObject
SENTRY_NO_INIT

/**
* Initializes an attachment with data. Sets the content type to "application/octet-stream".
*
* @param data The data for the attachment.
* @param filename The name of the attachment to display in Sentry.
*/
- (instancetype)initWithData:(NSData *)data filename:(NSString *)filename;

/**
* Initializes an attachment with data.
*
* @param data The data for the attachment.
* @param filename The name of the attachment to display in Sentry.
* @param contentType The content type of the attachment. Default is "application/octet-stream".
*/
- (instancetype)initWithData:(NSData *)data
filename:(NSString *)filename
contentType:(NSString *)contentType;

/**
* Initializes an attachment with a path. Uses the last path compontent of the path as a filename
* and sets the content type to "application/octet-stream".
*
* @discussion The file located at the pathname is read lazily when the SDK captures an event or
* transaction not when the attachment is initialized.
*
* @param path The path of the file whose contents you want to upload to Sentry.
*/
- (instancetype)initWithPath:(NSString *)path;

/**
* Initializes an attachment with a path. Sets the content type to "application/octet-stream".
*
* @discussion The file located at the pathname is read lazily when the SDK captures an event or
* transaction not when the attachment is initialized.
*
* @param path The path of the file whose contents you want to upload to Sentry.
* @param filename The name of the attachment to display in Sentry.
*/
- (instancetype)initWithPath:(NSString *)path filename:(NSString *)filename;

/**
* Initializes an attachment with a path.
*
* @discussion The file located at the pathname is read lazily when the SDK captures an event or
* transaction not when the attachment is initialized.
*
* @param path The path of the file whose contents you want to upload to Sentry.
* @param filename The name of the attachment to display in Sentry.
* @param contentType The content type of the attachment. Default is "application/octet-stream".
*/
- (instancetype)initWithPath:(NSString *)path
filename:(NSString *)filename
contentType:(NSString *)contentType;

/**
* The data of the attachment.
*/
@property (readonly, nonatomic, strong) NSData *_Nullable data;

/**
* The path of the attachment.
*/
@property (readonly, nonatomic, copy) NSString *_Nullable path;

/**
* The filename of the attachment to display in Sentry.
*/
@property (readonly, nonatomic, copy) NSString *filename;

/**
* The content type of the attachment. Default is "application/octet-stream".
*/
@property (readonly, nonatomic, copy) NSString *contentType;

@end

NS_ASSUME_NONNULL_END
7 changes: 1 addition & 6 deletions Source/Sentry.framework/Versions/A/Headers/SentryClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#import "SentryDefines.h"

@class SentryOptions, SentrySession, SentryEvent, SentryEnvelope, SentryScope, SentryFileManager,
SentryId, SentryUserFeedback;
SentryId, SentryUserFeedback, SentryTransaction;

NS_ASSUME_NONNULL_BEGIN

Expand Down Expand Up @@ -113,11 +113,6 @@ SENTRY_NO_INIT

- (void)captureEnvelope:(SentryEnvelope *)envelope NS_SWIFT_NAME(capture(envelope:));

/**
* Needed by hybrid SDKs as react-native to synchronously store an envelope to disk.
*/
- (void)storeEnvelope:(SentryEnvelope *)envelope;

@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#import "SentryDefines.h"
#import <Foundation/Foundation.h>

@class SentryDebugMeta;

NS_ASSUME_NONNULL_BEGIN

/**
* Reserved for hybrid SDKs that the debug image list for symbolication.
*/
@interface SentryDebugImageProvider : NSObject

- (instancetype)init;

/**
* Returns the current list of debug images. Be aware that the SentryDebugMeta is actually
* describing a debug image. This class should be renamed to SentryDebugImage in a future version.
*/
- (NSArray<SentryDebugMeta *> *)getDebugImages;

@end

NS_ASSUME_NONNULL_END
7 changes: 7 additions & 0 deletions Source/Sentry.framework/Versions/A/Headers/SentryDebugMeta.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

NS_ASSUME_NONNULL_BEGIN

/**
* This class is actually a DebugImage:
* https://develop.sentry.dev/sdk/event-payloads/debugmeta/#debug-images and should be renamed to
* SentryDebugImage in a future version.
*
* Contains information about a loaded library in the process and the memory address.
*/
NS_SWIFT_NAME(DebugMeta)
@interface SentryDebugMeta : NSObject <SentrySerializable>

Expand Down
31 changes: 28 additions & 3 deletions Source/Sentry.framework/Versions/A/Headers/SentryDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
-(instancetype)init NS_UNAVAILABLE; \
+(instancetype) new NS_UNAVAILABLE;

@class SentryEvent, SentryBreadcrumb;
@class SentryEvent, SentryBreadcrumb, SentrySamplingContext;
@protocol SentrySpan;

/**
* Block used for returning after a request finished
Expand All @@ -48,14 +49,38 @@ typedef SentryBreadcrumb *_Nullable (^SentryBeforeBreadcrumbCallback)(
*/
typedef SentryEvent *_Nullable (^SentryBeforeSendEventCallback)(SentryEvent *_Nonnull event);

/**
* A callback to be notified when the last program execution terminated with a crash.
*/
typedef void (^SentryOnCrashedLastRunCallback)(SentryEvent *_Nonnull event);

/**
* Block can be used to determine if an event should be queued and stored
* locally. It will be tried to send again after next successful send. Note that
* this will only be called once the event is created and send manully. Once it
* this will only be called once the event is created and send manually. Once it
* has been queued once it will be discarded if it fails again.
*/
typedef BOOL (^SentryShouldQueueEvent)(
NSHTTPURLResponse *_Nullable response, NSError *_Nullable error);

/**
* Function pointer for a sampler callback.
*
* @param samplingContext context of the sampling.
*
* @return A sample rate that is >= 0.0 and <= 1.0 or NIL if no sampling decision has been taken..
* When returning a value out of range the SDK uses the default of 0.
*/
typedef NSNumber *_Nullable (^SentryTracesSamplerCallback)(
SentrySamplingContext *_Nonnull samplingContext);

/**
* Function pointer for span manipulation.
*
* @param span The span to be used.
*/
typedef void (^SentrySpanCallback)(id<SentrySpan> _Nullable span);

/**
* Loglevel
*/
Expand All @@ -77,7 +102,7 @@ typedef NS_ENUM(NSUInteger, SentryLevel) {
kSentryLevelInfo = 2,
kSentryLevelWarning = 3,
kSentryLevelError = 4,
kSentryLevelFatal = 5,
kSentryLevelFatal = 5
};

/**
Expand Down
12 changes: 11 additions & 1 deletion Source/Sentry.framework/Versions/A/Headers/SentryEnvelope.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

#import "SentryDefines.h"

@class SentryEvent, SentrySession, SentrySdkInfo, SentryId, SentryUserFeedback;
@class SentryEvent, SentrySession, SentrySdkInfo, SentryId, SentryUserFeedback, SentryAttachment,
SentryTransaction;

NS_ASSUME_NONNULL_BEGIN

Expand Down Expand Up @@ -48,11 +49,18 @@ SENTRY_NO_INIT

- (instancetype)initWithType:(NSString *)type length:(NSUInteger)length NS_DESIGNATED_INITIALIZER;

- (instancetype)initWithType:(NSString *)type
length:(NSUInteger)length
filenname:(NSString *)filename
contentType:(NSString *)contentType;

/**
* The type of the envelope item.
*/
@property (nonatomic, readonly, copy) NSString *type;
@property (nonatomic, readonly) NSUInteger length;
@property (nonatomic, readonly, copy) NSString *_Nullable filename;
@property (nonatomic, readonly, copy) NSString *_Nullable contentType;

@end

Expand All @@ -62,6 +70,8 @@ SENTRY_NO_INIT
- (instancetype)initWithEvent:(SentryEvent *)event;
- (instancetype)initWithSession:(SentrySession *)session;
- (instancetype)initWithUserFeedback:(SentryUserFeedback *)userFeedback;
- (_Nullable instancetype)initWithAttachment:(SentryAttachment *)attachment
maxAttachmentSize:(NSUInteger)maxAttachmentSize;
- (instancetype)initWithHeader:(SentryEnvelopeItemHeader *)header
data:(NSData *)data NS_DESIGNATED_INITIALIZER;

Expand Down
22 changes: 19 additions & 3 deletions Source/Sentry.framework/Versions/A/Headers/SentryEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,21 @@ NS_SWIFT_NAME(Event)
@property (nonatomic, strong) SentryId *eventId;

/**
* Message of the event
* Message of the event.
*/
@property (nonatomic, strong) SentryMessage *message;
@property (nonatomic, strong) SentryMessage *_Nullable message;

/**
* The error of the event. This property adds convenience to access the error directly in
* beforeSend. This property is not serialized. Instead when preparing the event the SentryClient
* puts the error into exceptions.
*/
@property (nonatomic, copy) NSError *_Nullable error;

/**
* NSDate of when the event occured
*/
@property (nonatomic, strong) NSDate *timestamp;
@property (nonatomic, strong) NSDate *_Nullable timestamp;

/**
* NSDate of when the event started, mostly useful if event type transaction
Expand Down Expand Up @@ -164,6 +171,15 @@ NS_SWIFT_NAME(Event)
*/
- (instancetype)initWithLevel:(enum SentryLevel)level NS_DESIGNATED_INITIALIZER;

/**
* Initializes a SentryEvent with an NSError and sets the level to SentryLevelError.
*
* @param error The error of the event.
*
* @return The initialized SentryEvent.
*/
- (instancetype)initWithError:(NSError *)error;

@end

NS_ASSUME_NONNULL_END
10 changes: 5 additions & 5 deletions Source/Sentry.framework/Versions/A/Headers/SentryException.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

NS_ASSUME_NONNULL_BEGIN

@class SentryThread, SentryMechanism;
@class SentryStacktrace, SentryMechanism;

NS_SWIFT_NAME(Exception)
@interface SentryException : NSObject <SentrySerializable>
Expand All @@ -32,14 +32,14 @@ SENTRY_NO_INIT
@property (nonatomic, copy) NSString *_Nullable module;

/**
* Determines if the exception was reported by a user BOOL
* An optional value which refers to a thread in `SentryEvent.threads`.
*/
@property (nonatomic, copy) NSNumber *_Nullable userReported;
@property (nonatomic, copy) NSNumber *_Nullable threadId;

/**
* SentryThread of the SentryException
* Stacktrace containing frames of this exception.
*/
@property (nonatomic, strong) SentryThread *_Nullable thread;
@property (nonatomic, strong) SentryStacktrace *_Nullable stacktrace;

/**
* Initialize an SentryException with value and type
Expand Down
Loading

0 comments on commit 9e00986

Please sign in to comment.