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-22 19:56:23 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e6360973c77a3c3e32b73a27f3ac87f8d813236a
e6360973
1 parent
2233fa7a
add initialisation checks at sendDeviceInfo
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
4 deletions
SwiftWarplyFramework/Pods/Pods.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
SwiftWarplyFramework/SwiftWarplyFramework.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.h
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.m
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/Pods/Pods.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
e636097
...
...
@@ -7,7 +7,7 @@
<key>
Pods-SwiftWarplyFramework.xcscheme_^#shared#^_
</key>
<dict>
<key>
orderHint
</key>
<integer>
1
</integer>
<integer>
0
</integer>
</dict>
</dict>
</dict>
...
...
SwiftWarplyFramework/SwiftWarplyFramework.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
e636097
...
...
@@ -7,7 +7,7 @@
<key>
SwiftWarplyFramework.xcscheme_^#shared#^_
</key>
<dict>
<key>
orderHint
</key>
<integer>
0
</integer>
<integer>
1
</integer>
</dict>
</dict>
</dict>
...
...
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
e636097
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.h
View file @
e636097
...
...
@@ -107,6 +107,7 @@
// TEST CODE FOR PUSH
// - (BOOL)checkforLoyaltySDKNotification:(NSDictionary *)payload :(void(^)(NSNumber *successResponse))success failureBlock:(void(^)(NSNumber *failureResponse))failure;
-
(
void
)
sendDeviceInfoIfNecessary
:(
NSString
*
)
newDeviceToken
;
-
(
BOOL
)
sdkInitialised
;
-
(
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
;
-
(
void
)
getSingleCampaignAsync
:(
NSString
*
)
sessionUuid
:
(
void
(
^
)(
NSDictionary
*
response
))
success
failureBlock
:
(
void
(
^
)(
NSError
*
error
))
failure
;
-
(
void
)
sendEvent
:
(
NSString
*
)
eventName
priority
:
(
BOOL
)
priority
;
...
...
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.m
View file @
e636097
...
...
@@ -1735,6 +1735,16 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify";
}
-
(
BOOL
)
sdkInitialised
{
if
([
Warply
sharedServiceExists
]
==
YES
)
{
return
YES
;
}
else
{
return
NO
;
}
}
-
(
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
{
[[
Warply
sharedService
]
editProfileWithSuccessBlock
:
firstname
andLastName
:
lastname
andEmail
:
email
andSalutation
:
salutation
andMsisdn
:
msisdn
andNickname
:
nickname
andGender
:
gender
andBirthday
:
birthday
andNameDay
:
nameday
andTaxID
:
taxid
andProfileMetadata
:
profileMetadata
optin
:
optin
newsLetter
:
newsletter
andSMS
:
sms
andSegmentation
:
segmentation
andSMSSegmentation
:
smsSegmentation
:^
(
NSDictionary
*
response
)
{
if
(
success
)
{
...
...
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
e636097
...
...
@@ -6259,9 +6259,26 @@ public class swiftApi {
public
func
sendDeviceInfoIfNecessary
(
_
newDeviceToken
:
String
)
->
Void
{
let
instanceOfMyApi
=
MyApi
()
instanceOfMyApi
.
sendDeviceInfoIfNecessary
(
newDeviceToken
)
let
isInitialised
=
instanceOfMyApi
.
sdkInitialised
();
if
(
isInitialised
==
true
)
{
instanceOfMyApi
.
sendDeviceInfoIfNecessary
(
newDeviceToken
)
}
else
{
instanceOfMyApi
.
initialize
(
withCallback
:
nil
,
uuid
:
"0086a2088301440792091b9f814c2267"
,
merchantId
:
"58763"
,
lang
:
"el"
,
successBlock
:
initializeCallback
,
failureBlock
:
initializeFailureCallback
)
}
func
initializeCallback
(
_
initializeData
:
[
AnyHashable
:
Any
]?)
->
Void
{
if
((
initializeData
?[
"status"
]
as?
Int
)
==
1
)
{
instanceOfMyApi
.
sendDeviceInfoIfNecessary
(
newDeviceToken
)
}
}
func
initializeFailureCallback
(
_
error
:
Error
?)
->
Void
{
}
}
...
...
Please
register
or
login
to post a comment