Updated AppDelegate class to fix a crash related to Core Foundation