fix pure JS app issue on iOS