Fix bugs by adding necessary forward declaration of template
Update project files of xcode