NSPersistentContainer is only available in 10.0 or newer : error

后端 未结 4 614
猫巷女王i
猫巷女王i 2021-01-05 21:09

It\'s because My deployment target is less than 10.

how to resolve for deployment target lower to 10.0 ?

4条回答
  •  独厮守ぢ
    2021-01-05 21:31

    Not available means not available.

    There are two options:

    • Use only the old NSPersistentStoreCoordinator / NSManagedObjectModel pattern.
    • Use both patterns and write the code with availability checking if #available(iOS 10, *)

提交回复
热议问题