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.

  • Sorry I didn't get a notification of your response. My issue ended up being just some strange bug in testing. I deleted my app and reinstalled it and suddenly the expected intent value is there. I thought I needed to integrate Siri or enable some new permissions but that wasn't it at all. That being said my use case was for a share extension so that may not apply. I'm not familiar with those other functions.

Add a Comment