debug handler for IOS