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

iOS SDK NSUserDefault issue #13

Closed sunkumar closed 7 years ago

sunkumar commented 7 years ago

Dear PayU iOS Development Team,

It seems the is some problem in iOS SDK, I have write a code to present payment screen(PUMMainVController) It got presented fine. But one problem I have seen, Once I have click on the back button to dismiss the controll. I saw all the NSUserDefault data got removed. I am checking on simulator not sure why this problem raised.

Can any one please provide the resolution on urgent basis?

umangarya336 commented 7 years ago

Hi sunkumar, Issue is resolved in version v2.0.1. Kindly let us know the version you are using.

sunkumar commented 7 years ago

Hi umangarya336, Right now I am using 1.0 version. Can you please let us know the path from where I can down load latest version?

umangarya336 commented 7 years ago

Hi sunkumar, Latest released sdk can be find here Path : https://github.com/payu-intrepos/PayUMoney-IOS-SDK/releases

sunkumar commented 7 years ago

Dear umangarya336,

I have check out the same both version(2.0.2 and 2.0.1) from https://github.com/payu-intrepos/PayUMoney-IOS-SDK/releases

Still I am facing same problem.

Steps to reproduce:

  1. Down load the code from given link.
  2. Run the sample project
  3. Now write some thing in NSUserDefault in viewdidload. also print same on console before writing.
  4. Relaunch app many time you will get the user default values.
  5. Try to pay some amount and then click on back button, It got removed all the NSUserDefault contents.

Thanks, Sunil

sunkumar commented 7 years ago

Hi Team,

Any resolution on above point, It would be good if you can provide us the solution as soon as possible.

AshishPayU commented 7 years ago

Hello Sunil,

What is language being used, Swift or Objective - C ?

sunkumar commented 7 years ago

Hi Ashish, I am using Objective C, But tested Swift also no luck in both languages

Thanks, Sunil

AshishPayU commented 7 years ago

Hello Sunil,

I've checked it with latest version and it is working fine.

Please follow below guidelines for your project :

1). add below code under start payment () method : UserDefaults.standard.set(txtFldName.text, forKey: "name") 2). add it to method : override func viewDidAppear(_ animated: Bool) { let name : String? = UserDefaults.standard.object(forKey: "name") as? String
if let nameToDisplay = name { txtFldName.text = nameToDisplay } }

If you have any other concerns , then drop a mail at mobile.integration@payu.in

sunkumar commented 7 years ago

Hi Ashish,

Here if block only execute if found value of name, it will ignore in case of null value.

I will send you an email @ mobile.integration@payu.in

AshishPayU commented 7 years ago

Hello Sunil,

Did you get what you wanted to achieve & I guess you can handle else block. Aren't you??

sunkumar commented 7 years ago

Update SDK, and cleaned drived data working fine.