fix int cast in logs
add iOS support
fix leak on error
fix ivar names
tweak ioerr enum
split mac and library
add touch demo