Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

preetib

macrumors newbie
Original poster
Hi,

I had my code working well in Xcode until I cleaned all the targets from build menu. Since then my application crashes saying
"Unable to load nib file: MainMenu, exiting"

As per few threads I tried searching for the MainMenu.xib file and it is there in the Resources folder (both in Xcode and through Finder). If I attempt to open it from both these places it opens well in Interface Builder. I also checked if all my views and objects were connected in Interface Builder and they are. Any idea as to what mus be going wrong?

Thanks,

-Preeti
 
Don't do that? 😛

On a more serious note, when your application is launched via Xcode, it requires at least one target be present in the project, so everything can be configured correctly. Does your application launch when double-clicked outside Xcode? If it does, then there's your problem.
 
Got to know never to do that!

Anyway I fixed it. Yes my targets were not set. I ran into another problem hope you could tell me. I have a folder with 11 property lists in it. I want to copy all these property lists into a NSDictionary. I am doing it as follows:

NSString *presetPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent😡"Presets/"];
//NSArray *presetMenu = [[NSArray alloc]init];
BOOL isDir = YES;
if (![[NSFileManager defaultManager] fileExistsAtPath😛resetPath isDirectory:&isDir] && isDir).............(It detects this path)
{
[[NSFileManager defaultManager] createDirectoryAtPath😛resetPath attributes:nil];
}
NSDictionary *presetDict = [[NSDictionary alloc]initWithContentsOfFile😛resetPath];............(But doesn't copy anything into the directory)

Can you tell me how should I achieve this?

Thanks,

-Preeti
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.