Skip to content

Commit

Permalink
NR-218026 added Unreal to application platform (#200)
Browse files Browse the repository at this point in the history
* NR-218026 added Unreal to application platform

* Added a test
  • Loading branch information
mbruin-NR authored Feb 5, 2024
1 parent b22af29 commit b15f0ff
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Agent/Public/NRConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ extern "C" {
NRMAPlatform_ReactNative,
NRMAPlatform_Flutter,
NRMAPlatform_Capacitor,
NRMAPlatform_MAUI
NRMAPlatform_MAUI,
NRMAPlatform_Unreal
};

// these constants are paired with enum values of NRMAApplicationPlatform
Expand All @@ -49,6 +50,7 @@ extern "C" {
#define kNRMAPlatformString_Flutter @"Flutter"
#define kNRMAPlatformString_Capacitor @"Capacitor"
#define kNRMAPlatformString_MAUI @"MAUI"
#define kNRMAPlatformString_Unreal @"Unreal"


//Custom Trace Types
Expand Down
2 changes: 2 additions & 0 deletions Agent/Utilities/NewRelicInternalUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ + (NSString*) stringFromNRMAApplicationPlatform:(NRMAApplicationPlatform)applica
return kNRMAPlatformString_Capacitor;
case NRMAPlatform_MAUI:
return kNRMAPlatformString_MAUI;
case NRMAPlatform_Unreal:
return kNRMAPlatformString_Unreal;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ - (void) testCorrectness
NRMAApplicationPlatform capacitor = NRMAPlatform_Capacitor;
NSString* capacitorPlatformString = [NewRelicInternalUtils stringFromNRMAApplicationPlatform:capacitor];
XCTAssertTrue([capacitorPlatformString isEqualToString:expectedCapacitorString]);

NSString* expectedUnrealString = @"Unreal";

NRMAApplicationPlatform Unreal = NRMAPlatform_Unreal;
NSString* UnrealPlatformString = [NewRelicInternalUtils stringFromNRMAApplicationPlatform:Unreal];
XCTAssertTrue([UnrealPlatformString isEqualToString:expectedUnrealString]);
}


Expand Down

0 comments on commit b15f0ff

Please sign in to comment.