Implement callbackOnUiThread on iOS.