Code Monkey home page Code Monkey logo

Comments (9)

seanhenry avatar seanhenry commented on May 24, 2024

Hi. Thanks for raising this issue. The auto-detect feature uses Apple Script to ask Xcode which project directory is open. It sounds like this isn't working for you. Could you try a few things to help me understand what is happening?

  1. Next time you see the error: "Could not detect your project. Enter one in the companion app." open Terminal and execute this command: osascript -e 'tell application "Xcode" to path of active workspace document'. Can you send the response that you get?

  2. Also when you see the error above, open the companion app. Does it show you the path to your project or does it say "Cannot find a project. Make sure a project is open in Xcode."?

  3. Next time the extension takes a long time to generate a mock. Could you cancel it before it finishes and try again? It shouldn't take longer than a couple of seconds to generate a mock unless the protocol is particularly large. Xcode should say something like: 'The command "Generate Mock" is still busy' and there should be a cancel button on the right side.

  4. Do you have more than one version of Xcode open or more than one project open at the same time?

from swiftmockgeneratorforxcode.

abbeyjackson avatar abbeyjackson commented on May 24, 2024

Next time I see the issue I will reply with all of this info but in the meantime some of this I can answer:

  1. It shows the correct path
  2. It actually always takes more than a few seconds to generate. We have a large repo and it is faster if I point the plugin to the directory that contains the protocol but it is still usually more than a couple seconds. We have a large internal framework included statically and also ReactiveSwift added via carthage. Not sure if this is relevant but I have noticed that if I get bored/distracted while waiting and I navigate off of the file while it is being generated it will often timeout or stall and I have to go back and generate it again.
  3. No only my project, no playgrounds. But as indicated above our project contains a lot.

from swiftmockgeneratorforxcode.

seanhenry avatar seanhenry commented on May 24, 2024

Thanks for the response. I think I’ve found the issue and will put out a fix soon.

Sorry to hear about the slow generation times. I intend to do some benchmarking to get better performance when I finish adding the next few features.

from swiftmockgeneratorforxcode.

abbeyjackson avatar abbeyjackson commented on May 24, 2024

No worries, our project is pretty big, I'm used to things taking a while :)

from swiftmockgeneratorforxcode.

seanhenry avatar seanhenry commented on May 24, 2024

I've uploaded the fix. The problem (I think) was that you can't run an AppleScript reliably in an XPC instance so it's now running from the extension itself. Hopefully this fixes your problem.

from swiftmockgeneratorforxcode.

seanhenry avatar seanhenry commented on May 24, 2024

I'm going to assume that fix has solved your problem. If not, feel free to open this issue again.

from swiftmockgeneratorforxcode.

abbeyjackson avatar abbeyjackson commented on May 24, 2024

Hi Sean, sorry for the delay. I will confirm for you on Monday!

from swiftmockgeneratorforxcode.

abbeyjackson avatar abbeyjackson commented on May 24, 2024

Everything is working great, thanks again Sean!

from swiftmockgeneratorforxcode.

seanhenry avatar seanhenry commented on May 24, 2024

Great!

from swiftmockgeneratorforxcode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.