I’ve done those steps, but I think I’ve been approaching this the wrong way (lots of learning to do).
Perhaps the better way to go about this (starting with the file you put together) is to save each selectedItem as individual instances in a seperate entity (let’s call this ItemList). Ultimately I want these selected items to be associated with a Group object so that when the user selects that group, this list of selectedItems that were selected from the picker are populated. This way, any additional properties that the selectedItem has can also be accessed and not just the name of the item.
At the start, imagine in the app, in one view the user adds items to the AllItems entity, like “chair”, “desk”, “table”. Then, the user creates a new Group in a separate view (in this case I’ll use the example of each group instance being a new office room being set up), so the user is creating an office object in a view and then selecting which items from the AllItems entity they want to add to that office in the MultiSelectPickerView in your file.
So when the user uses the picker and selectedItems are saved, they are saved to the ItemList entity where each row is an appended selectedItem instance (if they select all three, they would add “chair”, “desk”, and “table” as 3 new instances). Now each selectedItem instance within the ItemList entity needs to have some sort of common identifier that allows it to join with the group/office object that was created (would UUID be the best way to go about that?)
So basically, instead of tying the AllItems to the Group/office in a many to one relationship, I am now trying to tie the selectedItems (from the Alltems entity) to the ItemList entity in a many to one relationship and then tie the ItemList entity to the Group/office entity in a one-to-one relationship through some sort of common identifier attribute.
Hopefully that makes more sense. Starting with your file, would you be able to show me how all of that comes together? If I saw how those relationships are done correctly and saved to core data correctly that would clear up a lot for me and I could run with that.