added save and load function for ios platform
added the functions to javascript