SparkDev97 / libSparkAppList

Do What The F*ck You Want To Public License
25 stars 8 forks source link

Doesn't receive notification. #3

Closed nicho1asdev closed 4 years ago

nicho1asdev commented 4 years ago

I initialise the SparkAppListTableViewController with for instance "com.nicho1asdev.dyadic" and I register a notification for the name "com.nicho1asdev.dyadic.sparkapplistupdate" I don't receive any notifications when toggling an app.

SparkDev97 commented 4 years ago

You need to register for a notification using NSNotificationCenter

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveNotification:) name:@"com.nicho1asdev.dyadic.sparkapplistupdate" object:nil];

I just checked this and it is working.

You can do this yourself by adding that code to your prefs bundle, and posting back to your tweak in whatever process using an IPC method.