How to access Core Data generated Obj-C classes in test targets?

后端 未结 3 601
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-21 06:14

I have a Core Data / Swift Cocoa application project in Xcode 6 (let\'s call the project Stuff). I created a Core Data entity called Query and used Xco

3条回答
  •  没有蜡笔的小新
    2021-01-21 06:44

    I have a project with CoreData in pure Swift, no bridging header files and tests are working. Here's how I've managed to do:

    My project name is cars and I have a NSManagedObject called Car

    Car.swift:

    Car.swift

    Car.swift file Target Membership:

    Car.swift file Target Membership:

    cars.xcdatamodeld Data Model Inspector:

    cars.xcdatamodeld Data Model Inspector

提交回复
热议问题