Push Notifications Flashcards

1
Q

Notification message flow

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Maximum payload

A

4KB

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

grouping notification

A

Adding the thread_identifier key to the alert dictionary will let iOS combine all notifications with the same identifier value into a single group in the notification center

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

“Utilize the apns-collapse-id HTTP header field when”

A

“overriding” or “updating” your notification is more appropriate than sending an additional notification.”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Standard Payload

A

aps”: {
“alert”: {
“title”: “Your food is done.”,
“body”: “Be careful, it’s really hot!”
},
“badge”: 12,
“sound”: {
“critial”: 1,
“name”: “filename.caf”,
“volume”: 0.75
}
}
}

everything what outside is your custom keys

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

When apple will issue a new device token

A

When the user installs the app on another device, restores from an old backup, reinstalls iOS and in some other cases. You should never try and link a token to a specific user.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Provisional authorization

A

“Apple provides another useful case for the UNAuthorizationOptions enum that you can pass to requestAuthorization during setup. If you include .provisional in the options argument, notifications will automatically be delivered silently to the user’s Notification Center, without asking for permission - there will be no sound or alerts for these provisional notifications.”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Critical alerts

A

Critical alerts will bypass the Do Not Disturb and ringer switch settings as well as always play a sound… even a custom sound.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

“If you’d like to have iOS display your notification while your app is running in the foreground, you’ll need to implement the UNUserNotificationCenterDelegate method:

A

which is called when a notification is delivered to your app while it’s in the foreground. The only requirement of this method is calling the completion handler before it returns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

tap notification

A

didRecieve

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Make another class delegate for nsNotificationDelegate

A

you can send info from appDelegate, but appDelegate is a delegate for NSNotification and it the same time you can make another class to conform NSNotificationDelegate and set it as self in appDelegate for NSNotification object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

For iOS to display your notification while your app is running in the foreground, you’ll need to implement a

A

UNUserNotificationCenterDelegate method, which is called when a notification is delivered to your app while it’s in the foreground.”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Sometimes, you want a tapped notification to open a specific view controller within your app. You will need to

A

add an additional method to handle this routing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

You can make a push notification actionable by attaching

A

a button to a notification

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Notification categories allow you to specify

A

up to four custom actions per category that will be displayed with your push notification

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Since you do not want the AppDelegate to be where you take action when a push notification arrives

A

send a Foundation notification that reports what happened instead. That allows your other view controllers to take an appropriate action.

17
Q

How to send info that User click action to other view controller

A
  1. create & register category
  2. create Notification.Name ext to send appropriate notification for each action
  3. subscribe from each vc that you want to get it
18
Q

Sharing data with your main target

A

App Groups

19
Q

badging push notification

A

use userDefault to calculate badges

20
Q

Get info from core date from service ext

A

Checkmark service ext in each class that you going to use in service ext (app groups should be enabled)

Create custom place for your core date container

21
Q

Accepting text input in push notification

A

UNTextInputNotificationAction

22
Q
A