Why does the intent property not show for NSExtensionContext?

The intent property doesn't even show when I initialize an instance of NSExtensionContent, as in the following code:

let extensionContext = NSExtensionContext() extensionContext.intent

I get an error saying:

Value of type 'NSExtensionContext' has no member 'intent'

Why is this? The documentation doesn't say it is deprecated. Even when something is deprecated, it still shows in Xcode.

Replies

Did you find any solution to this?

  • No. There are three functions that don't show up either. I think it's because I haven't enabled certain capabilities in Signing & Capabilities for the main target in the project. The three functions are interfaceParametersDescription() which is used by SiriKit, and dismissNotificationContentExtension() and performNotificationDefaultAction() which I presume are used by User Notification or Remote Notification.

Add a Comment