"unsafeMutableAddressor : Swift.String", referenced from:.."

It is possible to access application code from your UI tests. Just add the source file to the UI test target:

enter image description here

You can then access that application code from within your UI test code:

enter image description here

But bear in mind that the application code you're accessing thus from your UI Test is code running in your UI Test target (MyAppUITests), it does not correspond to the code running in the actual app target (MyApp). So do not use it to inspect or modify application state.


The conslusion is: it is not going to work.

I report it as a bug to Apple, and got a response:

UI tests execute differently from Unit tests - Unit tests run inside your application process so they can access your application code. UI tests execute in a separate process, outside your application, so they can simulate how the user interacts with the application. It’s not expected that you will be able to access your app class from a UI test.