Initial import of complete iOS implementation