objective c - Apple Watch how to trigger a notification or glance from the main app -
i trigger apple watch notification , or glance views main app.
i know how run them in xcode , selecting directly, need make them popup inside main app programmatically.
in main app have timer today creates popup tell user something. same trigger show notification view on apple watch along dynamic text. keep simple now, suppose have button (ibaction). when button pressed in main app show glance or show notification views on watch. guessing simple havent been able make work, yet.
if have sample code great!
thank help!
while ios automatically shows notification controller when app receives remote or local notification.
but during development, can trigger notification or glance changing watch interface in watchkit app schema. (edit schema -> (under info) change watch interface glance/static notification / dynamic notification ).
however, selecting notification requires notification payload (create .apns file , set notification payload while editing schema) well.
hope helps !
Comments
Post a Comment