objective c - NSDate Main Bundle Crash -
in nsdate+datetools matthew york, there's line that's crashing me:
#ifndef datetoolslocalizedstrings #define datetoolslocalizedstrings(key) \ nslocalizedstringfromtableinbundle(key, @"datetools", [nsbundle bundlewithpath:[[[nsbundle mainbundle] resourcepath] stringbyappendingpathcomponent:@"datetools.bundle"]], nil) #endif
i moved files new xcode project xcode project. think it's looking in mainbundle doesn't exist? i'm not sure what's going on. thanks....
this unsafe coding. need check each argument returning not nil. resourcepath has possibility of returning nil, in case "datetools.bundle" either missing or in wrong place in app bundle.
i not concise code this. saves nothing useful, , makes debugging painful.
Comments
Post a Comment