0

I am trying to develop 1 app with phone gap. When i try to use plugin extractzipfile for iOS it's throw this error:

Undefined symbols for architecture i386:
"_main", referenced from:
    start in crt1.o
  ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

then i seach for issue and i find 1: "add main.m in to compiler source of compiler phrase".

and this error above is fixed. But it's throw an exeption:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unable to instantiate the UIApplication delegate instance. No class named AppDelegate is loaded.'

I am using phonegap 2.5.0 and Xcode 4.6.1, use iPhone simulator 6.1

Please, hlep me! i am new and fool!

thanh for reading!

Lê Huy
  • 195
  • 1
  • 4
  • 13
  • 'Undefined symbols' errors usually mean you have files missing. The exception confirms this, you're missing an AppDelegate class. Does your project have AppDelegate.h and AppDelegate.m files? – JDx Apr 09 '13 at 08:37
  • Thanks for respond! I have 2 that file. – Lê Huy Apr 09 '13 at 08:50
  • Ok, then for some reason the AppDelegate is not being loaded when the app starts. Can you post your main.m file? – JDx Apr 09 '13 at 08:52
  • I am try to add something in compiler source and now it's so up new error, i post my ques at here:http://stackoverflow.com/questions/15897702/undefined-symbols-for-architecture-armv7-objc-class-ssziparchive Please help me – Lê Huy Apr 09 '13 at 09:15

1 Answers1

0

If you get this sort of thing appearing suddenly, it usually means the project is missing some frameworks it needs. Libraries and dependent projects can require frameworks, so if you've added one recently then that can cause this error.

To add frameworks, right click on the project name in the project view, select Add, then select Existing frameworks... from the list. Then find the framework with the symbols you're missing.

As to how you find which frameworks you need, I've found using google the easiest, though you could probably use the Xcode help search too. Search for one of the symbols, doing your best to work out the unmangled name, and then the first documentation link you find at developer.apple.com is often the right one. You usually don't have to hunt very far. In this case, that's this page:

Then just keep doing this until it works...

dhaya
  • 1,522
  • 13
  • 21