modified AppDelegate.cpp in template