Finally working for ios