小编lon*_*tle的帖子

Xcode 8的构建错误UITests"direct field offset"

我遇到一系列神秘的链接器错误.我的常规目标和UITest目标构建并执行正常,但UnitTest目标始终失败并出现以下错误.似乎是CoreData的某种问题,但我无法弄清楚为什么它在测试目标上而不是在主目标中出错.我尝试过:1)清除派生数据.2)重新启动xCode 3)清理安装pod

任何关于在哪里寻找问题的帮助将非常感激.我很难过.谢谢!

Undefined symbols for architecture x86_64:
  "direct field offset for playolaIphone.AppDelegate.(managedObjectModel.storage in _D550B33DB84959D9A74FD87E48EB7BC7) : __ObjC.NSManagedObjectModel?", referenced from:
      playolaIphone.AppDelegate.managedObjectModel.setter : __ObjC.NSManagedObjectModel in MockAppDelegate.o
      playolaIphone.AppDelegate.(managedObjectModel.materializeForSet : __ObjC.NSManagedObjectModel).(closure #1) in MockAppDelegate.o
  "direct field offset for playolaIphone.AppDelegate.(managedObjectContext.storage in _D550B33DB84959D9A74FD87E48EB7BC7) : __ObjC.NSManagedObjectContext?", referenced from:
      playolaIphone.AppDelegate.managedObjectContext.setter : __ObjC.NSManagedObjectContext in MockAppDelegate.o
      playolaIphone.AppDelegate.(managedObjectContext.materializeForSet : __ObjC.NSManagedObjectContext).(closure #1) in MockAppDelegate.o
  "direct field offset for playolaIphone.AppDelegate.(persistentStoreCoordinator.storage in _D550B33DB84959D9A74FD87E48EB7BC7) : __ObjC.NSPersistentStoreCoordinator?", referenced from:
      playolaIphone.AppDelegate.persistentStoreCoordinator.setter : __ObjC.NSPersistentStoreCoordinator in MockAppDelegate.o
      playolaIphone.AppDelegate.(persistentStoreCoordinator.materializeForSet : __ObjC.NSPersistentStoreCoordinator).(closure #1) in MockAppDelegate.o
  "direct field offset for playolaIphone.AppDelegate.(applicationDocumentsDirectory.storage in …
Run Code Online (Sandbox Code Playgroud)

xcode linker-errors xcode8

2
推荐指数
1
解决办法
604
查看次数

标签 统计

linker-errors ×1

xcode ×1

xcode8 ×1