payu-intrepos / PayUMoney-IOS-SDK

Easy to integrate SDK for iOS to facilitate fast mobile checkout
https://www.payumoney.com/
MIT License
11 stars 21 forks source link

[NSKeyedUnarchiver initForReadingWithData:]: data is NULL PayUMoney IOS #4

Closed nikhildange closed 7 years ago

nikhildange commented 7 years ago

I have integrated Payumoney framework in the iOS app. Every time i present PUMMainVController, log showed *** -[NSKeyedUnarchiver initForReadingWithData:]: data is NULL thus found out data of shared preference / NSUserdefault was lost [ 'null]'. I searched through the net for the solution and synchronized user defaults where ever required instead relying on automatic synchronization but it didn't work.

vipin04 commented 7 years ago

Hi @nikhildange

As far I can understand, your data in NSUserDefault is lost every time you try to present PUMMainVController. Is this the case? If yes, please try our sample app and see if same thing happens there also? I tried but could not replicate this issue.

nikhildange commented 7 years ago

Hi @vipin04 ,

Thanks for Reply :) Yes, I lose my data in NSUserDefault when presenting PUMMainVController in the app and logs *** -[NSKeyedUnarchiver initForReadingWithData:]: data is NULL error.

I tried to do store NSUserDefault data in Appdelegate Class & retrieve it in your sample app, had the same error.

Below is log for your reference,

2017-02-09 17:05:21.201 PayUmoneySampleApp_ObjC[10305:489717] AppDelegate: Value of Flag 'TRUE' 2017-02-09 17:05:21.275 PayUmoneySampleApp_ObjC[10305:489717] ViewController[viewDidLoad] Value of Flag 'TRUE' 2017-02-09 17:05:25.022945 PayUmoneySampleApp_ObjC[10305:489717] [MC] System group container for system . . . . 4d> 2017-02-09 17:05:31.127 PayUmoneySampleApp_ObjC[10305:489717] ViewController[startPaymentTapped], Value of Flag 'TRUE' 2017-02-09 17:09:34.968 PayUmoneySampleApp_ObjC[10305: 489717] * -[NSKeyedUnarchiver initForReadingWithData:]: data is NULL 2017-02-09 17:05:39.040 PayUmoneySampleApp_ObjC[10305:489717] ViewController[transactinCanceledByUser] Value of Flag (null)**

vipin04 commented 7 years ago

The issue is reproducible at our end. It will be fixed today. Expect an update by today EOD.

vipin04 commented 7 years ago

Issue has been fixed with latest release

Please check and comment.