ios iphone objective-c swift

Use of string literal for Objective-C selectors is deprecated, use ‘#selector’ instead

I have the following code:

func setupShortcutItems(launchOptions: [NSObject: AnyObject]?) -> Bool {
var shouldPerformAdditionalDelegateHandling: Bool = false
if (UIApplicationShortcutItem.respondsToSelector("new")) {
// If a shortcut was launched, display its information and take the appropriate action
if let shortcutItem: UIApplicationShortcutItem = launchOptions?[UIApplicationLaunchOptionsShortcutItemKey] as? UIApplicationShortcutItem {
// When the app launched at the first time, this block can not called.
// This will block "performActionForShortcutItem:completionHandler" from being called.
shouldPerformAdditionalDelegateHandling = false
} else {
// normal app launch process without quick action
} else {
// Less than iOS9 or later
return shouldPerformAdditionalDelegateHandling

I get the following “warning” on UIApplicationShortcutItem.respondsToSelector("new"), which says:

Use of string literal for Objective-c selectors is deprecated, use ‘#selector’ instead

The warning replaces the code automatically with:


However this doesn’t compile because new() is unavailabe.
What am I supposed to use in this case?