EditMode on MacOS Xcode 12.2 beta

I'm using EditMode all over my iOS app and for the first time I tried compiling for MacOS.

I get "'EditMode' is unavailable in macOS" This is a huge problem because I use it all over my app.

How do I handle this on MacOS?
Doc shows it is available for
  • iOS 13.0+

  • Mac Catalyst 13.0+

  • tvOS 13.0+

So, not for MacOS

Can you show you try to use it ?

The doc documentation is wrong. Here is the definition

/// The mode of a view indicating whether the user can edit its content.

@available(iOS 13.0, tvOS 13.0, *)

@available(macOS, unavailable)

@available(watchOS, unavailable)

public enum EditMode { .....


And the compiler presents an error that it is unavailable.

I understand my problem. I didn't turn on Mac Catalyst.

This misunderstanding happened when I created a new Xcode project and selected iOS and MacOS assuming it would be a Mac Catalyst project with that turned on.
EditMode on MacOS Xcode 12.2 beta
 
 
Q