{"id":4206,"date":"2014-03-30T09:15:59","date_gmt":"2014-03-30T09:15:59","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/runtime-error-for-release-build-app-in-xcode-4-collection-of-common-programming-errors\/"},"modified":"2014-03-30T09:15:59","modified_gmt":"2014-03-30T09:15:59","slug":"runtime-error-for-release-build-app-in-xcode-4-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/runtime-error-for-release-build-app-in-xcode-4-collection-of-common-programming-errors\/","title":{"rendered":"Runtime error for Release build app in XCode 4-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m having some issues with running a app in Release build in Xcode 4. I get a run-time error on a message send to a Category method:<\/p>\n<pre><code>[NSCFString JSONValue]: unrecognized selector sent to instance 0x923600\n<\/code><\/pre>\n<p>I guess the category for some reason is not found correctly. There is no warnings, and this only happens in Release builds. The JSON Category is located in a static lib, linked to the main app. The project configuration still contains the -all_load flag.<\/p>\n<p><strong>EDIT:<\/strong><\/p>\n<p>This is the offending code:<\/p>\n<pre><code>    NSString *rawJson = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] ;\n    NSDictionary *dataDic =[rawJson JSONValue];\n<\/code><\/pre>\n<p>the rawJson contains a valid string, and everything is working perfectly fine in debug builds<\/p>\n<p>Any suggestions?<\/p>\n<p>Thanx!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m having some issues with running a app in Release build in Xcode 4. I get a run-time error on a message send to a Category method: [NSCFString JSONValue]: unrecognized selector sent to instance 0x923600 I guess the category for some reason is not found correctly. There is no warnings, and this only happens in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4206","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4206","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4206"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4206\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4206"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4206"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}