
While we’re in the target info, switch over to the properties tab and change the Identifier field to read com.accentuateus.$, which resolves to AccentuateUsService, because I used that earlier in main.m. Under the Packaging category, change the Wrapper Extension settings from bundle to service. Go to Project > Edit Active Target "AccentuateUsService".

The first problem is that the default bundle is called AccentuateUsService.bundle, but we need it to be rvice. Choose Bundle with the Core Foundation framework and save it as AccentuateUsService.
CREATING MAC OS FRAMEWORK MAC OS X
In subsequent posts, we will dig deep with the API and see just how easy it is to make a system-wide utility to accentuate or process selected text in a way you desire! SetupĪctually configuring the project in Xcode was the area that I found most difficult, so for your benefit, I will err on the side of caution and be overly detailed.Ĭreate a new Xcode project and under the Mac OS X pane on the left, select Framework & Library.

This will successfully lay the foundation for creating an OS X service and get it to the point that it can lowercase any selected text. It is important to reiterate that the three services mentioned brought me close to what I needed, but all lacked in explaining the setup itself or did so in an unfavorable way, which is what I will correct in this part of the series. There was a workaround mentioned that involved compiling two different targets, but I found that unnecessary and document the solution within this post. Unfortunately, after following Simone’s step-by-step, I encountered the note at the end of the post admitting that “the bundle doesn’t actually work,” which was slightly important to the project. I found much detail online about helper utilities to make services, but little material on coding my own, except for CocoaDev’s making services, which had the same issue of not discussing the setup of the Xcode project itself, and Simone’s very detailed walkthrough. Although Apple’s developer documentation did prove useful once the project was underway, I felt that there was too little detail about setting up the project itself within Xcode, which led to much undue frustration. I was disappointed by the documentation that I found online.

Note that at the moment it is still under development, so it only accentuates into Irish for testing purposes. Wanting yet another example of how easy it is to implement the API, I decided to take on the task and implement an OS X Service myself. One that Apple provides is to highlight a word and, in the context menu or the application’s services menu (i.e., Safari > Services), you will be provided with an option to look the word up in the dictionary. Services provide the user with contextual operations: working with text, images, and so forth. I was back working in OS X the other day and got to thinking about an often underused portion of the operating system: Services.
