I am running cycript on iOS and calling internal API in an App. I have a variable of type JavaUtilArrays_ArrayList returned from a call
cy# l
"[<FieldDescriptor: 0x170a74fc0>, <FieldDescriptor: 0x170a75a00>, <_FieldDescriptor: 0x170a76200>, <FieldDescriptor: 0x170a76240>, <FieldDescriptor: 0x170a76280>]"
I would like to iterate over this list to access the elements (preferably with #element)
In general I would iterate like so
for (x of [1,2,3]) {x+x}
However, trying
for (e of l){e}
or
for(e in l ){l[e]}
results in throw new Error("*** _assert(static_cast(static_cast(value)) == value):../Execute.cpp(347):CYCastJSValue")
furthermore, accessing an individual element
l[0]
Return nothings
I am very new to cycript. Can anybody help me with this?