ios read history status from sqlite