MugunthKumar / MKStoreKit

The "Goto" In App Purchases Framework for iOS 8+
2.09k stars 429 forks source link

A crash -[SKPaymentQueue _notifyObserversAboutChanges:]: unrecognized selector sent to instance #124

Closed dk555 closed 9 years ago

dk555 commented 11 years ago

I got this crash report from some of my users

-[SKPaymentQueue _notifyObserversAboutChanges:]: unrecognized selector sent to instance 0x200d12a0

Any idea what might cause it?

0CoreFoundation 0x338562a3 + 162 1libobjc.A.dylib 0x3471497f objc_exception_throw + 30 2CoreFoundation 0x33859e07 + 170 3CoreFoundation 0x33858531 + 392 4CoreFoundation 0x337aff68 _CF_forwarding_prep_0 + 24 5slZvc1 0x004138a0 $$i + 3504 6CoreFoundation 0x3382b5df + 14 7CoreFoundation 0x3382b291 + 272 8CoreFoundation 0x33829f01 + 1232 9CoreFoundation 0x3379cebd CFRunLoopRunSpecific + 356 10CoreFoundation 0x3379cd49 CFRunLoopRunInMode + 104 11GraphicsServices 0x3b59a2eb GSEventRunModal + 74 12UIKit 0x3b0582f9 UIApplicationMain + 1120

yimingcheung commented 11 years ago

If you call [[SKPaymentQueue defaultQueue] addTransactionObserver:self]; somewhere in your code, you need to removeTransactionObserver in your dealloc method, otherwise it will crash.

dataxpress commented 11 years ago

I am having this same issue in my app. I'm calling removeTransactionObserver in dealloc; though, I think the problem might be that I am calling "addTransactionObserver" in my viewDidLoad. This app has been out for several months with thousands of users, but the crash has only started happening in the last few days, so I do not understand why it wasn't happening before.

dk555 commented 11 years ago

The only place in my code that has [[SKPaymentQueue defaultQueue] addTransactionObserver:self]; is in the sharedmanager singleton of mkstorekit. This just started to happen a few weeks ago. What should i do? Please assist me?

dataxpress commented 11 years ago

Not sure what to tell you. I had this crash drop off a bit recently - despite gaining more users. Possibly something changed on Apple's end for a bit?

rrichter commented 11 years ago

These crash reports typically occur when jailbroken devices use tools like IAPCracker. The crashes started with the release of the 6.1 JB. This does not happen to legit users.

As Apple advises you should verify your receipt with the AppStore - MKStoreKit does not handle this well.

aaron9000 commented 10 years ago

I think you are right @rrichter . Jailbroken phones and IAP cracker are likely to blame. I am using Parse's IAP functionality and I still see this.

@dataxpress - Small world! Didn't expect to see you in here :P