Every time a user taps the home button while my app is active, I am getting the following exception. Slight caveat - The example exception below references NSCFString
. However, the type of object that gets sent this message, and thus causes the exception is totally random. It could be an NSData
or an OS_dispatch_queue_specific_queue
.
[__NSCFString didEnterBackground:]: unrecognized selector sent to instance 0x155344c0 * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString didEnterBackground:]: unrecognized selector sent to instance 0x155344c0
Happens every single time the app is resigned active, but the object receiving the message is never the same.
I assume this is some sort of memory issue but am having trouble tracking it down. Mostly because nothing in my code ever directly sends/receives this message, or is registered to receive the UIApplicationWillResignActiveNotification
. Also, there is nothing in my appDelegate for the applicationDidEnterBackground:application
method.
Has anyone ever seen this type of behavior? And if so, what is the best way to debug? Or maybe another way, what sorts of objects would be automatically sent the didEnterBackground
message that I am clearly mismanaging?