{"id":4187,"date":"2014-03-30T09:08:11","date_gmt":"2014-03-30T09:08:11","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/iphone-xcode-4-file-bundle-problem-collection-of-common-programming-errors\/"},"modified":"2014-03-30T09:08:11","modified_gmt":"2014-03-30T09:08:11","slug":"iphone-xcode-4-file-bundle-problem-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/iphone-xcode-4-file-bundle-problem-collection-of-common-programming-errors\/","title":{"rendered":"iPhone Xcode 4 file bundle problem-Collection of common programming errors"},"content":{"rendered":"<p>From the looks of it, <code>list<\/code> seems to be a ivar. If that is correct then you are assigning an autoreleased value to <code>list<\/code>. If you do access this later, you will be trying to access a deallocated object and hence have an error. If you have an <code>retain<\/code>ed property defined for <code>list<\/code>, then you can do,<\/p>\n<pre><code>self.list = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:documentsDirectory error:NULL];\n<\/code><\/pre>\n<p>If you for some reason, having a property isn&#8217;t possible then do simply call retain on it like this,<\/p>\n<pre><code>list = [[[NSFileManager defaultManager] contentsOfDirectoryAtPath:documentsDirectory error:NULL] retain];\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>From the looks of it, list seems to be a ivar. If that is correct then you are assigning an autoreleased value to list. If you do access this later, you will be trying to access a deallocated object and hence have an error. If you have an retained property defined for list, then you [&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-4187","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4187","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=4187"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4187\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}