Your problem are our challenges

iOS

INTERFACE TYPE CANNOT BE STATICALLY ALLOCATED

August 15, 2011 — Anonymous
Filed under:

If you’ve tried doing something like this:

NSDictionary myDictionary = …

then you’ll run into this error code:
error: Semantic Issue: Interface type cannot be statically allocated

You need to declare a pointer to the instance variable. The correct code is:

NSDictionary *myDictionary = …

iOS How to Load a plist

July 31, 2011 — Anonymous
Filed under:

Property Lists – plists – are a standard way of storing data in iPhone and MacOS programs. Here’s how you use them on the iPhone.

NSString* plistPath = [[NSBundle mainBundle] pathForResource:@"dwarves" ofType:@"plist"];
NSDictionary *plistDict = [[NSDictionary alloc] initWithContentsOfFile:plistPath];

// use plistDict

[plistPath release];
[plistDict release];