Xcode 10.1 and creating Xcode extensions
Alex Zavatone
Looking at Apple’s docs for creating an Xcode Source Editor Extension and I just noticed that there is no option to create a MacOS Xcode Source Editor Extension or any MacOS Application Extension.
Is this now not possible? Any ideas how to do this? https://developer.apple.com/documentation/xcodekit/creating_a_source_editor_extension?language=objc Thanks in advance.
|
|
Jonathan Prescott
Not quite sure what you mean by an MacOS Xcode extension? Since Xcode only runs on MacOS, any extension you write for Xcode would seem to be a MacOS Xcode extension. I have a ton of Xcode extensions that I use, and I only program for MacOS at this time.
toggle quoted messageShow quoted text
As far as a MacOS extension, you can build Finder extensions, Mail extensions, extensions for other applications. You can also write kernel extensions to extend Darwin, contextual menu extensions, and lots of other means to extend functionality amongst the applications that make up MacOS. Not all are represented by Xcode templates, unfortunately. How to build such extensions is also widely distributed both amongst Apple documentation and common lore. Jonathan
|
|
Jonathan Prescott
If you mean some extension beyond the Xcode source code editor, like, support for a language, or debugger, or source code manager, etc., there is no Apple-approved extension beyond mechanisms for handling source code text, or file system access. Since Xcode 8, the ad-hoc mechanisms that people discovered or reverse engineered to extend Xcode (for example, there was a Fortran extension that I used to integrate Fortran numerical routines that worked pretty well) were cut off with the signing requirements and sandboxing that Xcode now puts extensions in.
toggle quoted messageShow quoted text
Jonathan
|
|
Alex Zavatone
I’m using the exact term that is specified in the Apple documentation link that was provided. The link says to create a macOS template of Xcode Source Editor Extension. I tried creating a new project this on two computers running Xcode 10.1 and there is no such target option for macOS. Look at the link below. Create a New macOS Project in XcodeTo create a source editor extension, begin by creating a new macOS project in Xcode. Add a new Xcode Source Editor Extension target to your project,
|
|
On 28 Feb 2019, at 7:24 pm, Alex Zavatone via Groups.Io <zav@...> wrote: I beg to differ, using Xcode 10.1: b
|
|
Alex Zavatone
OK. Awesome. You see it. I tried this using Xcode 10.1 on one Mac running 10.13.6 and another running 10.14.x
toggle quoted messageShow quoted text
Neither had that option. Is the center part of the window actually a scroll view but without any indication that it is scrollable? I am betting it is. Jesus, I want to beat some Tog into the heads of the new UX designers. There is NO indicator that the center area is scrollable at all on both of my Macs. And even if I try to filter on Xcode, nothing shows up if I do. What happens if you filter on Xcode?
|
|
On 28 Feb 2019, at 7:33 pm, Alex Zavatone via Groups.Io <zav=mac.com@groups.io> wrote:Yep. I am betting it is. Jesus, I want to beat some Tog into the heads of the new UX designers. There is NO indicator that the center area is scrollable at all on both of my Macs.Welcome to 2011. Let me introduce you a preference setting that's been around since Mac OS 10.5: https://heresthethingblog.com/2015/03/10/mac-tip-macs-scroll-bars/ And even if I try to filter on Xcode, nothing shows up if I do.That's weird. It filters correctly. If I enter "co", for example, it narrows down to several including "Content Blocker Extension" and "Xcode Source Editor Extension". b
|
|
Gary L. Wade
It appears the confusion comes from the fact you get application extensions while adding a new target to an existing project rather than from a new project.
toggle quoted messageShow quoted text
-- Gary L. Wade
|
|
Jon Gotow
Bingo - you have to create an application project, then create a new target to make an extension. I suppose that's because extensions generally have to be embedded inside a host application.
toggle quoted messageShow quoted text
- Jon
On Feb 28, 2019, at 8:41 PM, Gary L. Wade <garywade@desisoftsystems.com> wrote:
|
|
Alex Zavatone
Look at what you are seeing, the first image in the Apple link and what I am seeing.
toggle quoted messageShow quoted text
This is what I see when I do a new project. If I filter on Xcode, no templates are listed. Compare this to the image that you posted and the Fig. 1 in the Apple link.
|
|
Alex Zavatone
I really hate Apple most of the time. This is one of those times. Thank you, everyone.
|
|
Roland King
On 3/1/19 12:58 PM, Alex Zavatone via
Groups.Io wrote:
I don't see why. The documentation is pretty clear, from the
Apple docs
(https://developer.apple.com/documentation/xcodekit/creating_a_source_editor_extension)
and from the blog post you posted a few hours ago (http://www.vadimbulavin.com/xcode-source-editor-extension-tutorial/,)
"Xcode editor extensions cannot exist on their own and must
be wired up to a macOS application. "Now add Xcode Source Editor Extension Target to your newly
created project. Let’s call it SourceEditorExtension. Tap Activate
when it prompts you Activate “SourceEditorExtension” scheme."
|
|
Steve Mills
On Feb 28, 2019, at 23:04:57, Roland King <rols@rols.org> wrote:What is sorely missing from that paragraph is the word "application". It just says "new macOS project" but fails to mention what TYPE of project. It's highly confusing and sounds like they don't know what they're talking about, as if they want you to be in the new project dialog when you "add a new Xcode Source Editor Extension target to your project." -- Steve Mills Drummer, Mac geek
|
|
On 01 Mar 2019, at 6:22 am, Steve Mills via Groups.Io <sjmills=mac.com@groups.io> wrote:It seems to me that it doesn't actually matter (at least insofar as being able to create the target). I tried creating new projects with Cocoa Framework, Command Line Tool, Screensaver, and AppleScript App, and in every case I was able to add a new target where Xcode Source Editor Extension was an available template. It's highly confusing and sounds like they don't know what they're talking about, as if they want you to be in the new project dialog when you "add a new Xcode Source Editor Extension target to your project."I don't agree. The subheading at the top of page is "Add and configure a source editor extension in your Xcode project." And the paragraph you quoted yourself prescribes two steps: 1. begin by creating a project; 2. add a target to the project. The article seems to be written for an audience who already understands the difference between a project and a target. That seems like a reasonable expectation for an Xcode developer (particularly one interested in creating an Xcode Source Editor Extension). Despite all this, did you file a Radar on the documentation? b
|
|