Added statistics from Flurry to the application and found that errors often occur.

0 CoreFoundation 0x181666950 <redacted> + 132 1 libobjc.A.dylib 0x18db6c1fc _objc_exception_throw + 60 2 CoreFoundation 0x181666890 -[NSException initWithCoder:] + 0 3 Foundation 0x182113180 -[NSUserDefaults setObject:forKey:] + 264 4 <тут название приложения> 0x1000adef8 __mh_execute_header + 302840 5 libdispatch.dylib 0x18e144014 <redacted> + 24 6 libdispatch.dylib 0x18e143fd4 <redacted> + 16 7 libdispatch.dylib 0x18e1471dc __dispatch_main_queue_callback_4CF + 336 8 CoreFoundation 0x18162662c <redacted> + 12 9 CoreFoundation 0x18162496c <redacted> + 1452 10 CoreFoundation 0x1815656d0 _CFRunLoopRunSpecific + 452 11 GraphicsServices 0x187249c0c _GSEventRunModal + 168 12 UIKit 0x184696fdc _UIApplicationMain + 1156 13 <тут название приложения> 0x1000905f8 __mh_execute_header + 181752 14 libdyld.dylib 0x18e15faa0 <redacted> + 4 

Help to understand, did not understand anything from these logs. Which way to dig? [NSUserDefaults setObject: forKey:]?

  • check the value you want to keep in NSUserDefaults , maybe there is nil - Alexey Alybin
  • nil for NSUserDefaults is a valid value, check wherever in the network user defaults what exactly is there and when - iFreeman
  • I found out that this problem is found only in the iPhone 5S. - michilly

1 answer 1

Article on this topic on Habré Demystification of iOS emergency logs

  • I read the article, thank you :) It says that [NSUserDefaults setObject: forKey:] + 264 means: an error on the 264th line. But nowhere do I have a setObject on this line. - michilly
  • I do not have much experience on this topic, but this is not the line number of your code) There is infa at stackoverflow.com/questions/1287074/… - Alexander Yakovlev