David

combined working iOS code