Showing
1 changed file
with
40 additions
and
8 deletions
| ... | @@ -5725,14 +5725,46 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2) | ... | @@ -5725,14 +5725,46 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2) |
| 5725 | old_identifier_for_vendor = [[[UIDevice currentDevice] identifierForVendor] UUIDString]; | 5725 | old_identifier_for_vendor = [[[UIDevice currentDevice] identifierForVendor] UUIDString]; |
| 5726 | } | 5726 | } |
| 5727 | 5727 | ||
| 5728 | - NSDictionary *parameters = @{@"advertising_identifier": [[ASIdentifierManager sharedManager].advertisingIdentifier UUIDString], | 5728 | + // OLD parameters |
| 5729 | - @"old_identifier_for_vendor": old_identifier_for_vendor, | 5729 | + // NSDictionary *parameters = @{@"advertising_identifier": [[ASIdentifierManager sharedManager].advertisingIdentifier UUIDString], |
| 5730 | - @"new_identifier_for_vendor": [[[UIDevice currentDevice] identifierForVendor] UUIDString], | 5730 | + // @"old_identifier_for_vendor": old_identifier_for_vendor, |
| 5731 | - @"unique-device-id": [[[UIDevice currentDevice] identifierForVendor] UUIDString], | 5731 | + // @"new_identifier_for_vendor": [[[UIDevice currentDevice] identifierForVendor] UUIDString], |
| 5732 | - @"vendor": @"apple", | 5732 | + // @"unique-device-id": [[[UIDevice currentDevice] identifierForVendor] UUIDString], |
| 5733 | - @"platform": @"ios", | 5733 | + // @"vendor": @"apple", |
| 5734 | - @"os_version": [[UIDevice currentDevice] systemVersion], | 5734 | + // @"platform": @"ios", |
| 5735 | - @"channel": @"mobile"}; | 5735 | + // @"os_version": [[UIDevice currentDevice] systemVersion], |
| 5736 | + // @"channel": @"mobile"}; | ||
| 5737 | + | ||
| 5738 | + // NEW parameters | ||
| 5739 | + NSMutableDictionary *parameters = [[NSMutableDictionary alloc] init]; | ||
| 5740 | + | ||
| 5741 | + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; | ||
| 5742 | + if ([defaults boolForKey:@"trackersEnabled"] == YES) { | ||
| 5743 | + | ||
| 5744 | + [parameters setValue:@"ios" forKey:@"platform"]; | ||
| 5745 | + | ||
| 5746 | + [parameters setValue:@"Apple" forKey:@"manufacturer"]; | ||
| 5747 | + | ||
| 5748 | + if ([[UIDevice currentDevice] platform].length != 0) { | ||
| 5749 | + [parameters setValue:[[UIDevice currentDevice] platform] forKey:@"ios_device_model"]; | ||
| 5750 | + } | ||
| 5751 | + | ||
| 5752 | + [parameters setValue:[[UIDevice currentDevice] systemVersion] forKey:@"os_version"]; | ||
| 5753 | + | ||
| 5754 | + //Application Data Hack | ||
| 5755 | + NSBundle *mainBundle = [NSBundle mainBundle]; | ||
| 5756 | + | ||
| 5757 | + NSString *CFBundleShortVersionString = [mainBundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; | ||
| 5758 | + if (CFBundleShortVersionString.length != 0) { | ||
| 5759 | + [parameters setValue:CFBundleShortVersionString forKey:@"app_version"]; | ||
| 5760 | + } | ||
| 5761 | + } | ||
| 5762 | + | ||
| 5763 | + [parameters setValue:@"apple" forKey:@"vendor"]; | ||
| 5764 | + | ||
| 5765 | + [parameters setValue:[[[UIDevice currentDevice] identifierForVendor] UUIDString] forKey:@"unique_device_id"]; | ||
| 5766 | + | ||
| 5767 | + WLLOG(@"Registration parameters: %@", parameters); | ||
| 5736 | 5768 | ||
| 5737 | 5769 | ||
| 5738 | // NSData *jsonData = [NSJSONSerialization dataWithJSONObject:postDictionary options:0 error:NULL]; | 5770 | // NSData *jsonData = [NSJSONSerialization dataWithJSONObject:postDictionary options:0 error:NULL]; | ... | ... |
-
Please register or login to post a comment