Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Manos Chorianopoulos
2022-10-25 14:45:49 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
338319622dde6d9ecdb1dc83c767637d92c01bb9
33831962
1 parent
d9ebfef9
add new registration parameters with trackers
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
8 deletions
SwiftWarplyFramework/SwiftWarplyFramework/Warply/Warply.m
SwiftWarplyFramework/SwiftWarplyFramework/Warply/Warply.m
View file @
3383196
...
...
@@ -5725,14 +5725,46 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
old_identifier_for_vendor
=
[[[
UIDevice
currentDevice
]
identifierForVendor
]
UUIDString
];
}
NSDictionary
*
parameters
=
@{
@"advertising_identifier"
:
[[
ASIdentifierManager
sharedManager
].
advertisingIdentifier
UUIDString
],
@"old_identifier_for_vendor"
:
old_identifier_for_vendor
,
@"new_identifier_for_vendor"
:
[[[
UIDevice
currentDevice
]
identifierForVendor
]
UUIDString
],
@"unique-device-id"
:
[[[
UIDevice
currentDevice
]
identifierForVendor
]
UUIDString
],
@"vendor"
:
@"apple"
,
@"platform"
:
@"ios"
,
@"os_version"
:
[[
UIDevice
currentDevice
]
systemVersion
],
@"channel"
:
@"mobile"
};
// OLD parameters
// NSDictionary *parameters = @{@"advertising_identifier": [[ASIdentifierManager sharedManager].advertisingIdentifier UUIDString],
// @"old_identifier_for_vendor": old_identifier_for_vendor,
// @"new_identifier_for_vendor": [[[UIDevice currentDevice] identifierForVendor] UUIDString],
// @"unique-device-id": [[[UIDevice currentDevice] identifierForVendor] UUIDString],
// @"vendor": @"apple",
// @"platform": @"ios",
// @"os_version": [[UIDevice currentDevice] systemVersion],
// @"channel": @"mobile"};
// NEW parameters
NSMutableDictionary
*
parameters
=
[[
NSMutableDictionary
alloc
]
init
];
NSUserDefaults
*
defaults
=
[
NSUserDefaults
standardUserDefaults
];
if
([
defaults
boolForKey
:
@"trackersEnabled"
]
==
YES
)
{
[
parameters
setValue
:
@"ios"
forKey
:
@"platform"
];
[
parameters
setValue
:
@"Apple"
forKey
:
@"manufacturer"
];
if
([[
UIDevice
currentDevice
]
platform
].
length
!=
0
)
{
[
parameters
setValue
:[[
UIDevice
currentDevice
]
platform
]
forKey
:
@"ios_device_model"
];
}
[
parameters
setValue
:[[
UIDevice
currentDevice
]
systemVersion
]
forKey
:
@"os_version"
];
//Application Data Hack
NSBundle
*
mainBundle
=
[
NSBundle
mainBundle
];
NSString
*
CFBundleShortVersionString
=
[
mainBundle
objectForInfoDictionaryKey
:
@"CFBundleShortVersionString"
];
if
(
CFBundleShortVersionString
.
length
!=
0
)
{
[
parameters
setValue
:
CFBundleShortVersionString
forKey
:
@"app_version"
];
}
}
[
parameters
setValue
:
@"apple"
forKey
:
@"vendor"
];
[
parameters
setValue
:[[[
UIDevice
currentDevice
]
identifierForVendor
]
UUIDString
]
forKey
:
@"unique_device_id"
];
WLLOG
(
@"Registration parameters: %@"
,
parameters
);
// NSData *jsonData = [NSJSONSerialization dataWithJSONObject:postDictionary options:0 error:NULL];
...
...
Please
register
or
login
to post a comment