How to communicate between iOS App Containing Extension and Extension (not Host App)

后端 未结 4 1384
攒了一身酷
攒了一身酷 2021-01-30 17:46

TLDR: Is it possible to send realtime messages or notifications between iOS App and it\'s Extension?

I\'m writing an iOS App with an extension

4条回答
  •  北荒
    北荒 (楼主)
    2021-01-30 18:22

    I've been struggling with the same issue and haven't found a clean solution either. Another hacky way to solve this is to simply run a timer in the extension and check the values in the shared container preferences/database periodically and then update if required. Not elegant, but it seems to work.

提交回复
热议问题