So I’ve researched extensively on how to list the files in the documents directory in a table view and after much deliberation, came up with this code. Whenever I run this, the app crashes with EXEC_BAD_ACCESS.
I’ve been busting my head for hours, so any help would be appreciated.
All I’m doing is acquiring the files in the documents directory and trying to list them in a table view…
Code is pasted in link below.
Edit-
App crashes in numberOfRowsInSection: method.
Are you using ARC (Automated Reference Counting)? If not you should
retainthe value returned fromcontentsOfDirectoryAtPath.