Skip to content

Commit

Permalink
Fix visionOS agent name
Browse files Browse the repository at this point in the history
  • Loading branch information
cdillard-NewRelic committed Jan 22, 2024
1 parent 73e26ea commit f598ce4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions Agent/Utilities/NewRelicInternalUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#define NRMA_OSNAME_IOS @"iOS"
#define NRMA_OSNAME_TVOS @"tvOS"
#define NRMA_OSNAME_WATCHOS @"watchOS"
#define NRMA_OSNAME_VISIONOS @"visionOS"

#define NRMA_HTTP_STATUS_CODE_ERROR_THRESHOLD 400

Expand Down
8 changes: 7 additions & 1 deletion Agent/Utilities/NewRelicInternalUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,20 @@ + (NSString*) osName {
else if([[[UIDevice currentDevice] systemName] isEqualToString:NRMA_OSNAME_WATCHOS]) {
return NRMA_OSNAME_WATCHOS;
}

else if([[[UIDevice currentDevice] systemName] isEqualToString:NRMA_OSNAME_VISIONOS]) {
return NRMA_OSNAME_VISIONOS;
}

return NRMA_OSNAME_IOS;
}

+ (NSString*) agentName {
if ([[[UIDevice currentDevice] systemName] isEqualToString:NRMA_OSNAME_TVOS]) {
return @"tvOSAgent";
}
else if ([[[UIDevice currentDevice] systemName] isEqualToString:NRMA_OSNAME_VISIONOS]) {
return @"visionOSAgent";
}
return @"iOSAgent";
}

Expand Down
4 changes: 2 additions & 2 deletions Test Harness/NRTestApp/NRTestApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
2BD05DEF2ADF326A00C0C972 /* Process.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BD05DA22ADF2DF600C0C972 /* Process.swift */; };
2BD05DF22ADF32D300C0C972 /* harvestConnector.json in Resources */ = {isa = PBXBuildFile; fileRef = 2BD05DF12ADF32D300C0C972 /* harvestConnector.json */; };
2BF1FA3C2AE32C9500E9019C /* AppDelegate+UITest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BF1FA3B2AE32C9500E9019C /* AppDelegate+UITest.swift */; };
2BF1FDF52B50B61A006978F9 /* NewRelic.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8302B6229705766003EC291 /* NewRelic.framework */; platformFilters = (ios, xros, ); };
2BF1FDF62B50B61A006978F9 /* NewRelic.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = F8302B6229705766003EC291 /* NewRelic.framework */; platformFilters = (ios, xros, ); settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
2BF1FDF52B50B61A006978F9 /* NewRelic.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8302B6229705766003EC291 /* NewRelic.framework */; platformFilters = (ios, maccatalyst, ); };
2BF1FDF62B50B61A006978F9 /* NewRelic.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = F8302B6229705766003EC291 /* NewRelic.framework */; platformFilters = (ios, maccatalyst, ); settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
2BF1FDF82B50B716006978F9 /* NewRelic.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B8621D32AD6129000175D3C /* NewRelic.framework */; platformFilters = (xros, ); };
2BF1FDF92B50B716006978F9 /* NewRelic.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 2B8621D32AD6129000175D3C /* NewRelic.framework */; platformFilters = (xros, ); settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
2BF1FDFA2B50B71F006978F9 /* NewRelic.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B8621D32AD6129000175D3C /* NewRelic.framework */; platformFilters = (xros, ); };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F8302B14296F5EFB003EC291"
BlueprintIdentifier = "2BD05DD02ADF323A00C0C972"
BuildableName = "NRTestAppUITests.xctest"
BlueprintName = "NRTestAppUITests"
ReferencedContainer = "container:NRTestApp.xcodeproj">
Expand Down

0 comments on commit f598ce4

Please sign in to comment.