title: Terminating app - 'NSInvalidArgumentException', reason: '-[NSCFString objectForKey:]: unrecognized selector sent to instance
body: <p>I have the following code in my iOS app I had someone create. however, this section of the app breaks and crashes it. </p>
  
  <pre><code>   if([[dictHomeSettings allKeys] containsObject:@"notify_url"]) {
          NSString *notifyUrl = [dictHomeSettings objectForKey:@"notify_url"];
          if(notifyUrl.length&gt;0) {
              dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0ul);
              dispatch_async(queue, ^(void) {
  //                    //  You may want to cache this explicitly instead of reloading every time.
  //                    NSData *notifyData = [NSData dataWithContentsOfURL:[NSURL URLWithString:notifyUrl]];
  //                    NSError* error;
  //                    NSDictionary* json = [NSJSONSerialization JSONObjectWithData:notifyData
  //                                                                         options:kNilOptions
  //                                                                           error:&amp;error];
  
                  XMLDictionaryParser *xmlParser = [XMLDictionaryParser new];
                  NSXMLParser *parser = [[NSXMLParser alloc] initWithContentsOfURL:[NSURL URLWithString:notifyUrl]];
                  NSDictionary *aDict = [xmlParser dictionaryWithParser:parser];
  
                  dispatch_async(dispatch_get_main_queue(), ^{
                      //NSLog(@"myNsArray : %@",aDict);
                      if([[aDict allKeys] containsObject:@"Notification"]) {
                          NSArray *array = [aDict objectForKey:@"Notification"];
                          if(array.count&gt;0) {
                              [Common deletePreviousLocalNotifications];
                              for(NSDictionary *dictNotification in array) {
                                  NSDateFormatter *dateFormatter = [NSDateFormatter new];
                                  [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
  
                                  if([Common compareDate:[dictNotification objectForKey:@"StartTime"] isGreaterThanOrEqualDate:[dateFormatter stringFromDate:[NSDate date]]]) {
                                      NSLog(@"adding notification : %@",dictNotification);
                                      [Common addLocalNotificationAtDateTime:[dateFormatter dateFromString:[dictNotification objectForKey:@"StartTime"]] AlertBody:[dictNotification objectForKey:@"Message"] UserInfo:[NSDictionary dictionaryWithObjectsAndKeys:[dictNotification objectForKey:@"URL"], @"URL", nil]];
                                  }
                              }
                          }
                      }
                  });
              });
  </code></pre>