Skip to content

Commit 81c9777

Browse files
committed
[LIBMOBILE-149] Fixed double device payload
1 parent 1a09583 commit 81c9777

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Analytics/Internal/SEGUtils.m

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,18 @@ BOOL getAdTrackingEnabled(SEGAnalyticsConfiguration *configuration)
171171
};
172172
}
173173

174+
NSDictionary *settingsDictionary = nil;
174175
#if TARGET_OS_IPHONE
175-
dict[@"device"] = mobileSpecifications(configuration, deviceToken);
176+
settingsDictionary = mobileSpecifications(configuration, deviceToken);
176177
#elif TARGET_OS_OSX
177-
dict[@"device"] = desktopSpecifications(configuration, deviceToken);
178+
settingsDictionary = desktopSpecifications(configuration, deviceToken);
178179
#endif
180+
181+
if (settingsDictionary != nil) {
182+
dict[@"device"] = settingsDictionary[@"device"];
183+
dict[@"os"] = settingsDictionary[@"os"];
184+
dict[@"screen"] = settingsDictionary[@"screen"];
185+
}
179186

180187
return dict;
181188
}

0 commit comments

Comments
 (0)