Linker Error In UI Test Target | Apple Developer Forums
Maybe your like
- Apple Developer
- Apple Developer
- Sign in
- Create account
I am using XCode 7.1 Beta to develop an app in Swift 2.0. I am trying to access a few classes in the app (e.g. AppDelegate) from the UI Test class. I have enabled testability in the build settings for the app and added this line in the test class:
@testable import MyAppI am accessing the AppDelegate like this:
override func tearDown() { super.tearDown() let delegate : AppDelegate = UIApplication.sharedApplication().delegate as! AppDelegate delegate.myFunc() }However, I am running into a linker error:
Undefined symbols for architecture x86_64: "type metadata accessor for MyApp.AppDelegate", referenced from: MyAppUITests.MyAppUITest.tearDown (MyAppUITests.MyAppBasicUITest)() -> () in MyAppBasicUITest.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)Same error when I access any other class in the app. Any idea how to access classes in the app from the test app ? Is it supported ?
Boost Copy to clipboard Share this post Copied to Clipboard Replies 7 Boosts 0 Views 14k Participants 8 ziogaschr OP Oct ’15I have the same issue and I can't find a solution. Have you figured out a way on solving it?
0 comments 0 Copy to clipboard Share this post Copied to Clipboard Load more Add comment regosen OP Oct ’15I got around this by copying build settings for "Linking->Bundle Loader" and "Testing->Test Host" from what I had in my Unit Test target
That being said, I now get a SIGKILL at [[[XCUIApplication alloc] init] launch];
0 comments 0 Copy to clipboard Share this post Copied to Clipboard Load more Add comment johanisma OP Nov ’15Running into the same problem. Any ideas that doesn't lead to a SIGKILL 😝 ?
0 comments 0 Copy to clipboard Share this post Copied to Clipboard Load more Add comment tom139 OP Dec ’15I've got the same problem too…
0 comments 0 Copy to clipboard Share this post Copied to Clipboard Load more Add comment giuseppe.morana.funambol OP Jan ’16Same problem here...
0 comments 0 Copy to clipboard Share this post Copied to Clipboard Load more Add comment Anton Plebanovich OP Mar ’16I found solution. Somehow my host aplication falled off: http://prntscr.com/af81si
After i returned it back and checked "Allow testing Host Application APIs" everything started to work again: http://prntscr.com/af82d5
0 comments 0 Copy to clipboard Share this post Copied to Clipboard Load more Add comment philipp.otto OP Jun ’17I think this one is answered here.
https://stackoverflow.com/questions/33755019/linker-error-when-accessing-application-module-in-ui-tests-in-xcode-7-1
It seems @testable import is only intended for UITests. I still encounter this problem with XCode9 and the only solution seems to be to add the classes that you need to the UITesting target.
0 comments 0 Copy to clipboard Share this post Copied to Clipboard Load more Add comment Linker error in UI Test Target First post date Last post date QTag » Architecture Type X86_64
-
Troubleshoot Disabled EC2 Instance Types At Launch - Amazon AWS
-
The Architecture 'x86_64' Of The Specified Instance Type Does Not ...
-
X86-64 - Wikipedia
-
How To Find The List Of Applicable Instance Types For An AMI
-
Building For IOS Simulator-x86_64 … | Apple Developer Forums
-
Support 64-bit Architectures - Android Developers
-
What Is The Difference Between X64 And ARM64 - Microsoft Q&A
-
X86 Architecture Overview
-
[PDF] AMD64 Architecture Programmer's Manual, Volume 1
-
CPU Architectures - Elements Docs
-
X86-64 Architecture Guide
-
How To Find The Architecture Of OS Installed - Super User
-
64-Bit Architecture - An Overview | ScienceDirect Topics