Actually, i had the same questioning before while i asked for FTS and FTC (full text completions).so i finally used FMDB which is a massive very useful lib that enabled me doing that, this link is for you :
FMDB link on github and Take a look here too