Showing
4 changed files
with
16 additions
and
0 deletions
... | @@ -99,6 +99,8 @@ | ... | @@ -99,6 +99,8 @@ |
99 | - (void)getCampaignsPersonalizedAsync:(NSString*)language :(NSDictionary*)filters :(void (^)(NSDictionary *response))success failureBlock:(void (^)(NSError *error))failure; | 99 | - (void)getCampaignsPersonalizedAsync:(NSString*)language :(NSDictionary*)filters :(void (^)(NSDictionary *response))success failureBlock:(void (^)(NSError *error))failure; |
100 | - (void)getSharingHistoryAsync:(void (^)(NSDictionary *response))success failureBlock:(void (^)(NSError *error))failure; | 100 | - (void)getSharingHistoryAsync:(void (^)(NSDictionary *response))success failureBlock:(void (^)(NSError *error))failure; |
101 | - (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; | 101 | - (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; |
102 | +// - (void)didReceiveNotification:(NSDictionary *)userInfo whileAppWasInState:(WLApplicationState)state; | ||
103 | +- (void)didReceiveNotification:(NSDictionary *)payload; | ||
102 | 104 | ||
103 | @end | 105 | @end |
104 | #endif /* MyApi_h */ | 106 | #endif /* MyApi_h */ | ... | ... |
... | @@ -1604,4 +1604,10 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify"; | ... | @@ -1604,4 +1604,10 @@ NSString *VERIFY_URL = @"/partners/cosmote/verify"; |
1604 | }]; | 1604 | }]; |
1605 | } | 1605 | } |
1606 | 1606 | ||
1607 | +// - (void)didReceiveNotification:(NSDictionary *)userInfo whileAppWasInState:(WLApplicationState)state { | ||
1608 | +- (void)didReceiveNotification:(NSDictionary *)payload { | ||
1609 | + | ||
1610 | + [[Warply sharedService].pushManager didReceiveRemoteNotification:payload whileAppWasInState:WLApplicationStateClosed]; | ||
1611 | +} | ||
1612 | + | ||
1607 | @end | 1613 | @end | ... | ... |
... | @@ -233,6 +233,7 @@ static const char* jailbreak_apps[] = | ... | @@ -233,6 +233,7 @@ static const char* jailbreak_apps[] = |
233 | /////////////////////////////////////////////////////////////////////////////// | 233 | /////////////////////////////////////////////////////////////////////////////// |
234 | - (void)didReceiveRemoteNotification:(NSDictionary *)userInfo whileAppWasInState:(WLApplicationState)state | 234 | - (void)didReceiveRemoteNotification:(NSDictionary *)userInfo whileAppWasInState:(WLApplicationState)state |
235 | { | 235 | { |
236 | + // TODO: Check if this guard should be commented | ||
236 | if ([userInfo valueForKey:@"_a"] == nil) { | 237 | if ([userInfo valueForKey:@"_a"] == nil) { |
237 | // The push was sent from another push service | 238 | // The push was sent from another push service |
238 | return; | 239 | return; | ... | ... |
... | @@ -5542,4 +5542,11 @@ public class swiftApi { | ... | @@ -5542,4 +5542,11 @@ public class swiftApi { |
5542 | } | 5542 | } |
5543 | 5543 | ||
5544 | 5544 | ||
5545 | + public func didReceiveNotification(_ payload: [String : Any]) -> Void { | ||
5546 | + | ||
5547 | + let instanceOfMyApi = MyApi() | ||
5548 | + instanceOfMyApi.didReceiveNotification(payload) | ||
5549 | + } | ||
5550 | + | ||
5551 | + | ||
5545 | } | 5552 | } | ... | ... |
-
Please register or login to post a comment