iOS: fix issues for xcode5
iOS: handle time out notification properly