Closed akashvercetti closed 6 years ago
Hi @akashvercetti . The options dictionary still accepts a UIImage object against the key image
. Please confirm the options you are using.
@AbhinavArora95 Heres the debug console options log
["description": "request", "name": "Secure", "amount": 1000, "image": <UIImage: 0x1c00b9e60> size {60, 60} orientation 0 scale 2.000000, "theme": ["color": "#14254b"], "notes": ["Consumer": 2, "RequestID": 0, "id": "UDSGAF167SS7FB6HDB7907GGEVAUGKBN", "app": "Secure"]]
And here's the output crash log
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid type in JSON write (UIImage)'
The UIImage is not null, its the same as the one used in previous Razorpay versions. The only thing that has changed is the pod version.
The crash that you are getting is because of the way you are creating the UIImage. Please confirm the options that you are sending to checkout (in the code and not the debug). Also, attach the code you are using to create the UIImage.
var options: [String : Any] = [
"amount" : amount,
"name":AppUtility.sharedInstance.app.displayName,
"image": UIImage(named: "AppIcon60x60") ?? UIImage(),
"description": "Service request",
"theme": [
"color": Color.primary.value.shortHex
],
"notes": notes
]
The UIImage(named: "AppIcon60x60")
is not nil, I did a po
command to double check it. This dictionary works with 1.0.8
Hi @akashvercetti, It appears in some specific scenarios the issue might arise in our sdks. We will be rolling out a fix for this in a couple of days. Till then you can pass the url of the image you want to show under the same key. Apologies for the inconvenience.
closing this issue now , reopen if any issue exists
Using pod 1.0.16, Xcode 9.3, Swift 4.1. The
options
dictionary used to accept aUIImage
object in the previous versions but now they don't. So I converted it to base64 but that doesn't work either. SO is an online URL the only way to add a merchant image now?