Marc Aupont‘s Core Data Sharing

I followed this tutorial and adapted it to my own database. Had a few questions though.
When Phone A shares something with Phone B, Phone A now always has ‘true’ for isShared.
So when I want the list of items shared to only reflect those actually shared, I check if the number of non owners accepted is greater than zero. That works but doesn’t seem correct.

The bigger issue is when the user hits the big red “Stop Sharing” button. That seems to break everything. The window no longer appears. And everything on Phone A seems shared and “accepted” with Phone B but Phone B only has accepted one item and only has the one item.

I’d like to get this to work though so any help would be appreciated.

Edit: it seems that after I hit “Stop Sharing”, every item is given this participant I wanted to stop. With status as “Accepted”. Despite these items never being sent to or accepted by that participant. The cloud sharing window will no longer appear for these items. If I create a new item, it doesn’t have these properties and the cloud sharing window will appear. This also is occurring/tested on two actual devices. Not the simulator.

Edit: Actually I think these are two separate problems. I attempted to fix the “Stop Sharing” issue and did something to cause everything to be seen as shared. On phone B, the “stop sharing” doesn’t cause this. Although I deleted every item on Phone A (owner) and re-populated it and yet every item is still displayed as “shared” with Phone B (private user). I’m not sure how to fix that yet.