Christmas is when we I have the most special feeling. The cool air, the snow, the reunion, the church bell ringing, …

It ‘s beginning to look a lot like Christmas. First with Xcode

[Xmas](https://github.com/onmyway133/xmas) is an Xcode plugin that shows Xmas picture along with wishing message whenever a build succeeds

How it works


- Try to do much of the job in Swift as possible


- Xcode uses `DVTBezelAlertPanel` to display alert. So we swizzle its `initWithIcon:message:parentWindow:duration:`
- `DVTBezelAlertPanel` is from `DVTKit`. I thought about importing [run time header](https://github.com/luisobo/Xcode-RuntimeHeaders) and just `extension` it. But I find swizzling in Objective C a much more easier solution


- It seems that `NSImage` added to the panel ‘s `NSVisualEffectView` had it `template` set to YES again, hence causing the image into template color with the panel background color
- This happens in the `init` method. So we must change `template` back to NO after `init` happens

And, Merry Christmas to you and your family


- [How To Create an Xcode Plugin: Part 1/3](http://www.raywenderlich.com/94020/creating-an-xcode-plugin-part-1)

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.