Using Objective C and Swift 2.0 together in a Mixed Project

Since the announcement of Swift and XCode 6, Objective C and Swift files can be used together in within the same project. However even with XCode 7 out, using the two languages together is not very straightforward and the Apple documentation doesn’t provide a working example to demonstrate this usage.

As I’m working on production applications that use Swift and Objective C together, I put together an example project and documentation to demonstrate how to:

  1. Use Objective C classes from Swift (including unit testing Objective C components from Swift code)
  2. Use Swift classes from Objective C (including testing of Swift components with Objective C code)

See the full sample and documentation on GitHub – Using Objective C and Swift 2.0 together in a Mixed Project.

Goodbye Skype, Hello Skyscanner!

It’s been a great 2.5 years at Skype and today is my last day. I’m leaving to Skyscanner to build a new mobile product from scratch – something I have only done so far as side projects until now.

Skype has been an awesome place to work at. I’ve worked with all of you great people, learned tons, all while having a blast. I’ve collected some of the learnings that I’ll take with me from here for the road forward.


Writing good code matters. Writing code that solves the right problem matters even more. Taking an extra few minutes now to make sure you’re solving the right problem will save more than a few minutes minutes of coding later.

The most efficient meetings are not real meetings, they’re conversations. Like a chat on the hallway, pairing in front of a computer or a quick catch up with markers in one of the phone booths. I’ve come to avoid meetings – especially large ones – as much as I can in favor to these.

There are few things that bond a team better than being given authority and ownership to deliver more and better – and succeeding in doing so.

Nothing gives me as much a piece of mind when committing code as having a robust automation and deployment pipeline in place. Things could still go wrong, but there’s a much lower chance they will.

Thanks to one 3am call while doing devops I’ve gained more appreciation for automating failovers and planning for these than I had for years before.

The key to build software in an agile way isn’t about following the scrum or kanban process itself, keeping track of velocity or other metrics. It’s about continuously and consciously improving after every iteration at a personal and team level – and shipping faster and better we thought we could.

A must read book for every engineer: Clean code. A must use perk for everyone at Microsoft: MSLibrary.

On the most productive teams people don’t care about titles. Devs write tests, SDETs can and do write prod code, PMs do testing and everyone contributes to the spec. Teams where people are careful to only do work that is part of their role responsibility spend more time talking about who should do what and ultimately deliver slower.

I’ve yet to find a better and more fun way of solving a hard or complex problem then pairing with anyone on the team.

Working with a group of people you get along well matters. Working even on straightforward tasks with enthusiastic and fun people is always interesting and a good time.

If you feel you’re not learning or being stretched as much as you could be – challenge yourself more. I always feel excited and full of energy when starting something new and unknown – may this be using a new framework, tool, language, project, switching teams – or jobs!​


Thanks for everything.

- Gergely

PS:Every time someone will stop me to talk about Skype I’ll feel proud to have been part of this team. Keep on building stuff that people use and love.

Learning WinJS Fundamentals

I’ve just published my first Pluralsight course, WinJS Fundamentals. WinJS is the Javascript framework developed by Microsoft to help with developing Windows 8 apps on the Javascript / HTML stack – which is the alternative to the C#/XAML stack on this platform.

Why Learn WinJS?

So why would you want to choose Javascript – and with it, WinJS – over C# and XAML to build Windows 8 applications? From my view these are the top 3 reasons to do so:

  • 1. Javascript is a Really Hot Technology
    Javascript is becoming really popular with web development (from jQuery to Angular.js) and server side development alike (Node.js). On Github Javascript is the #1 language used in repositories as of December 2013. It’s hard to find a more popular language than Javascript today.
  • 2. Microsoft is Investing Heavily in the Javascript Stack
    There is a lot of investment going into the Javascript stack on Windows 8 from Microsoft. In 2012 WinJS 1.0 was released. Only a year later, in 2013 WinJS 2.0 came out with lots of new features and significant improvements. I am expecting this investment to continue for the coming years, WinJS and the Javascript stack in Windows 8 becoming even more powerful.
  • 3. Most 1st Party Windows 8/8.1 Apps are Already Built Using Javascript / HTML
    Do you know what technology was used to build the email app on Windows 8.1? Skype? Music? Games? Video? Weather? News? Travel?

    These – and most other preinstalled apps – were all built on the Javascript/HTML stack, making heavy use of the WinJS framework. If Microsoft decided this stack was good enough to build key Windows 8 apps with them, it will likely work for your app as well.

What’s In this Course?

The course aims to cover the basics of WinJS, concepts that almost all apps will use. These topics are:

  • Introduction and WinJS Overview
    What the main features of WinJS are and how does WinJS compare to other popular Javascript frameworks like jQuery, Angular.js or Knockout.js.
  • Classes and Namespaces
    Working with classes in Javascript is possible, but the syntax is not very straightforward. WinJS introduces class helpers to deal with classes in a clean and structured way and adds support for using namespaces.
  • Mixins and Events
    WinJS introduces a powerful feature, mixins, to help with code and functionality reuse between classes. Mixins is a similar concept to multiple inheritance and event support for classes is easy to implement implemented using some of the built in mixins like eventMixin.
  • Data Binding
    WinJS has built in data binding support to allow updating the HTML UI of the application from the javascript data source. In this module we’ll be convering one time, one way and two way data binding, as well as data binding converters.
  • Promises
    Promises is an asynchronous programming concept which allows working with asynchronous operations in a nice and clean way. In WinJS, promises are a really important part of most applications, so because of this it is critical to understand them and know how to use them.
  • Pages and Navigation
    By using pages in our application, the app can be structured in a clean and modular way. In this module we’ll be going through the most important things to know on using pages and navigating between them.

