Showing projects tagged with “Swift”

Noto

Plain-text editor for macOS written in Swift.

macOS Cocoa Swift

Screenshot of Noto

A plain-text editor for macOS with a focus on a minimalistic user interface, pretty and customizable themes, and useful features.

I enjoy having a small text editor for plain text files. Many editor apps try to do too much, or try to be portable and then sacrifice functionality instead. I decided I wanted to build something simple and targeted to macOS only so that I could use all of the cool features of macOS.

This project was inspired by a previous project of mine, TipTyper, which was also a plain-text editor, but written in Objective-C. That was the project that taught me Cocoa programming. Now that I feel I have an improved level of knowledge of Cocoa, I felt it would be appropriate to re-do that project, but now using the fantastic Swift programming language.

And because some people prefer light text on dark background, others dark text on white backgrounds, some others enjoy sepia tones, and others something completely different, I felt it was important to have a capable theme engine to allow the user to pick whichever colors they want for the entire document interface.

Work in this project is still ongoing, albeit a bit slow.

Kodex

Advanced code editor for iOS.

iOS UIKit Swift Objective-C

Screenshot of Kodex

I have always wanted to replace my notebook with a tablet for most of my daily tasks. I couldn't find a code editor for iOS that fit my needs and desires, especially regarding multi-caret edititng, so I decided to write my own.

Kodex has several features I couldn't find in other code editors available for iPad. The main one is multi-caret editing. This feature has become a major tool I consistently use to transform and replicate code, and not having it really hurt my productivity.

This project was started back in June 2017, and it has finally reached the App Store in March 2018. It took several late nights of creating problem solving; studying UIKit, TextKit, and other Apple APIs; and bug solving to reach an MVP.

Some other desktop-class features included in Kodex are:

  • Customizable key bindings
  • Regex search-replace, with capture group highlighting
  • Support for third party fonts (using Configurator system profiles)

Kodex is only at version 1.0, and developing it has been very educational and fun. It makes use of some free software packages, without which it Kodex wouldn't be possible. The list of used packages is listed in the Acknowledgements page of the Settings section. I have also made part of its source available under the LGPL license as the KeyCommandKit library, allowing the entire UIKeyCommand customization feature to be implemented by any App.

Nixie Watch

Nixie-tube watch “face” for Apple Watch.

watchOS CoreImage Swift

Screenshot of Noto

Tap watch to run animation

When I saw Woz demonstrating his "Nixie-Tube wrist watch", a behemoth that makes the Apple watch look like futuristic miniature tech, I decided it would be a cool custom watch face to develop for myself. However once it became clear Apple doesn’t want developers to create third party faces, I decided to simply make it anyway and put it on GitHub.

It was quite a challenge to build, in the end, since watchOS (especially watchOS 2, at the time) has very limited graphics capabilities. I had to render the watch face to an image buffer using CoreGraphics, output that to an image, and only then display on the screen.

Afterwards I modified it to render several “dummy” faces that are displayed in quick succession before the actual hour/minute faces in order to resemble the animations used by some of the other nixie watches out there.

It is a project I go over every once in a while and change some small things, and it certainly makes people curious when I show them my "exclusive" watch face.

tune

Command-line interface for iTunes.

macOS ScriptingBridge Swift

Screenshot of tune

Many times while at work, or while managing one of my VPS machines, I felt like I wanted to play some specific song from my iTunes library. But because I had my screen covered with several terminal sessions, many times in full-screen, it felt more like breaking my workflow than anything else.

So in a reversal of what I did with Cakebrew, I wrote a command-line tool to control a graphical application. Because ScriptingBridge, a fantastic feature from the heydays of Mac OS X, is still present in macOS, this was as easy as it can be. A simple programming interface is auto-generated, to which you can link and build code that sends and receives information from other applications.

A first version was a simple command line input-output program, with at most a single prompt in case your query produced more than one relevant result. Later I rewrote almost the entire thing to have a prettier text interface, using ncurses.

Now that macOS has Siri, this has become less of a problem, as I can ask Siri to play a specific song for me. However the fun in creating a project in ncurses for the first time made it still worth it.