This is my simple test case:
import XCTest
@testable import MyApp //it doesn\'t work
because of this:
class TabBar
I solved the inaccessible symbol problem by pulling some stuff from my app target into two frameworks (model and view-model) that I can then import into my UI tests.
As for accessing the actual memory of the executable, you can't, but you can test for things that should appear on screen somewhere in that mode. I use this assertion to e.g. check for the existence of a table view cell:
XCTAssertTrue(tables.cells.staticTexts["Cell title I expect to exist"].waitForExistence(timeout: 1))
Since you can use accessibility you can access a pretty decent amount of things this way. I suppose you could add an invisible label with a dump of your app's memory-in test mode only!
I too make use of the launch arguments to configure my app for UI tests, as Michael suggested: https://stackoverflow.com/a/34469136/4789448.