I am writing an app based around DoubleColumnNavigationViewStyle (eg. SplitView).
I would like to drag entities from the MasterList onto entities in the Detail View to form coredata relationships between them.
My models implement NSItemProviderWriting and NSItemProviderReading.
I find I can make a NavigationLink draggable by adding this to it:
.itemProvider { () -> NSItemProvider? in
return NSItemProvider(object: self.model) }
When a drag is instigated from here, the model's NSItemProviderWriting protocol functions are invoked.
What I cannot work out is how to make a View 'Dropable'.
All of the likely looking ViewModifiers are implemented on MacOS only, as far as I can see.
There must be something that takes a list of supported type identifiers and invokes NSItemProviderReading.
There is also something strange going on ...
Not all of my NavigationLinks have a .itemProvider but once one of them does, they all act draggable, which is not the desired outcome.
Are these known bugs or omissions?