Closed vikaskumawat123 closed 3 years ago
Hi @vikaskumawat123, would you be able to provide a full backtrace showing when the crash occurs and additional reproduction steps? I was not able to reproduce this crash in my initial investigation
I am using the following code to get token
let arrTemp = str.components(separatedBy: "/")
let cardParams = STPCardParams()
cardParams.number = self.cardNumberTextField.text!
cardParams.expMonth = UInt(arrTemp[0])!
cardParams.expYear = UInt(arrTemp[1])!
cardParams.cvc = self.cvvTextfield.text
self.hudShow()
STPAPIClient.shared().createToken(withCard: cardParams) { (token: STPToken?, error: Error?) in
guard let token = token, error == nil else {
self.hudHide()
self.commonMethod.showToast(message: NSLocalizedString("Invalid Card!", comment: ""), view: self.view)
return
}
// Use token .....
}
This code gives me proper token in iOS 12 but getting crashed in iOS 13 and crash happens on (void)logPayload:(NSDictionary *)payload {} method in STPAnalyticsClient.m class.
hmm, could you add an Exception breakpoint in Xcode and copy the backtrace when the exception is triggered? The error message is complaining about the key "delegate" but I'm not sure on where that key is being used in this function
It sounds like it's possible that another component might be trying to swizzle some NSURLSession-related classes. I'm closing this out as we haven't heard back in a while, but let us know if you're still experiencing this issue.
Summary
Payment works fine in iOS 12 but not in iOS 13. I am getting the following error in console : - Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<__NSURLSessionLocal 0x12154e3e0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key delegate.'
Code to reproduce
iOS version
I am using iOS 13.1.2
Installation method
Using pod
SDK version
I am using 19.2 SDK
Other information
I am getting this issue during token creation