boom
boom

Reputation: 6166

communicate between today widget and application

I have a today widget and an application. The need is to communicate between them so that information can be passed any any point of time when both are running.

I can achieve communicating tow application on Mac application using NSProxy, setting one process as server.

Regards,

Upvotes: 0

Views: 2015

Answers (2)

PGDev
PGDev

Reputation: 24341

Communication between Host App and Today Extension:

  1. To share data: use AppGroups

  2. To share code: use Frameworks

Refer to: https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/ExtensionScenarios.html#//apple_ref/doc/uid/TP40014214-CH21-SW1

For more on how to implement Today Extension: https://github.com/pgpt10/Today-Widget

Upvotes: 2

elk_cloner
elk_cloner

Reputation: 2149

If you want to communicate between today extension and your app. you can use nsuserdefaults.

There is good tutorial for this. app-extension-programming-today

Upvotes: 0

Related Questions