title: Error "'NSInvalidArgumentException', reason: '-[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance 0x134d0a3c0'"
body: <p>I'm implementing <code>Apple Push Notification Services</code> on my app. After getting the notification, I want to get the information and add it into a uitableview. I followed this <a href="https://www.youtube.com/playlist?list=PL9zw34QbYRx5oq8jZ-wdfHA4ww5K2O_jq" rel="nofollow"><em>Pushbots</em> tutorial</a> like this:</p>
  
  <p>In the <code>AppDelegate.m</code> file:</p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
      [Pushbots sharedInstanceWithAppId:@"--my app id--"];
      [[Pushbots sharedInstance] receivedPush:launchOptions];
      return YES;
  }
  
  - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
      // This method will be called everytime you open the app
      // Register the deviceToken on Pushbots
      [[Pushbots sharedInstance] registerOnPushbots:deviceToken];
  }
  
  -(void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error{
      NSLog(@"Notification Registration Error %@", [error userInfo]);
  }
  
  - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
      //Handle notification when the user click it while app is running in background or foreground.
      [[Pushbots sharedInstance] receivedPush:userInfo];
      NSString *msg = [userInfo valueForKey:@"aps"];
      NSLog(@"Push Notification:%@",msg);
  
      [[NSUserDefaults standardUserDefaults]setObject:msg forKey:@"ReceivedNotifications"];
  }
  </code></pre>
  
  <p>In my <code>ViewController.m</code>:</p>
  
  <pre><code>@interface ViewController () &lt;UITableViewDataSource, UITableViewDelegate&gt;
  @property (weak, nonatomic) IBOutlet UITableView *notifTableView;
  @end
  
  @implementation ViewController
  {
      NSMutableArray *notif;
  }
  
  - (void)viewDidLoad {
      [super viewDidLoad];
      notif = [[NSUserDefaults standardUserDefaults] objectForKey:@"ReceivedNotifications"];
  }
  
  - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  {
      return [notif count];
  }
  
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"];
      cell.textLabel.text = [notif objectAtIndex:indexPath.row];
      return cell;
  }
  </code></pre>
  
  <p>However, I keep getting an error at the console:</p>
  
  <pre><code>[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance 0x134d0a3c0
  *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance 0x134d0a3c0'
  *** First throw call stack:
  (0x180f45900 0x1805b3f80 0x180f4c61c 0x180f495b8 0x180e4d68c 0x100091b28 0x185f8931c 0x185f89484 0x185f787e8 0x185f8dfb0 0x185d2308c 0x185c33778 0x183642b2c 0x18363d738 0x18363d5f8 0x18363cc94 0x18363c9dc 0x1836360cc 0x180efc588 0x180efa32c 0x180e296a0 0x185ca6580 0x185ca0d90 0x100092a1c 0x1809ca8b8)
  libc++abi.dylib: terminating with uncaught exception of type NSException
  </code></pre>
  
  <p>This is my <code>main.m</code> file:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import "AppDelegate.h"
  
  int main(int argc, char * argv[]) {
      @autoreleasepool {
          return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
      }
  }
  </code></pre>
  
  <p>What's wrong?</p>