Update iOS code to return callbacks correctly