Fix Xcode build warnings, remove unused code and fix duplicate resource in bundle.