Isaac Overacker

maker of things

The Death of FlightPath and the Future of iOS Usage Statistics

As a longtime user of TestFlight for both test build distribution and usage analytics, I was extremely disappointed to find that they have cancelled their FlightPath beta program for tracking usage statistics in your live app once distributed via the App Store. It was great to be able to reuse the same checkpoint infrastructure to collect usage statistics. Alas, they claim to be focusing more on their core product, which might be a good thing in the end.

As a replacement, I have started working with Flurry, which provides a great deal of usage statistics, including an event infrastructure similar to TestFlight’s checkpoint system.

Make sure to sign up for a free account and copy your application key. Let’s get started!

Renaming an App on the App Store

Renaming an app on the iOS app store is a relatively simple thing to do. The biggest point of confusion is that you cannot rename your app unless it is in an editable state. You’re probably going to want to change the display name for your app, so the easiest way to put your app in an editable state is to upload a new binary.

Bundle Identifier

If you want to rename your Xcode project to reflect the new app name, you won’t want your bundle identifier to change along with the project name since this is the unique identifier for your app on the device. By default, the bundle identifier includes ${PRODUCT_NAME} or a variant thereof, e.g. ${PRODUCT_NAME:rfc1034identifier}. You won’t want the Bundle Identifier to change when you rename your project, so the first thing you’ll want to do is copy your Bundle Identifier from iTunes Connect and paste that in the Bundle Identifier field in the info.plist file for your app.

Rename Project

The fastest (and most thorough) way to rename your app is to simply rename the project in Xcode. Slowly double-click on the project file in Xcode so that the name becomes editable and change the name. After pressing enter, a dialog will pop up asking if you’d like to rename project content items. You probably want to keep all of these in sync, so choose Rename.

Upload Binary

Login to iTunes Connect and create a new version of your app. When you edit the metadata for the new version of your app, you can now edit the name of the app. Enter the new name for your app, create your new binary, and upload. If you make it through the review process, your app will be ready to launch under a new name! As long as you don’t change the Bundle Identifier, existing users will receive the update.

Embedding Video With the Mnml Theme

I released a small update to the mnml Octopress theme recently to resolve an issue experienced by one of the users of mnml. Cole Nordin opened an issue on GitHub which captures a common issue when embedding videos in posts wherein the video will not be resized with the window and therefore does not fit within the bounds of the screen on certain mobile devices.

To address this, I added CSS from the octopress-responsive-video-embed plugin to the theme. (Unfortunately, I couldn’t find a way to embed the plugin in the theme, so if you know of a way to do that please post in the comments below.) When you need to embed a video, you can do it one of two ways.

Use the embed-video-container div

You can take advantage of the CSS directly if you don’t want to mess with plugins. Simpily wrap your embed code in the embed-video-container div like this:

1
2
3
<div class="embed-video-container">
    <iframe width="1600" height="1200" src="//www.youtube.com/embed/_QP5X6fcukM" frameborder="0" allowfullscreen></iframe>
</div>

Or, if you’d like a markdown-friendly approach…

Install the octopress-responsive-video-embed plugin

Copy youtube.rb from the octopress-responsive-video-embed plugin to your /plugins directory. When you want to embed a youtube video, use the following markdown:

1
{% youtube _QP5X6fcukM %}

Replace the video id with the video id you’d like to post, of course. (Make sure not to confuse this with the video plugin included with Octopress, which is used to embed mp4 files.)

Managing Project Dependencies in Xcode: An Introduction to CocoaPods

The open-source community for iOS is amazing. There are so many high-quality, incredibly useful open-source projects out there now that it would be crazy to work on an iOS project without bringing in at least a few open-source projects. However, manually managing each of the libraries that you bring in can be tedious at best. Most of them are hosted on GitHub, which has improved a lot in the last few years to streamline the process. With GitHub for Mac, it’s easy to quickly clone a project straight from your browser, but you still have to move the appropriate files into your Xcode project. And then you have to do it all again when the project is updated and you want to take advantage of the latest release.

It doesn’t have to be this way.

Octopress Themes: Opening Links in a New Window

I just rolled out a change to the mnml theme to cause links to be opened in a new window. If you’re looking to do the same thing for your Octopress theme, it requires a simple change to the /source/javascripts/octopress.js file. Open that file and add the following to the $(document).ready() function:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
$(document).ready(function(){
    // You probably already have some code here.
    // Just add this to the end of the function.
    $('a').each(function() {
        var a = new RegExp('/' + window.location.host + '/');
        if(!a.test(this.href)) {
            $(this).click(function(event) {
                event.preventDefault();
                event.stopPropagation();
                window.open(this.href, '_blank');
            });
        }
    });
});

You could also do this in any web app that uses jQuery, of course.

(Hat-tip to Adri Kodde for posting a snippet about this.)