code cleaning, added iOS example, added advertisement data,