Question
Coforge Ltd
GB
Last activity: 22 Feb 2021 5:15 EST
How to pass string value from Custom module to Pega - Mobile offline
We successfully integrated custom module with Pega mobile channel. We need to pass a string from custom module to Pega and we should identify/receive that string value returned from custom module. Below is the attempted solution from our end, through which we could not achieve:
func methodname(_ name: PMSJSValue, promise: PMSJSPromise)
{
guard let parentViewController = context.parentViewController else
{
return
}
let alert = UIAlertController(title: "Alert", message: "Call back testing", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { action in
promise.resolve(with: PMSJSValue("test callback"))
}
))
parentViewController.present(alert, animated: true, completion: nil)
}
Looking for your suggestions. Thanks in advance.