Not sure if this is the problem, but you're passing by reference that error variable into that call, but you've set it to nil, so if there's an error in that call it can't write that error to that variable because it's nil.
Try: NSError *error; instead.
Then, when inspecting the results of that call, you need to check if error is nil before trying to access its contents.
Topic:
App & System Services
SubTopic:
General
Tags: