Monday, July 21, 2014

How to convert/integrate SWIFT with Objective C

Welcome to Part 12 of my blog series about game development.
Today I'll show how to combine SWIFT with Objective-C code. There is no need to migrate all of your existing code to SWIFT. You’ll not sell one App more, if this is the only improvement of your new version. Not to mention all the possible new bugs you might include during the migration. A better strategy could be developing new code in SWIFT and keep existing code in Objective-C.

Prerequisite is XCode 6.1!

I've moved my blog to a new address: http://developerplayground.net
An updated version of this article for XCode 6.3 and SWIFT 1.2 can be found in my main Blog here.


I’ll show two scenarios:
  • calling SWIFT from Objective-C
  • calling Objective-C from SWIFT


Wednesday, July 2, 2014

WWDC and SWIFT

Welcome to Part 11 of my blog series about game development.


I've been busy the last weeks with watching WWDC videos. So much new stuff and so little time ;-). 

My favorites are Swift, Playground, Sprite Kit enhancements like the new level editor and especially this new Interface Builder Feature: It is possible to use ONE Storyboard to target both: iPad and iPhone/iPod.

Luckily Apple lifted the NDA a little bit, so it's allowed to talk about the new stuff.

But step by step...

First of all I'm planning to implement new parts of my game in SWIFT! 

What does this mean? 

One of the first things I've to figure out is how to call Objective C code from SWIFT and vice versa. I'll show this in one of my next posts.

Why?

Writing this Blog and implementing a game is one of my hobbies. I've no intention to earn money with it. Learning new things means fun for me. I just WANT to learn SWIFT. Maybe I would have taken a complete different decision in my job.

Where to start?

A good starting point to learn Swift is the official documentation from Apple. The iBooks version is available hereIf you just want to have a quick start with SWIFT you can use this Cheat Sheet, provided by Ray Wenderlich. You can also find some SWIFT tutorials on his website.



That's all for today. I want to complete the WWDC video about 'What's new in SpritKit'. In my next post I'll show how to combine SWIFT with Objective C.


Cheers,
Stefan