In CoreData, what is the best approach for using context.save()? Should I call it when the object is added in the array or should I add all the objects together in the array and then call context.save()?
It is kind of confusing because I did not get accurate answer.
I have tried both I do not know what should be the proper approach.
>Solution :
Based on what I have understood reading your question is that the best approach in my opinion is to call context.save() once because calling it frequently can cause issues. Therefore, my suggestion is to add all the data in your array and then call context.save(). I hope this clears your confusion.