Ad

Our DNA is written in Swift
Jump

Resource Bundles

When shrink-wrapping your code for later reuse you inadvertenly will come into the situation that you have some resources (strings, XIBs, images et al) in your project that you also want to be reused. So what do you do?

If only we had frameworks on iOS … then we could bundle the resources together with the code in a framework. But Apple does not want us to compile frameworks in Xcode since these could potentially contain code downloaded after the app review process.

Popular projects like ShareKit or the Facebook iOS SDK have approached this dilemma by simply putting all resources into a folder, giving it the “.bundle” extension and instruct users of their SDK to also add this bundle to the “Copy Bundle Resources” step of their respective apps.

In this here blog post I will show you a smarter way.

Read more

Podcast #35 – “TapCaps”

Episode 35, recorded Saturday, 28th of April 2012. “TapCaps”

Alice Ning discusses the ins and outs of having a Kickstarter campaign for physical products versus software, we learn a bit about the magic behind capacitive touch screens and we learn what goes on behind the scenes of the TapCaps Kickstarter campaign.

Read more

Linguan with XIB Support

I’ve seen it! The fabled XIB support for Linguan is almost done.

Read more

Creating a CoreData Model in Code

I’m working on my own file and image cache that uses CoreData for storage. The same way that NSURLCache is doing it, but with some optimizations that I know and understand. So I created DTDownloadCache and got it all working, but there was one minor thing that I didn’t like: The usual method of creating a CoreData entity model is by the entity editor built into Xcode.

This meant that I had to include the .datamodeld file in apps using this. But I didn’t want to have to create a resource bundle just for this single file as you would have to do if you keep your reusable code in static libraries. Ugh!

Fortunately there is a way how you can create a static model entirely in code so that you can make use of CoreData without having to ship an XML description of the model.

Read more

Disabling Facebook SSO, elegantly

The experts are still out as to the motivations behind Facebook’s iOS SDK strategy. But it is rather clear that if Facebook has their way then everybody is to be using their Single Sign-On (SSO) technique. Besides all potential advantages of having this SSO in place it has to leave your app for signing on.

Not exactly something that is useful for all use cases. We have one case (involving ShareKit) which works better with the old style of signing into Facebook. This “traditional approach” shows the login dialog in a web pop up instead of leaving the app.

In this post I’m sharing the 3 methods how to hack the Facebook class and bend it to our will.

Read more

On the Future of Remote Working

I read an article by Michael Abrash on the Valve blog that he signed up with Valve to investigate Augmented Reality. At the end of his article he mentions that Valve is hiring.

This prompted me to send him the following long email. And as I like for my writing to not go to waste I am posting it here as well.

Read more

Podcast #34 – “Be Excellent And Valuable”

Episode 34, recorded Saturday April 21th, 2012

We can learn about cool company philosophy from the Valve employee handbook, Objective-C is creeping up to C++ as the world’s almost most favorite programming language. And iOS 4 can now  be retired.

Read more

DTCoreText 1.0.1, Linker Flags and Rich Text News

I reported a while ago that I was forced to tag the current state of the DTCoreText master repository as 1.0.0. The reason for this was that CocoaPods was starting to gain lots of momentum and several people wanted to use DTCoreText via a podspec.

You can have podspecs point to the master branch as well, but then you never really know what you get. This can possibly cause many headaches especially in larger projects where you cannot track the state of each individual sub-project.

Therefore it is generally recommended – if not required – to make use of tags in GitHub.

Read more

Podcast #33 – “Rich Texting”

Episode 33, recorded April 14th, 2012

Everybody still waiting for WWDC. My MacBook Air misbehaves and thus I have no show prepared. But Kevin Smith from Dootrix saves us this week from having no show: we chat about Rich Text and the Simpl app which they made.

Read more

Containing ViewControllers

For a project that I am currently working on I needed to implement a custom container view controller. I was feeling my way forward in the dark for the most part because this does not seem to be a widely used technique. Developers – understandably – favor reusing and skinning existing view controllers over creating new containers.

However there are some scenarios where you should prefer to make your own container because it greatly simplifies your code over trying to bend a UINavigationController or UITabBarController to your will. Do you remember the times when those two where the only two containers available?

I distinctly remember using a UINavigationController with hidden nav bar as a view controller to contain multiple full views. And you probably had do do your own view juggling and animations because for the most part the standard transitions would be useless. Fortunately we can no file this as a fond memory of the past and move on to implementing our own containers.

Read more