added token generation for ios