Context handler does not work on iPhone app. Crashes!

Context handler does not work on iPhone app. Crashes!

I've used the sample code from your help pages regarding the context handler and it consistently crashed the app.

It consistently crashes upon the second context input

code sample on the Context Handler page causes the iPhone app to crash.

I'm using iOS 11.2

When I iterate through the Room Service context it crashes after I choose "House Keeping" or "Maintenance"

https://www.zoho.com/cliq/help/platform/bot-contexthandler.html

==

Sample Message Handler Code
response = Map();
if(message.containsIgnoreCase("ROOM SERVICE"))
{
context = '{"id":"Room Service","timeout":"300","params":[{"name":"room service","question":"Great! Here is a list of options for you to choose from.","suggestions": {"list":[{"text":"House Keeping"},{"text":"Maintenance"}]}},{"name":"time","question":"Okay cool. When can I send them over?","suggestions":{"list":[{"text":"Now"},{"text":"In half hour"}]}}]}'.toMap();
response.put("context",context);
}
else if(message.containsIgnoreCase("WIFI"))
{
context = '{"id": "Wifi", "timeout":"300","params":[{"name":"Wi-fi","question":"Confirm if you are in Room 307!", "suggestions":{"list":[{"text":"Yes"},{"text":"No"}]}}]}'.toMap();
response.put("context",context);
}
else if(message.containsIgnoreCase("CAB"))
{
context = '{"id": "Cab","timeout":"300","params":[{"name":"Cab","question": "When can I book the cab for you?","suggestions":{"list":[{"text":"Now"},{ "text": "After 1 hour"}]}}]}'.toMap();
response.put("context",context);
}
else
{
response = '{"text": "Hi! I am Lyte, the Room Service Bot. Heres what I can help you with! :happy!:", "suggestions":{"list":[{"text":"Room Service"},{"text":"Wifi"},{"text":"Cab"}]}}'.toMap();
}
return response;

Sample Context Handler Code
response = Map();
id = context.get("id");
params = context.get("params");
if(id.matches("Room Service"))
{
confirm = "Please check our other options then!";
if(params.get("confirmation").containsIgnoreCase("YES"))
{
// make api calls for the room service options
confirm = "Great! I've arranged for the " + params.get("room service").get("text") + "to be there " + params.get("time").get("text") + ". :thumbsup:";
}
response.put("text",confirm);
}
else if(id.matches("Wifi"))
{
txt = 'Please try again or call 0000 for more information!';
if(params.get("Wi-fi").containsIgnoreCase("YES"))
{
txt = 'Here is your wifi ID and password. \n ID - Room_307 \n Password - Hotel123';
}
response.put("text",txt);
}
else if(id.matches("Cab"))
{
txt = 'Your cab has been booked exactly one hour from now. Please meet the driver at the hotel lobby.';
if(params.get("Cab").containsIgnoreCase("NOW"))
{
txt = 'You Cab has been booked. Please meet the driver at the hotel lobby. :thumbsup:';
}
response.put("text",txt);
}
else
{
response.put("text","Context: " + context);
}
return response;