iPhone: Using static library in an application crashes the device but not the iphone simulator

Posted by spin-docta on Stack Overflow See other posts from Stack Overflow or by spin-docta
Published on 2009-10-10T16:49:57Z Indexed on 2010/03/24 4:53 UTC
Read the original article Hit count: 753

I have a library I made, and now I want to utilize it in an application. I've believe I've properly linked to the library. Here are all the things I've done:

  • Set the header search path
  • Set other linker flags to "-ObjC"
  • Added the static library xcode project
  • Made sure the lib.a was listed as a framework target
  • Added the library as a direct dependency

Like I said in the title, I've successfully run the app with the static library in the simulator. Once I try testing the app using the device, it crashes the second it has to use a function from the library:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[NSDate firstOfCurrentMonth]: unrecognized selector sent to class 0x3841bb44'
2009-10-10 12:45:31.159 Basement[2372:207] Stack:

© Stack Overflow or respective owner

Related posts about iphone

Related posts about cocoa-touch