Good afternoon,
I have a question about Swift (and Xcode), related to Core Data. The problem I have is that I am doing an app with Swift 3 in Xcode 8, and this in principle supports iOS9 and iOS10 but when instantiating the appDelegate and the Context (to then be able to get (or put) from each Entity what I need ), on iOS9 it is impossible for me. I thought that it is best to do something like:
#if avaliable(iOS10,*)
{
//CodigoParaiOS10
} else
{
//CodigoParaiOS9
}
The problem I see with this solution is that for iOS9 I do not know what to use to get the context variable. I've seen codes in StackOverflow but nothing works for me. I've also tried to find iOS9 tutorials, but as they are in Swift 2 or 2.3, and there are many functions that have been changed or removed, and therefore it does not work for me either.
Any other ideas?