Page 1 of 1

JSONtoarray and JSONimport fail in iOS

Posted: Fri Apr 13, 2018 6:59 pm
by hutchfx
I have a stack using JSONtoarray and/or JSONimport that works on macOS 10.13.3 with LiveCode 9.0.0, but fails when deployed to an iPhone with iOS 11.2.6

Code: Select all

#! This does not work for mobile.
function fGetStreetAddress pJson
   -- Neither of the following two calls will work.
   -- put jsonimport(tApiReturnedJson) into taApiReturnedArray
   put JSONToArray(pJson) into taReturnedArray
   --
   put taReturnedArray["results"][1]["formatted_address"] into tReturnData
   return tReturnData
end fGetStreetAddress
Anyone have any ideas why? Here's a small stack for testing:

Re: JSONtoarray and JSONimport fail in iOS

Posted: Fri Apr 13, 2018 7:45 pm
by LiveCode_Panos
Hi hutchfx,

You should probably add the JSON Library and the mergJSON extension to the standalone:

1. In the General pane of the standalone settings choose "select inclusions for the standalone application"
2. In the Inclusions pane (which is now enabled) check "JSON Library" and "mergJSON".

Hope this helps.

Best,
Panos
--

Re: JSONtoarray and JSONimport fail in iOS

Posted: Fri Apr 13, 2018 7:55 pm
by hutchfx
Panos,

Thank you for the speedy reply. That did it!

Hutch