-
-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add extra SdkInfo packages (#4637)
- Loading branch information
1 parent
716a5b0
commit 86e9bf2
Showing
20 changed files
with
482 additions
and
107 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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#import "SentryExtraPackages.h" | ||
#import "SentryMeta.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@implementation SentryExtraPackages | ||
|
||
static NSSet<NSDictionary<NSString *, NSString *> *> *extraPackages; | ||
|
||
+ (void)initialize | ||
{ | ||
if (self == [SentryExtraPackages class]) { | ||
extraPackages = [[NSSet alloc] init]; | ||
} | ||
} | ||
|
||
+ (void)addPackageName:(NSString *)name version:(NSString *)version | ||
{ | ||
if (name == nil || version == nil) { | ||
return; | ||
} | ||
|
||
@synchronized(extraPackages) { | ||
NSDictionary<NSString *, NSString *> *newPackage = | ||
@{ @"name" : name, @"version" : version }; | ||
extraPackages = [extraPackages setByAddingObject:newPackage]; | ||
} | ||
} | ||
|
||
+ (NSMutableSet<NSDictionary<NSString *, NSString *> *> *)getPackages | ||
{ | ||
@synchronized(extraPackages) { | ||
return [extraPackages mutableCopy]; | ||
} | ||
} | ||
|
||
#if TEST || TESTCI | ||
+ (void)clear | ||
{ | ||
extraPackages = [[NSSet alloc] init]; | ||
} | ||
#endif | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_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
Oops, something went wrong.