0

i'm building a SpriteBuilder project and getting the error of:

" * Assertion failure in int UIApplicationMain(int, char **, NSString *, NSString *)(), /SourceCache/UIKit_Sim/UIKit-2903.23/UIApplication.m:2380 Unable to instantiate the UIApplication subclass instance. No class named NSApplication is loaded."

For the main.m code of:

#import <UIKit/UIKit.h>

int main(int argc, char *argv[]) {

@autoreleasepool {
    int retVal = UIApplicationMain(argc, argv, nil, @"AppController");
    return retVal;
   }
}

What's the cause?

Luca Angeletti
  • 58,465
  • 13
  • 121
  • 148
  • Have you made any modifications to the project or is this purely from a sprite builder template? – Rob Segal May 22 '14 at 18:56
  • This is from a modified project but i don't see why i'm getting this error? – user3623891 May 22 '14 at 19:05
  • Hard to say. Can you summarize the changes that were made? If you make an absolutely brand new project off the standard sprite build template does that work? If so it's probably something in the modifications that were done to the project. – Rob Segal May 22 '14 at 19:08
  • When i check, my info.plist is corrupted. I replace it with another info.plist but still getting the error. My other project is working. Any advice? – user3623891 May 22 '14 at 19:11
  • Create a new project that does work. Port over changes from modified version one by one and see if it crashes eventually. That may or may not be tedious depending on how many changes there are. A nice diff tool should help expedite that work. Are there more changes past the info.plist one? – Rob Segal May 22 '14 at 19:28
  • What do you mean by "corrupted"? If you replace it, do so with one from another spritebuilder project. It kind of sounds like the Info.plist might have been for an OS X project (because of "NSApplication"). – CodeSmile May 22 '14 at 20:11

1 Answers1

1

XCode is referring to the wrong info.plist file. In Build Settings, the info.plist path should be "Source/Resources/Info.plist" instead of "$(SRCROOT)/Source/libs/cocos2d-iphone/external/Chipmunk/xcode/main-Info.plist". Changing the path fixed it.