I´m in the process of eliminating all text vars in my iOS app and switching to string.
GenerateJSON and dictionaries seem to expect text though:
Var d1 As New Dictionary
d1.Value("Test") = "Text"
Var json1 As String
json1 = GenerateJSON(d1) //works (debugger shows the value of Test as beeing of type text)
var s as String = "String"
Var d2 As New Dictionary
d2.Value("Test") = s
Var json2 As String
json2 = GenerateJSON(d2) //crash
It is in a debug-button on the homeview (MobileScreen) of my app.
Super is Mobile.
It´s an old project (from 2016). Just switched everything from ios… to mobile… and changing text to string everywhere.
If I were you, I will start with a clean new project with Xojo2023r2 and add the code to it, I see several things different from your sample project and a new clean iOS project. As I don’t have iOS experience, I don’t know what else changed (besides the Simple References) setting that may be missing from a 2016 base project.