I am trying to read in a json file in my Objective-C application, but unfortunately I am getting a RuntimeException. The exact error is:
*** Terminating app
From your source code and your comments I assume that the application is built as a "Command Line Tool". In that case the "Target MemberShip" checkbox is actually disabled for custom resource files like your JSON file.
As a workaround:
+
and select your JSON file.For a command line tool, it does not seem to matter which "Destination" you choose. I tested it with "Destination: Resources". The JSON file is copied in the same directory that contains the executable file. Now
[[NSBundle mainBundle] pathForResource:@"Transactions" ofType:@"json"];
should return that path and you can read the file from your application.