简体   繁体   中英

How to get notification in watch kit extension set from ios app?

I want to get notification in iWatch set from iPhone application

Detail info

i have an application phrases and when i add phrase in favorite at that time notification set with given date and time and when notification fire at that time i want notification in iWatch (watch kit extension) autometically.

if anyone have done this please share because i search it from many days but i don't found any solution.

i create group and communicate with iWatch and iPhone works perfect but about notification i don't know any more and i want to see the body of notification in iwatch There is static notification demo is there but i want custom notification with my custom body without using .json file and appear automatically when notification fire in iPhone (app).

You can use app group concept here. Once you receive the notification on the iPhone write the data to a file in app group. From watch you have to monitor for that file for any write operation. When phone app updates the file by write operation your monitor class will be responsible for delivering that event in the watch and by this you can get the notification data that is posted in the phone to the watch.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM