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-11-09 16:30:41 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
732971b10e10d2eb5a432618324f3e9c078162b1
732971b1
1 parent
e68af019
fix sendDeviceInfo crash
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
10 deletions
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.m
SwiftWarplyFramework/SwiftWarplyFramework/Warply/Warply.m
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.m
View file @
732971b
...
...
@@ -1723,7 +1723,10 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify";
-
(
void
)
sendDeviceInfoIfNecessary
:
(
NSString
*
)
newDeviceToken
{
[[
Warply
sharedService
].
pushManager
sendDeviceInfoIfNecessary
:
newDeviceToken
];
if
([
Warply
sharedService
]
!=
nil
)
{
[[
Warply
sharedService
].
pushManager
sendDeviceInfoIfNecessary
:
newDeviceToken
];
}
}
-
(
void
)
editProfileAsync
:
(
NSString
*
)
firstname
andLastname
:
(
NSString
*
)
lastname
andEmail
:
(
NSString
*
)
email
andSalutation
:
(
NSString
*
)
salutation
andMsisdn
:
(
NSString
*
)
msisdn
andNickname
:
(
NSString
*
)
nickname
andGender
:
(
NSString
*
)
gender
andBirthday
:
(
NSString
*
)
birthday
andNameDay
:
(
NSString
*
)
nameday
andTaxID
:
(
NSString
*
)
taxid
andProfileMetadata
:
(
NSDictionary
*
)
profileMetadata
optin
:
(
NSNumber
*
)
optin
newsLetter
:
(
NSNumber
*
)
newsletter
andSMS
:
(
NSNumber
*
)
sms
andSegmentation
:
(
NSNumber
*
)
segmentation
andSMSSegmentation
:
(
NSNumber
*
)
smsSegmentation
:
(
void
(
^
)(
NSDictionary
*
response
))
success
failureBlock
:
(
void
(
^
)(
NSError
*
error
))
failure
{
...
...
SwiftWarplyFramework/SwiftWarplyFramework/Warply/Warply.m
View file @
732971b
...
...
@@ -5888,14 +5888,45 @@ 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"
};
// 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];
...
...
@@ -6090,7 +6121,8 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
///////////////////////////////////////////////////////////////////////////////
-
(
void
)
registration
{
[
self
registrationWithSuccessBlock
:
nil
andFailureBlock
:
nil
];
// [self registrationWithSuccessBlock:nil andFailureBlock:nil];
[
self
registrationWithSuccessBlock2
:
nil
andFailureBlock
:
nil
];
}
///////////////////////////////////////////////////////////////////////////////
...
...
Please
register
or
login
to post a comment