Documentation on contents of Notification Attributes for various apps?

Where can I find documentation on contents of Notification Attributes for various apps?

Specifically, I want to figure out how to detect that a particular person sent me a message. I tried specifying MBLANCSNotificationAttributeIDTitle and @Heath Borders for my notification attribute ID and attribute data respectively, but that didn't work for iMessage.

Thoughts?








Comments

  • I also tried MBLANCSNotificationAttributeIDSubtitle and @Heath Bordesr for my notification attribute ID and attribute data respectively, but that caused MetaWear to drop my connection when I called -[MBLEvent downloadLogAndStopLogging:handler:progressHandler:].
  • Previous message should be @Heath Borders
  • Now, I reset the device between tests and I was able to get my handler callback to fire. However, it contained an empty array and no error. I sent 1 text message, so there should have been at least 1 event. The working code is below:







    - (IBAction)logAncsValueChanged:(id)sender

    {

        if (self.logAncsSwitch.on) {

            self.anyCategoryEvent = [self.device.ancs eventWithCategoryIds:MBLANCSCategoryIDAny

                                                                  eventIds:MBLANCSEventIDNotificationAdded

                                                                eventFlags:MBLANCSEventFlagAny

                                                               attributeId:MBLANCSNotificationAttributeIDTitle

                                                             attributeData:@Heath Borders

                                                                identifier:@heath2];

            [self.anyCategoryEvent startLogging];

        } else {

            if (self.anyCategoryEvent) {

                __typeof__(self) __weak weakSelf = self;

                [self.anyCategoryEvent downloadLogAndStopLogging:YES

                                                    handler:(^(NSArray *array, NSError *error) {

    // this fires, but [array count] == 0 and error == nil

                    NSLog(@Received %@ entries with error: %@", @(array.count), error.description);

                    for (MBLLogEntry *logEntry in array) {

                        NSLog(@class: %@, timestamp: %@, entry: %@", NSStringFromClass([logEntry class]), logEntry.timestamp, logEntry);

                    }

                    weakSelf.anyCategoryEvent = nil;

                })

                                            progressHandler:(^(float number, NSError *error) {

                    

                })];

            } else {

                NSLog(@Wasn't previously logging);

            }

        }

    }

  • Will forward this to iOS API developer.
This discussion has been closed.