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-16 19:14:36 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
430f20ea24ef7aeca35a91119d27124b30764e98
430f20ea
1 parent
04d45c12
add checks if sdk is initialized
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.h
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.m
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.h
View file @
430f20e
...
...
@@ -101,7 +101,7 @@
-
(
void
)
getMultilingualMerchantsAsync
:(
NSArray
*
)
categories
andDefaultShown
:(
NSNumber
*
)
defaultShown
andCenter
:(
NSNumber
*
)
center
andTags
:(
NSArray
*
)
tags
andUuid
:(
NSString
*
)
uuid
andDistance
:(
NSNumber
*
)
distance
parent_uuids
:(
NSArray
*
)
parent_uuids
:
(
void
(
^
)(
NSDictionary
*
response
))
success
failureBlock
:
(
void
(
^
)(
NSError
*
error
))
failure
;
// - (void)didReceiveNotification:(NSDictionary *)userInfo whileAppWasInState:(WLApplicationState)state;
-
(
void
)
didReceiveNotification
:(
NSDictionary
*
)
payload
;
-
(
BOOL
)
checkforLoyaltySDKNotification
:(
NSDictionary
*
)
payload
;
-
(
NSNumber
*
)
checkforLoyaltySDKNotification
:(
NSDictionary
*
)
payload
;
// TEST CODE FOR PUSH
// - (BOOL)checkforLoyaltySDKNotification:(NSDictionary *)payload whileAppWasInState:(UIApplicationState)appState;
// TEST CODE FOR PUSH
...
...
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.m
View file @
430f20e
...
...
@@ -1692,13 +1692,19 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify";
// - (void)didReceiveNotification:(NSDictionary *)userInfo whileAppWasInState:(WLApplicationState)state {
-
(
void
)
didReceiveNotification
:
(
NSDictionary
*
)
payload
{
if
([
Warply
sharedServiceExists
]
==
YES
)
{
[[
Warply
sharedService
].
pushManager
didReceiveRemoteNotification
:
payload
whileAppWasInState
:
WLApplicationStateClosed
];
}
}
// - (BOOL)checkForLoyaltySDKNotification:(NSDictionary *)userInfo whileAppWasInState:(WLApplicationState)state {
-
(
BOOL
)
checkforLoyaltySDKNotification
:
(
NSDictionary
*
)
payload
{
-
(
NSNumber
*
)
checkforLoyaltySDKNotification
:
(
NSDictionary
*
)
payload
{
return
[[
Warply
sharedService
].
pushManager
checkforLoyaltySDKNotificationPM
:
payload
];
if
([
Warply
sharedServiceExists
]
==
YES
)
{
return
[[
Warply
sharedService
].
pushManager
checkforLoyaltySDKNotificationPM
:
payload
]
?
@1
:
@0
;
}
else
{
return
nil
;
}
}
// TEST CODE FOR PUSH
...
...
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
430f20e
...
...
@@ -6183,10 +6183,10 @@ public class swiftApi {
}
public
func
checkForLoyaltySDKNotification
(
_
payload
:
[
String
:
Any
])
->
Bool
{
public
func
checkForLoyaltySDKNotification
(
_
payload
:
[
String
:
Any
])
->
Bool
?
{
let
instanceOfMyApi
=
MyApi
()
return
instanceOfMyApi
.
checkforLoyaltySDKNotification
(
payload
)
return
instanceOfMyApi
.
checkforLoyaltySDKNotification
(
payload
)
as?
Bool
}
...
...
Please
register
or
login
to post a comment