Added local sql for testing and more iOS parts