Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wat is the difference between static notification and dynamic notification?

Wat is the difference between static notification and dynamic notification? could anyone help me

like image 343
Spekham2013 Avatar asked Feb 07 '15 11:02

Spekham2013


2 Answers

Notifications come in 2 flavours Short and Long (as per iOS 8.2). The Long ones can be Static or Dynamic. All of them have a system "Dismiss" button.

Short You can't customise these at all. They show your app logo, the title of the notification payload and your app name.

Long - Static You can customise these on the Storyboard. You can't add buttons directly on the Storyboard but you can have them if defined properly on the Notification payload (.apns file). You can add images if they are in the bundle only.

Long - Dynamic Everything Static ones can do but you have here the chance to update the UI elements with new data not coming on the Notification payload or even update the UI elements like graphics from the hosted app (maybe a map screenshot). Again, you can't put buttons from the Storyboard but you can have them if defined on the Notification payload. Try to avoid using these if you can do what you want with Static ones as the Watch will default to Static ones in some cases (low battery...)

like image 171
Juan Fran Jimenez Avatar answered Nov 07 '22 08:11

Juan Fran Jimenez


WatchKit notifications come in two forms:

Static UI
A default notification interface native to WatchKit. Primarily shown if an iOS application doesn't have a WatchKit application. These allow all notifications from iOS to appear on Apple Watch from day 1 without extra effort. Their UI is very stock standard and minimal, hence static.

Dynamic UI
WatchKit applications allow developers to create dynamic notification interfaces at design-time in Xcode. They're dynamic because you have the ability to present a unique UI to your user based on the contents of the notification, such as images.

Although WatchKit does fall back to a static UI in certain cases if needed (watch disconnects from phone or internet).

This Getting Started With WatchKit video goes into greater detail, I highly recommend it. And the relevant section in Apple's WatchKit Programming Guide.

like image 35
phillfarrugia Avatar answered Nov 07 '22 09:11

phillfarrugia