Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Using addDefaultXCTestPrivateActions does not work in Xcode 10.2 #75

Open
fbernutz opened this issue Apr 2, 2019 · 8 comments
Open

Comments

@fbernutz
Copy link

fbernutz commented Apr 2, 2019

I tried to run the example project in Xcode 10.2 but it seems like monkey.addDefaultXCTestPrivateActions() is not working with this Xcode Version, while using monkey.addDefaultUIAutomationActions() works fine.

"Not working" means, you can not see any paws and nothing happens while running the UITest.

Maybe you have an idea why it's not working?

@wojciechczerski
Copy link
Member

Hey @fbernutz and thank you for your report. We got a similar issue reported for the beta release (see #73) and it looks like it's not just a "beta thing". I'll try to find a solution / workaround for this problem and will get back to you as soon as I have something.

@wojciechczerski
Copy link
Member

@fbernutz I did some research and as it has been mentioned in #73 the XCEventGenerator class seems to have be removed from the XCTest.framework. Unfortunately I couldn't find anything similar that could be used as a replacement. This means that as for now, I don't have a solution to this issue 😢. As you have mentioned, the monkey.addDefaultUIAutomationActions works fine, but only on a Simulator.

I've already marked this issue with "help wanted". Sorry for not having more positive update 😞

@maokaiqian
Copy link

Hello, when can it be solved?

@tkirby
Copy link

tkirby commented Apr 23, 2019

Maybe add this to the project description so people don't spend time trying to get this running?

fbernutz added a commit to spacepandas/cineaste-ios that referenced this issue Jun 2, 2019
This is not working efficiently anymore with Xcode 10.2
(zalando/SwiftMonkey#75)
@kaustubhkabra
Copy link

This issue still persists on public Xcode 10.2. Any further help here?

@wojciechczerski
Copy link
Member

Hey, I'm afraid there is no solution since this function was relying on an API that has been removed by Apple. You could try using monkey.addDefaultUIAutomationActions but that one will only work on a Simulator.

@yeugeneu
Copy link

Found a workaround per this post

Simply replacing your XCTest.framework on xcode 10.2 with an older version (i tried xcode 10.1) will work.

Look for the framework at the following path:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework

@Bintong
Copy link

Bintong commented Jul 29, 2019

xcode 10.2 also not work use .addDefaultXCTestPrivateActions .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants