Tip to Help Debugging - "Could not save any of the BNRItems"


#1

This is just a helper for those who are debugging issues and could not save the state:

I used the autocomplete for the following method in BNRItemStore.m:

- (NSString *)itemArchivePath
{
    NSArray *documentDirectories = NSSearchPathForDirectoriesInDomains(NSDocumentationDirectory, NSUserDomainMask, YES);

It’s NOT NSDocumentationDirectory!

It’s

[code]

  • (NSString *)itemArchivePath
    {
    NSArray *documentDirectories = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);[/code]

#2

I registered just to say thank you. You saved me a lot of debugging time.


#3

Howdy,

I registered to say thanks, just like the previous reply. I’ve been having a real hard time with this problem. Funny how your eye can skip over these things.

George


#4

Ditto for me,

Thank you very much


#5

I just wanted to be another person thanking you for this!


#6

YES! Thank you! - For those of you catching up. There’s two places this can happen that I see (so far) pg 283 BNRItemStore.m AND pg 289 BNRImageStore.m


#7

I’m a seasoned developer (C/C++/PHP/etc) and learning iOS and had this very same issue. I looked at everything, refactored and cleaned up, and of course it was the simplest thing I overlooked each of those times…Thank you! :smiley:

Funny how we wholly trust the hand-holding “features” in our popular IDE’s…


#8

Thanks for the info. Saved me a whole bunch of time.


#9

Same here. Many thanks.


#10

Me too! thanks!!


#11

Thanks for taking the time to post! Would have been searching for an hour!


#12

Thank you!
I made this mistake, too!


#13

Thank you! :slight_smile:


#14

thank you!