NSPersistentContainer is only available in 10.0 or newer : error

后端 未结 4 630
猫巷女王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:45

    One of solutions is to use https://github.com/inspace-io/INSPersistentContainer

    and add

    typealias NSPersistentContainer         = INSPersistentContainer
    typealias NSPersistentStoreDescription  = INSPersistentStoreDescription
    

    to your file where you want to use

提交回复
热议问题