iOS doesn't like onwrite only onwriteend