I’m trying to load a simple plist file in XCode 4 for an iPad application. The goal being that it will be loaded into the table portion of a split-view.
My project structure and plist look as follows:

I then declare an array in the interface of the RootViewController:
#import <UIKit/UIKit.h>
@class DetailViewController;
@interface RootViewController : UITableViewController {
NSArray *sites;
}
@property (nonatomic, retain) IBOutlet DetailViewController *detailViewController;
@end
I then, on viewDidLoad, attempt to load in the plist:
- (void)viewDidLoad
{
[super viewDidLoad];
self.clearsSelectionOnViewWillAppear = NO;
self.contentSizeForViewInPopover = CGSizeMake(320.0, 600.0);
NSBundle *bundle = [NSBundle mainBundle];
//NSLog(bundle);
NSString *path = [bundle pathForResource:@"StoredSites" ofType:@"plist"];
NSLog(path);
sites = [[NSArray alloc] initWithContentsOfFile:path];
NSLog(@"%d", [sites count]);
}
The NSLog statements first return what appears to be the valid path, but upon try to load the NSArray with the contents of the file, it comes back with a count of 0:

I checked in the build phases to see if the file reference appears, and it seems to be ok:

I know this must be a simple problem, but for some reason I’m not seeing what’s missing!
I appreciate the help –
The problem was the plist XML was wrapped in a dictionary rather than just being a simple array of arrays –
DShah covers it here: plist in xcode creation problem