Binesh
Binesh

Reputation: 61

How to hide push notifications in iOS Swift without changing payload?

I want to hide specific push notifications from apns by checking it's content. Is there any way to do that other than making any server side changes(changing payload..etc)?..

Upvotes: 0

Views: 3090

Answers (1)

Avijit Nagare
Avijit Nagare

Reputation: 8782

Background and Closed state: You can't hide push notification as Push came on device are directly registered in iOS notification centre. you can hide this from server by removing "alert" key from payload(Depends on server used). but notification still delivered to device but not added in notification centre.

Active: You could check payload content directly in didReceiveRemoteNotificaiton: method to hide it.

Upvotes: 1

Related Questions