0

I'm working on the implementation of a Today Widget for IOS in Swift (v2.2).

Following what i found in this question should be pretty easy to implement the "Display more" button for my widget, as the native ones.

I don't understand why xcode complains:

Use of unresolved identifier 'NCWidgetDisplayMode'

I try even to change using .expanded, but seems that extensionContext have no method widgetLargestAvailableDisplayMode and for instance i don't have even open but i have openURL instad.

The specific i'm taking a look is this one: https://developer.apple.com/reference/foundation/nsextensioncontext

Am i looking in the wrong place? What i miss?

Thank you

Community
  • 1
  • 1
Stefano Saitta
  • 1,844
  • 1
  • 19
  • 34
  • Have you added `import NotificationCenter` to the top of your file and targeting iOS 10 and up? – beyowulf Dec 14 '16 at 17:31
  • the import yes, how can i check the targeting? The version of xcode can be related to the issue? I'm using 7.3.1 atm – Stefano Saitta Dec 14 '16 at 17:38
  • Yes, if you're still on swift 2.2 you are likely not running Xcode 8.0, which means you're not developing for iOS 10.0+. So you won't see this API because it is new to iOS 10. – beyowulf Dec 14 '16 at 20:33

0 Answers0