function convertToJSArray(nativeArray) {
  let length = nativeArray.count()
  let jsArray = []

  while (jsArray.length < length) {
    jsArray.push(nativeArray.objectAtIndex(jsArray.length))
  }
  return jsArray
}
Converts the native Objective-C array to a Javascript Array.

@param {NSArray} nativeArray
@returns {Array}