iOS support implemented by Chris and tested by myself. Spacing issues resolved.

Signed-off-by: Gary Riches <gary@bouncingball.mobi>
Merge pull request #1 from griches/master

iOS support - tested by griches