问题
I'm trying to run my UITests target in Xcode 9.1. The actual app runs, but the UITests target is giving me this error. I've tried restarting, reinstalling pods, updating pods, changing various build settings, deleting and relinking frameworks. Any ideas?
Undefined symbols for architecture x86_64: "__T010LearnerLog8DurationCMa", referenced from: __T017LearnerLogUITests21testAddPreviousDrivesC0deF5DriveyyF in testAddPreviousDrives.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Let me know if you need any more info!
Edit It happens when I uncomment the second line here. With it commented out it runs fine.
let realm = try! Realm() //Connect to realm
//print(realm.objects(Journey.self))
回答1:
Turns out you can't do many things in UITests...one of which is Realm.
来源:https://stackoverflow.com/questions/47447121/linker-error-ld-symbols-not-found-for-architecture-x86-64