Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mock generator not appearing in editor #21

Open
moheny opened this issue Jan 14, 2019 · 8 comments
Open

Mock generator not appearing in editor #21

moheny opened this issue Jan 14, 2019 · 8 comments

Comments

@moheny
Copy link

moheny commented Jan 14, 2019

It used to work on Xcode 9.+ .
Once I have upgraded to Mojave and Xcode 10, the generator disappears from the editor menu.
Of course I have enabled permission at Check System Preferences -> Security & Privacy -> Privacy.
Also I have tried to reinstall and still not appearing in the menu.
Any suggestion how can it be solved? I really love this extension.
Edit: all of the extension not working for me. Is there anything I can do beside reinstall Xcode?

@seanhenry
Copy link
Owner

Hi @moheny

Thanks for raising this issue. Run through this check list to make sure everything is set up correctly:

  • The latest version of this plugin is installed (v0.18)
  • System Preferences -> Security & Privacy -> Privacy -> Automation shows Swift Mock Generator and Xcode is checked
  • System Preferences -> Extensions -> Xcode Source Editor shows Mock Generator enabled

@moheny
Copy link
Author

moheny commented Jan 14, 2019

Thank you for the fast reply.
The 'Xcode Source Editor' is not appears in the menu... is there any thing I can do to make it appear?

@seanhenry
Copy link
Owner

I'm not exactly sure how the OS finds Xcode extensions but I have a feeling it might use spotlight. Make sure it is installed in the /Applications directory and that you have opened the app. Open spotlight and see if you can search for Swift Mock Generator for Xcode.

@moheny
Copy link
Author

moheny commented Jan 14, 2019

I believe this is an Xcode problem since the 'Xcode source editor' is not even shown in the menu.
I have installed Xcode through appStore so I really have no clue why it is not appearing in the extension menu.
This is, apparently, has nothing to do with your extension, hence I think we can close this issue. I'll try to reinstall Xcode and pray to god it will work :-.
Maybe having your service online is not a bad idea. you can even make money from commercials like swift converter :-).
Anyway thank you for stepping into this.

@seanhenry
Copy link
Owner

I've since had this problem myself and managed to fix it. I've added instructions to the README and copied them here for reference:

Troubleshooting

You might find that you are not able to see the plugin in the Editor menu or even in the Extensions preference pane. This seems to be caused by installing your Xcode version(s) outside of the App Store. If this happens, open Terminal and run:

$ pluginkit -m -p com.apple.dt.Xcode.extension.source-editor -A -D -vvv

If you can't see the plugin in this list then you can reset your list of plugins by running the following in Terminal:

$ PATH=/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support:"$PATH"
$ lsregister -f /Applications/Xcode.app

See here for more information.

If the above fails, then completely removing the plugin and downloading/installing it again seems to work.

@iandundas
Copy link

Didn't work for me :( one day the editor menu item just vanished, and also the Xcode Source Editor entry from Extensions System Preferences panel also vanished.

Did the above troubleshooting steps above (with Xcode closed), and reinstalled the mock generator app, and then did the steps above again, then opened Xcode, checked the Extensions panel, restarted Mac, did all the above again.. still no joy.

However interestingly, maybe you're on to something about Spotlight, because searching for "Swift Mock Generator for Xcode" in Finder does not show the app in the results (even though it's in /Applications).

I will try to reload the Spotlight index and report back

@iandundas
Copy link

Well it works now. I think I had the wrong path to my Xcode when running lsregister -f /Applications/Xcode.app - so that would explain why it didn't work 🙄

@seanhenry
Copy link
Owner

Great, I'm glad it's working 👍

@seanhenry seanhenry changed the title Mock generator not appearing in editor| Mojave Mock generator not appearing in editor Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants