Integrate Unity 5 in a native iOS app with Xcode 7

Integrate Unity 5 in a native iOS app

A few months back I published a blog post about how to integrate Unity3D within a native iOS application.  This tutorial was written for Xcode 6 & Unity 4 and in the comments there were a lot of requests for a new tutorial.

Tonight I found the time to make the video tutorial on how to integrate Unity 5 in a native iOS app with Xcode 7, so I hope you enjoy it!

Continue reading Integrate Unity 5 in a native iOS app with Xcode 7

A better way to integrate Unity3D within a native iOS app

Update: I’ve created a new tutorial for Xcode 7 & Unity 5.

Last year I published a blog post about how to integrate Unity3D within a native iOS application.

Last week I found a better way to integrate Unity3D within a native iOS app, which also eliminates some issues with my previous version.  Because it’s quite a long explanation to do and I noticed in my previous blog post that not everything was crystal clear, I’ve made a video tutorial how you can achieve this.

Continue reading A better way to integrate Unity3D within a native iOS app

Dynamically load Collada files in SceneKit at runtime

The problem

For an upcoming project, a client asked me if I could build a prototype which could load Collada files at runtime.  The flow has to be like this

  • User downloads Collada zip file while using the app (e.g. in-app purchase)
  • Collada file gets unzipped
  • Show the downloaded Collada file in the app

I started looking a possible 3D engines which I could use like Unity, but then I remembered Apple has released the SceneKit SDK which allows pretty high-level access, but with excellent performance.

Continue reading Dynamically load Collada files in SceneKit at runtime

Add Unity3D in a native iOS application

I HAVE CREATED A NEW WAY TO INTEGRATE UNITY WITHIN AN EXISTING IOS APP. YOU CAN FIND THE POST HERE.

The problem

For a project I need to implement an augmented reality feature inside a native iOS application.  We chose to go with Unity3D and Vuforia to do the augmented reality bit, as it’s free and lots of people are saying it’s the best solution. The only problem when working with Unity3D is that the exported iOS project is not easy to implement in an existing project as we only need Unity3D for 2 views inside a project with some dozen other native UIViews. Continue reading Add Unity3D in a native iOS application

National Geographic UIKit Animation transition demo

This afternoon Thomas Degry (one of my students, www.devine.be) asked how he could program the neat little effect they use in the National Parks iPad app made for National Geographic. If you want to see the effect yourself, I suggest you download the app to check it out. Just select one of the parcs and then tap on the stats or the weather button. You’ll see a nice transition in which the master view ‘steps’ into the background, while the new content is placed in front of it.

It took me a few minutes of tapping to see how the animation works, so here is how you can mimic the effect. Just play with CALayers and some transformations 🙂

Continue reading National Geographic UIKit Animation transition demo

Enumerate fonts on your iOS device

When you work with custom fonts in your iOS projects, you’ll need to find out the correct name for your font.

You can do this by looping though all the font families and then use the font family name to loop through all the fonts that belong to the family.

The following function will take care of this and return you a nice list ordered per font family.

- (void)enumerateFonts {
    NSLog(@"--Start enumerating font--");
    for (NSString *fontFamilyStrings in [UIFont familyNames]) {
        NSLog(@"Font family: %@", fontFamilyStrings);

        for (NSString *fontStrings in [UIFont fontNamesForFamilyName:fontFamilyStrings]) {
            NSLog(@"-- Font: %@", fontStrings);
        }
    }
    NSLog(@"--End enumerating font--");
}

I’ve also created a gist on github You can find it right here.

Debug IOS applications with Charles Web Proxy

When you are doing (naughty) stuff with the Internet, Charles Web Proxy is probably the most valuable thing a developer could have!

Normally I just use Firebug’s Net panel to see what my request/responses are, but since I’ve discovered Charles it took debugging and inspection to a whole new level. Especially now I can hook it up to inspect the traffic sent to and from my iPhone. Continue reading Debug IOS applications with Charles Web Proxy

Archiving your iPhone app and icon dimensions don’t meet the size requirements

I’ve just archived an update for iCapital and I stumbled upon a weird warning.

It said the following

icon dimensions (0 x 0) don’t meet the size requirements.  The icon file must be 57×57 pixels, in .png format

I double checked my build settings and my app icons had the right dimensions.  When I searched for the warning on Google, there were a lot of other people who also had the issue since they updated to XCode 4.2 and OSX 10.7.3.

Luckily it’s really easy to fix the issue. You just need to set ‘Compress PNG files’ to NO in your Build Settings and re-archive your app!

Forms with UITableview in IOS

When you’re developing IOS apps you often need user input to receive some data.

You have the following options to get the data from a user:

  • Poorly designed form on a rather ugly white background
A rather ugly form
A rather ugly form
  • Use Storyboard to get static UITableviews in which you can easily create a nice form
A form by using static UITableview
A better looking form by using static UITableview

Continue reading Forms with UITableview in IOS