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-09-15 18:38:00 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5774e33736c25e0c134015a15837cd501a337f7b
5774e337
1 parent
5d631fcb
added didReceiveNotification function
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
0 deletions
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.h
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.m
SwiftWarplyFramework/SwiftWarplyFramework/Warply/managers/WLPushManager.m
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.h
View file @
5774e33
...
...
@@ -99,6 +99,8 @@
-
(
void
)
getCampaignsPersonalizedAsync
:(
NSString
*
)
language
:
(
NSDictionary
*
)
filters
:
(
void
(
^
)(
NSDictionary
*
response
))
success
failureBlock
:
(
void
(
^
)(
NSError
*
error
))
failure
;
-
(
void
)
getSharingHistoryAsync
:(
void
(
^
)(
NSDictionary
*
response
))
success
failureBlock
:(
void
(
^
)(
NSError
*
error
))
failure
;
-
(
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
;
@end
#endif
/* MyApi_h */
...
...
SwiftWarplyFramework/SwiftWarplyFramework/MyApi.m
View file @
5774e33
...
...
@@ -1604,4 +1604,10 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify";
}];
}
// - (void)didReceiveNotification:(NSDictionary *)userInfo whileAppWasInState:(WLApplicationState)state {
-
(
void
)
didReceiveNotification
:
(
NSDictionary
*
)
payload
{
[[
Warply
sharedService
].
pushManager
didReceiveRemoteNotification
:
payload
whileAppWasInState
:
WLApplicationStateClosed
];
}
@end
...
...
SwiftWarplyFramework/SwiftWarplyFramework/Warply/managers/WLPushManager.m
View file @
5774e33
...
...
@@ -233,6 +233,7 @@ static const char* jailbreak_apps[] =
///////////////////////////////////////////////////////////////////////////////
-
(
void
)
didReceiveRemoteNotification
:
(
NSDictionary
*
)
userInfo
whileAppWasInState
:
(
WLApplicationState
)
state
{
// TODO: Check if this guard should be commented
if
([
userInfo
valueForKey
:
@"_a"
]
==
nil
)
{
// The push was sent from another push service
return
;
...
...
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
5774e33
...
...
@@ -5542,4 +5542,11 @@ public class swiftApi {
}
public
func
didReceiveNotification
(
_
payload
:
[
String
:
Any
])
->
Void
{
let
instanceOfMyApi
=
MyApi
()
instanceOfMyApi
.
didReceiveNotification
(
payload
)
}
}
...
...
Please
register
or
login
to post a comment