If you’d like to watch this course, you can do here, on Pluralsight. If you don’t have a Pluraslight subscription, you can sign up for a free trial and watch most of the course using the trial period.

Other Resources to Learn WinJS

This course is meant to be to give solid understanding of the most important parts of WinJS. If you want to learn more or about different parts of WinJS, here are some further good resources:

Flashlight 7 Update: Constant LED Light Around the World

The latest version of Flashlight 7, v4.4 has added two exciting features: it now supports continuous LED light without flickering and has been fully translated to all 19 languages supported by Mango.

This makes Flashlight 7 the only app on the market to support constant LED light under the lock screen as well as probably the most feature rich and handy app available.

So grab the update now, what ever language you may have set your phone to:

And here’s a screenshot of the LED:


Flashlight 7 Updated to Mango, Adds LED Support

I’m happy to announce that Flashlight 7, the – currently – most popular flashlight app has been updated for Mango and now has LED support. According to tests the LED works on all phones, except for HTC HD7, MTC Mozart and Dell Venue Pro – these models don’t seem to properly implement the API used to trigger the light on and off. The other features – such as police light, hypnosis, kaledioscope mode – have not been touched in this release, but expect some more fun modes in future releases.

And finally some pictures: the app running on a Samsung Omnia 7 and some screenshots of the application. Hope you enjoy the app, grab it from the Marketplace here, it’s free!

Bus Tracker Edinburgh for Windows Phone 7

I’m happy to announce that I’ve finally finished and published the Edinburgh Bus Tracker application, Bus Tracker Edinburgh. It’s completely free, get it from the Marketplace now:

Main features of the application are:

  • Find bus stops based on your location, by service number or by bus stop codes
  • Mark stops as favorites and access them with a simple swipe on the main screen
  • Acess the most recently viewed stops from the main screen
  • Get automatic Lothian bus service alerts
  • … all designed to blend perfectly with your Windows Phone with beautiful Metro design

(A note as to why I chose this name versus Edinburgh Bus Tracker or EdinBus: should you not pin the app to the start page it’s somewhat a drag to scroll all the way down to “E” to start the app. Changing the name to start with “B” seemed to put it at my fingertips in the long list app selector as well).

For more information and screenshots, visit the Bus Tracker Edinburgh home page.

If you’re an Edinburgh resident I hope you’ll find it useful on your everyday commute. (And if the lack of this application was stopping you getting a WP7 you can now reconsider it ;) ) Enjoy!

Ad Rotator Control for Windows Phone 7

I’ve finished creating an ad rotator control for Windows Phone 7 and have published it along with the source code here: Windows Phone 7 Ad Rotator on CodePlex.

I originally created the control so that I could dynamically configure ads appearing on Flashlight 7 based on ad culture. In the US I normally prefer using PubCenter as it usually has the highest eCPM, outside of the US I would switch between other providers (AdMob, InnerActive and AdDuplex for promoting of the app). The main reason for changing the ratios of ad providers was that I wanted to experiment how showing more AdDuplex ads impacts downloads of the app – with this little tool I can do so when eCPM has gone somewhat down (Note: I’ve actually found AdDuplex have a positive effect on app downloads and use it despite higher eCPMs as well).

The control allows setting up of ad probabilites based on culture, so its possible to configure (and update) such a configuration as this:

  • US: 80% PubCenter, 10% InnerActive, 5% AdMob, 5% AdDuplex ads
  • Germany: 80% AdMob, 10% PubCenter, 10% AdDuplex
  • France: 100% AdMob
  • Other: 25% PubCenter, 25% InnerActive, 25% AdMob, 25% AdDuplex

Read the project description and the WP7 ad rotator documentation on more details on how to integrate the control into projects.

Hope you find this tool useful!

Creating a Beautiful Windows Phone 7 Application

I’ve presented the talk Creating a Beautiful Windows Phone 7 Application in two locations the past weeks:

Some useful resources to get started with:

Slides of the talk:

Cocktail Flow – Valentine’s Day Update

Cocktail Flow (on Twitter: @CocktailFlow) development hasn’t slowed since the Holiday update and I’m happy to announce that we’ve released another update for Valentine’s day. This update comes with a new, Valentine’s package as well as several small, but useful features added.

The most important things we’ve added this update are the following:

  • Valentine’s day cocktails – nearly 30 delicious, themed drinks are added to the application in the Valentine’s package
  • Packages can be deactivated and activated. This means if you’ve downloaded one of the holiday packages, but aren’t interested in those cocktails during the summer, simply deactivate the package to hide its contents.
  • Extended cabinet – we’ve added a few drinks to the cabinet and from now on the cabinet is dynamically growing based on ingredients in packages.
  • Search by ingredients – simply start typing the name of an ingredient in the search field and cocktails containing ingredients with that name are also returned.
  • Smarter cabinet – if you select dark rum, lime juice and coke in the cabinet, you’ll see that Cuba Libre is suggested as a cocktail that can be mixed, even though the official recipe suggests using white rum, not dark. However, we’ve introduced substitute ingredients, and in the case of Cuba Libre, both white rum and dark rum can be used to mix this drink.

And finally, here are a few screenshots of some of the new cocktails and new features:

Valentine’s Day package and the ability to deactivate (and activate) packages

Read More…

1 2 3 7  Scroll to top