markohlebar / Import

Xcode extension for adding imports from anywhere in the code ☝️
MIT License
846 stars 40 forks source link

Import is not present in Extensions and doesn't seem to be installed #3

Closed akaralar closed 7 years ago

akaralar commented 7 years ago

I'm on 10.11 and when I followed the steps in the readme I can't see it in Editor > Import. I can't see it in System Preferences > Extensions > All as well. When I click Install Key Bindings I get: Binding is already set. Import is ready to be used in Xcode.

But I can not see it under Editor. What might be causing this, how can I help debug?

markohlebar commented 7 years ago

Hey @akaralar thanks for reporting this. TBH I'm not 100% sure. You could try building from source like this...

If so you can:

akaralar commented 7 years ago

The second xcode crashed as soon as it opened. Here is the start of the log:

UNCAUGHT EXCEPTION (NSInternalInconsistencyException): The loaded com.apple.CoreSimulator.CoreSimulatorService job does not match our expectations: pathOfLoadedJob: /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc/Contents/MacOS/com.apple.CoreSimulator.CoreSimulatorService, our frameworkPath: /Applications/Xcode7.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework

I have xcode7 installed as well and it seems it's getting in the way. How do I prevent this, any clues?

markohlebar commented 7 years ago

Ah, sorry app extensions are only available in Xcode 8, if you want a plugin with similar functionality, check out my other project Peckham

akaralar commented 7 years ago

No I have Xcode 8 and Xcode 7 side by side, and Xcode 7 is preventing the installation on Xcode 8. If I didn't have Xcode 8 I would't be able to build the project since it's in swift 3 :)

akaralar commented 7 years ago

To be exact, Xcode8 has the name Xcode in Applications and Xcode7 has the name Xcode7

akaralar commented 7 years ago

I installed Xcode 8 by updating xcode7 from MAS and installed Xcode7 from the developer website.

akaralar commented 7 years ago

BTW I was using Peckham as well, thanks for these tools which removes the biggest annoyance while developing.

markohlebar commented 7 years ago

Ugh, that is a tough one... I initially thought your debug session was running Xcode 7. Just to make sure, can you go to Product -> Scheme -> ImportExtension -> Edit Scheme... -> Run -> Executable -> Select "Ask On Launch" Then try running again, it will then ask you to pick an app, so select your Xcode 8. Hope that works :)

Your welcome! 👍

markohlebar commented 7 years ago

Updated comment, it's not None, it's Ask On Launch sorry...

akaralar commented 7 years ago

Ah it was asking on launch, and at the top was the app Xcode, so I thought that was Xcode 8 because its name is Xcode in Applications. However when I scrolled down I saw I have 2 Xcode entries, and when I hovered over those items, the path of the app was shown in a tooltip. Turns out the topmost app with the name Xcode is Xcode7, which has the name Xcode7 in Applications...

Thanks! Now I see import!

markohlebar commented 7 years ago

Does it stick even if you completely close Xcode?

markohlebar commented 7 years ago

I mean is Import still there when you close and open Xcode :)

akaralar commented 7 years ago

Hmm sorry didn't try that and installed it now :( If you can tell me how to uninstall it, then I can try that too.

markohlebar commented 7 years ago

If the menu is there, then it's fine... Uninstalling should be as simple as trashing the container app. I'm saying should be because sometimes it's magically still there for me 😬

akaralar commented 7 years ago

Haha yeah however hard they try Apple can't seem to keep magic out of Xcode...

akaralar commented 7 years ago

Solved my problem, thanks for the swift (pun intended) support!

markohlebar commented 7 years ago

@akaralar any time 👍