Skip to content

Commit 79a8af0

Browse files
authored
Add device name and OS to UserAgent string for iOS (#303)
2 parents 6ba2766 + 595b1a6 commit 79a8af0

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

Automattic-Tracks-iOS.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Pod::Spec.new do |s|
44
s.name = 'Automattic-Tracks-iOS'
5-
s.version = '3.5.2'
5+
s.version = '3.5.3'
66

77
s.summary = 'Simple way to track events in an iOS app with Automattic Tracks internal service'
88
s.description = <<-DESC

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ _None._
4848

4949
_None._
5050

51+
## 3.5.3
52+
53+
### Internal Changes
54+
55+
- Send device model and OS with UserAgent string [#303]
56+
5157
## 3.5.2
5258

5359
### Internal Changes

Sources/Event Logging/TracksService.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,10 @@ - (NSDictionary *)dictionaryForTracksEvent:(TracksEvent *)tracksEvent withParent
472472
- (NSString *)userAgent
473473
{
474474
#if TARGET_OS_IPHONE
475-
return [NSString stringWithFormat:@"Nosara Client for iOS %@", TracksLibraryVersion];
475+
NSString *deviceModel = self.deviceInformation.model;
476+
NSString *osName = self.deviceInformation.os;
477+
NSString *osVersion = self.deviceInformation.version;
478+
return [NSString stringWithFormat:@"Nosara Client %@ for %@, %@:%@", TracksLibraryVersion, deviceModel, osName, osVersion];
476479
#endif
477480

478481
#if TARGET_OS_MAC
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#import "TracksConstants.h"
22

33
NSString *const TracksErrorDomain = @"TracksErrorDomain";
4-
NSString *const TracksLibraryVersion = @"3.5.2";
4+
NSString *const TracksLibraryVersion = @"3.5.3";

0 commit comments

Comments
 (0)