After the Xcode update, the compiler began to throw an error on the working code (both functions are in the AppDelegate.swift).
func application(application:
You should also make sure you are using the correct type. Use String instead of NSString.