MockGenerator icon indicating copy to clipboard operation
MockGenerator copied to clipboard

Cannot Generator for Pods

Open gwsounddsg opened this issue 6 years ago • 2 comments

Appcode 2019.3 Xcode 10.3 (not sure if you need this) macOS 10.14.6

I can successfully generate mocks for anything other than classes/protocols/structs etc from a Cocoapod. After choosing a type (eg: dummy) nothing happens. When generating mocks for non-pod sources, its fairly quick. I also tried letting it sit for 4 minutes to see if it was just being slow.

Thanks, GW

gwsounddsg avatar Jan 13 '20 21:01 gwsounddsg

Hi @gwsounddsg thanks for raising this issue.

The only reason I can think of is if the protocol/class is really big and it's trying to generate a huge mock. If you command-click into the protocol/class how many properties, methods, initializers, etc does the declaration have? Also, are there lots of protocols/superclasses?

seanhenry avatar Jan 14 '20 17:01 seanhenry

Hey @seanhenry,

So I tried a few others and it looks like it is working for smaller mocks. The one I was trying to do has quite a few methods (I didn't count but it looks like around 30+). So I'm guessing you're right that it was just working and taking quite a while.

Not sure if there's anything you can do on the plugin side of things to let the user know it's working? Or to be able to have it start generating and then the user can continue to work on other parts of the code to make it work (even if it generated it to a Scratch File and the user had to copy paste it in).

If you'd like to try it on your end I'm using CocoaAsyncSocket and trying to mock GCDAsyncUdpSocket.

Let me know if I can help out in any way.

Thanks, GW

gwsounddsg avatar Jan 14 '20 18:01 gwsounddsg