Instruction for Swift inverse relationships in Many-to-Many situations

Is there any instructions for setting up inverse Many-to-Many relationships in Swift on Ray Wenderlich? I found an old video on YouTube, on Beginning Core Data, but for Swift 2, iOS 9, Xcode 7, that was perfect. It showed a situation where there are many devices and many owners, and how you could search back and forth either by item or owner. However, the code is too out of date, so I signed up with RW to get an updated version.

Unfortunately for me, in the updated versions, the content has changed, and the new projects are different. They do not cover how to use the Many-to-Many inverse search in any substantial way. I have gone back and watched the old versions of Beginning Core Data for Swift 5.1, Swift 4 (iOS 12, Xcode 10), Swift 4 (iOS 4, Xcode 9) and Swift 3. None of them cover this topic. I thought it might now be covered in an Intermediate lesson, but the only one i found for Core Data is in Swift 3.

I’m too stupid to make the jump from Swift 2 to Swift 5, and I am hoping there is some module here that can help. If you know of one, that, again, i’m too stupid to find, please let me know.

@dumbbunny Thanks very much for your question!

You may want to consider looking into getting our book which goes into more detail on Core Data:

Core Data by Tutorials

I will say that the principles behind Core Data have not drastically changed over the years, so even if you have some older code (yes, even in Objective-C), you can still try to apply the same concepts in your project (except using the equivalent Swift syntax of course :wink: ). If you encounter any problems, of course you can always post your question in our forums, along with the error messages you are receiving.

If you have a subscription already with us, I would suggest that you still go through the Core Data courses that we offer, and in doing so, perhaps take some time on your own, and make your own changes to the code, and see what happens. That is the point of these tutorials. To teach you a foundation so that you can then apply these concepts into your own projects :slight_smile:

I hope this helps!

All the best.

This topic was automatically closed after 166 days. New replies are no longer allowed.