Skip to content

Commit

Permalink
Changed userAgent from local string to unknown
Browse files Browse the repository at this point in the history
  • Loading branch information
arnabp92 committed Apr 18, 2020
1 parent 083749d commit 7d36baf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Rudder.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Rudder'
s.version = "1.0.1-patch.2"
s.version = "1.0.1-patch.3"
s.summary = "Privacy and Security focused Segment-alternative. iOS SDK"
s.description = <<-DESC
Rudder is a platform for collecting, storing and routing customer event data to dozens of tools. Rudder is open-source, can run in your cloud environment (AWS, GCP, Azure or even your data-centre) and provides a powerful transformation framework to process your event data on the fly.
Expand All @@ -10,7 +10,7 @@ Pod::Spec.new do |s|
s.license = { :type => "Apache", :file => "LICENSE" }
s.author = { "Rudderstack" => "arnab@rudderlabs.com" }
s.platform = :ios, "9.0"
s.source = { :git => "https://github.com/rudderlabs/rudder-sdk-ios.git", :commit => "3b31c4b39d28608ae92944155e9a9e3f5298819a" }
s.source = { :git => "https://github.com/rudderlabs/rudder-sdk-ios.git", :commit => "083749df1a06e591aae29ad698d7fad3aa907829" }

s.ios.deployment_target = '8.0'

Expand Down
10 changes: 1 addition & 9 deletions Rudder/Classes/RudderContext.m
Original file line number Diff line number Diff line change
Expand Up @@ -95,22 +95,14 @@ - (void)putDeviceToken:(NSString *)deviceToken {
_device.token = deviceToken;
}

- (NSString*) getLocalUAString {
return [[NSString alloc] initWithFormat:@"%@/%@ %@/%@ %@/%@",
_app.name, _app.version,
_device.model, _device.name,
_os.name, _os.version
];
}

- (NSDictionary<NSString *,NSObject *> *)dict {
NSMutableDictionary *tempDict = [[NSMutableDictionary alloc] init];
[tempDict setObject:[_app dict] forKey:@"app"];
[tempDict setObject:_traits forKey:@"traits"];
[tempDict setObject:[_library dict] forKey:@"library"];
[tempDict setObject:[_os dict] forKey:@"os"];
[tempDict setObject:[_screen dict] forKey:@"screen"];
[tempDict setObject:_userAgent ?: [self getLocalUAString] forKey:@"userAgent"];
[tempDict setObject:_userAgent ?: @"unknown" forKey:@"userAgent"];
[tempDict setObject:_locale forKey:@"locale"];
[tempDict setObject:[_device dict] forKey:@"device"];
[tempDict setObject:[_network dict] forKey:@"network"];
Expand Down

0 comments on commit 7d36baf

Please sign in to comment.