Question: Plugin in Swift language

I fill more comfortable with writing the code in Swift more than Objective - C
Is that possible to write plugin in Swift language? to transfer SDK into this language?

You can reuse the ObjectiveC templates for that purpose.

Nice!

Out of curiosity, were you able to get this to work?

I tried this afternoon, and ended up somehow triggering a segfault in the Python libraries(?!) I also had to tweak an XCode build setting.

I think @bensyverson once wrote a plugin in Swift. I can help you with objc and py. He maybe has a few tips for you, or take a peek at his GitHub repos.

The swift runtime that comes with Xode 8 will somehow disturbe the pyobjC bridge. Xcode 7 is fine. But that is not a variable solution to be forced to stick to an outdated version.

That makes sense, since I wasn’t using the Py bindings :slight_smile: I’ll try again after the next XC release.

The Github repo is 3 years old (!) at this point, so it’s pretty out of date. I recently started porting that plugin to Python in a different repo, with the intention of adding a few features. In my opinion, unless you’re relying on an existing codebase, you might be better off with Python rather than wrestling with Swift!

(Glyphs can now show the outlines of all masters in edit mode. Activate it by opening the eye in the layer panel)

Well, as it turns out I haven’t written any Python in at least five years, so some wrestling was in my future either way. But in the end I got something working.

You actually can use a plugin written in Swift, as long as you don’t have any Python plugins.