Author Archives: Karl Monaghan

Invalid IPA: The keychain-access-group in the embedded.mobileprovision and your binary don’t match.

Provisioning profiles are such a delight.  My latest battle with them involved getting the following error:

Invalid IPA: The keychain-access-group in the embedded.mobileprovision and your binary don’t match.

The background to the situation is this: I’d run out of devices on one of my Apple Developer accounts and needed to send out a test build to some new users. So I created a new bundle ID in my second account, re-archived the app and sent it out. The tester came back with the above error when they tried to install it.

The problem lay with me not changing the application-identifier and keychain-access-groups values in the entitlements file. These need to match the new provisioning profile values. The values for these changed because I was using a different developer account. keychain-access-groups is easy to miss as it’s folded when you open the entitlements file in Xcode.

You’ll find the correct values in your provisioning profile as well as in the App IDs page in the iOS Provisioning Portal.

Another error I hit with my second dev account was:

entitlement ‘application-identifier’ has value not permitted by a provisioning profile

This turns out to be caused by signing the IPA with the wrong identity. How did I manage that you ask? I was using my auto archive script and I’d forgotten to change what identity to use when signing. There’s two hours sleep I’ll never get back.

Previously: The executable was signed with invalid entitlements. (0xE8008016)

Broadsheet – Entering the Terrible Twos

Broadsheet is two today so it’s time for my yearly round up*.   All the stats have been pulled from Google Analytics so should be pretty reasonable.  You can read my post about last year’s stats if you want some extra context.

Broad strokes 

First off, some year on year details:

  • Visits up 234% (10,378,376 vs. 3,105,424), with an increase of 142% in unique visitors (2,693,084 vs. 1,112,596)
  • Served up 253% more pages (23,128,367 vs. 6,544,165)
  • 75% of our visitors are repeat viewers

It’s been a year of tremendous (and consistent) growth. The addition of Cloudflare to the server setup has really taken the brunt of the increased traffic. There’s still intermittent issues, but certainly not as common as they were in the previous year.

Traffic is still growing so hopefully next year I’ll be commenting on similar growth – something I wouldn’t have expected last year.

Number One With A Bullet

I love lists (the ‘Top 100 x’ shows Channel 4 used to do were complete catnip for me), so of course I’m going to do a couple of Top Tens.

Top Ten Posts

The Garda/horse pictorial was a thing of absolute beauty. The pictures were submitted by a reader, thrown up and within hours had spread all over the internet. It may be crude and gutter humour but people are a sucker for the humiliation of others – especially when a figure of authority is involved.

The flip side of that though is the interest shown in the tragic story of Kate Fitzgerald. While it would be easy to put it down to morbid curiosity, I do think people were genuinely moved by it and annoyed with how the Irish Times handled the situation.

Recycle, Reduce, Reuse

The reason for all our traffic has been the 11,936 posts with 154,748 comments. In the last year, there’s been a few recycled post titles.

Top Ten Search Terms

Once again, Google is the only search engine worth talking about as Yahoo and Bing only accounted for 2% of visits from search terms.

When it comes to the phrases used, the actual top ten is dominated by people lazily typing in ‘broadsheet’ (or some variant thereof – it’s 7 of the top 10) into a search box so I’ve excluded them to get at the more interesting terms.

  • tallafornia
  • kate fitzgerald
  • niamh horan
  • mario balotelli
  • crackbird
  • yootube
  • jean byrne
  • balotelli
  • axl rose
  • eoin mckeogh

Jean Byrne is the only term from last year, so the list is a reasonable approximation of what people’s obsessions were in the last year.

During the Dundrum Shopping Centre flooding last October, there was a huge spike of incoming searches (jumping from about 6K to 15K). While the number of visits have been building we’ve still to beat this with an average of about 11K visits a day at the moment.

Facebook > Twitter > Reddit > Google+

Facebook continues to be the single biggest referrer outside of searches, maintaining the healthy lead on Twitter with more than twice incoming visits (~2.3 million vs. ~1 million).

Twitter on a rare occasion will send more traffic but that’s usually down to someone like Dara O’Brian retweeting a story (a recent case was the prank call to the TV3 psychic).  What’s nice these days is that the extra traffic tends not to cause the site to lock up.

After the two sharing behemoths, the social referrals drop off very quickly.  Reddit comes in a distant third, providing about 80K visits.

Google+ does practically nothing for the site in comparison to the other social networks – so much so the button was removed to save on the extra Javascript it needs.  It barely even scrapes into the top ten social sources. You can understand why it has been called a network for Google employees and Amazon employees who want to Google employees when you see how little traffic it generates.

The top five referrers were:

  • Facebook
  • Twitter
  • Reddit
  • Boards.ie
  • Google

Browser Battle Royale

Google are claiming Chrome is the most popular browser and it certainly king of the hill for Broadsheet jumping from 3rd to 1st accounting for 30% of visits.  Firefox dropped 6% to 23%, Internet Explorer is down to 19% and Safari stays at 15%. I point blank refuse to talk about Opera.

The IE 6 death match nears the end with only 0.7% of visits from the decrepit browser.  This drop off was helped by the fact that the version of WordPress used doesn’t support it.

Beauty and the Beast

Microsoft might be losing the Browser Wars, it still is the 800 pound gorilla when it comes to what people are running on their machines with 62% of devices running some sort of flavor of Windows. There’s still people using Windows 98! Apple comes in with 20% of devices using some version of OS X.

On the mobile side, iDevices still rule the roost with 11.5% of visitors compared to Android’s 3.7%. I keep on hearing about Android’s supposed dominance of the smart phone market but any time I’ve seen website stats it’s been trailing. Maybe next year but I wouldn’t hold my breath.

One minor thing to note is that the Windows devices include the Windows mobile numbers (albeit in tiny numbers) while the Apple’s doesn’t. I can only assume if there’s a big uptake of Windows Mobile 7 and 8 in the coming year they’ll be separated out.

An oddity that surprised me is that there are the people out there still using OS/2 and SunOS.  I can only assume they’re self-flagellants (or just messing with the user agent field to mess with my head).

And We’re Done

That’s all I’ve to say for another year.  If you’ve any comments or questions, let me know and I’ll try and answer them.

Addendum

Since people have been asking about a geographical break down, the top 10 visitor locations (with number of visits) are:

  • Ireland (7,551,080)
  • United Kingdom (1,117,594)
  • United States (519,110)
  • (not set) (120,021)
  • Australia (118,150)
  • Germany (101,340)
  • Canada (93,057)
  • France (72,971)
  • Netherlands (72,412)
  • Belgium (65,618)

*If you saw this post a month ago it’s because I can’t tell the difference between a 6 and a 7 in a date…

A Sunday Afternoon Project: KMMapList

I’ve been toying with the idea of doing another version of the Pint of Plain app and one of the things I want to change is list of bars you first see when you open the app. During the week I ended up on Dribble and saw a screenshot from an app called Chow Now.
What I liked about this is that the extra detail about the restaurants is present at the bottom where’s there’s more room to breath.  It’s a nice combination of the now traditional map and list views.  I’m guessing that tapping a pin will make the scroll view move and swiping the scroll view highlights the pin.  The details at the bottom are far more detailed than a normal call out and there’s enough room to have the phone number tapable as well as leading to a more detailed view.

Now I’m sure this will be easy to build with [REDACTED] in iOS 6, but I want something I can use now as other wise it’s an idea that would lie rotting in my brain.  I also wanted to play with reusable UIViews built with Interface Builder as a test for a couple of future app ideas.

I’ve a first pass of my code in a repo on GitHub  and I’ll probably be poking at it a bit more over the next few weeks.  For something that I kicked about for a couple of hours today the core of it is there and I’m happy enough with the result.  It’s not as pretty as the example from Dribble, but that was never going to happen with my cack handed design chops.

Functionally there but just not pretty

There’s probably quite a few improvements that could be done to the current code (apart from the obvious hard coding of the data points).  It’d probably be better if the off screen views were generated just in time rather than all at once and I’ve still to figure out how it’ll handle a large number of annotations.  Still, it’s a good proof of concept and worth moving along.  We’ll see how it goes over the next little while.

The Dark Knight Rises

A quick note on spoilers – I have linked to Batman stories which the plot borrows from.  If you want to remain completely spoiler free, don’t click the links.  You have been warned.

So it’s finally here: The Dark Knight Rises – the final part of Christopher Nolan’s Batman trilogy. I will admit I’ve been looking forward to this and I am a huge Batman fan, so my opinion may be biased.

The story itself is a mishmash of new elements as well as liberally borrowing from Knightfall (with the classic scene intact) and No Man’s Land.  It works well and the pace is such that you don’t really feel the 164 minutes it takes to tell.  There’s no lulls and everything has it’s place.  That’s all I say about the plot as to do otherwise would stray into spoiler territory.

The film tended to be all serious business, but there are moments of humour (although I’m sure one of them has been used in a previous film).  They didn’t feel shoe horned in or put in as after thought which is why I thought they worked so well.

There are a serval of large set pieces through the film to remind you firmly that this is an action film and not just some police corruption drama.   Nolan handles these with his usual deft hand and shows you just where all the money spent on the film went.

Christian Bale could have done without his 60 Major a day voice when he has the cowl on but otherwise puts in as good a performance as he always does.  Bane is restored to his proper menace by Tom Hardy (after the terrible version in Batman & Robin from 1997) but had a very odd accent which I still can’t place.  Even with it supposedly re-dubbed, I found him hard to understand at times as he was drowned out by the soundtrack.

Anne Hathaway steals the show from both of them, flipping from meek vulnerability to stoney faced confidence in an instant.  She carried off Catwoman (not Batgirl as an unobservant friend thought) with an air of world weary ease.  The impractical looking costume did have a reason for every part and wasn’t just to show off her bum (although it did that as well).

The geek in me was kept very happy and the more dispassionate adult was entertained so a huge thumbs up from me

Poster by Jock for Mondo

A version of the post also appeared on Broadsheet.ie

Clickable Skin on a Website

I was asked the other day how Broadsheet.ie does the horrible clickable ad skins so I may as well document it here as well. I can’t remember how I exactly figured it all out but I’m sure posts on stackoverflow.com helped as well as looking at the source of the likes of entertainment.ie to see what they did. As always, this works for me and your mileage may vary.

First we set up the css for the background image:

body {
       background-image: url(/images/some_image.jpg);
       background-attachment: fixed;
       background-repeat: no-repeat;
       background-position: center top;
       cursor: pointer;
}

#page {
       cursor: auto;
}

This pins background image to the center of the page so if the user resizes the window it doesn’t move. It does mean that a user may not see it if their browser window is narrower than the background image.

To make the pointer turn into a hand when the user is hovering over it, you need the ‘cursor: pointer;’ line. However this makes the cursor a pointer everywhere, so for the actual content of the page ‘cursor: auto;’ needs to be set so it will use the correct default when hovering over content that is not a hyperlink.

Next we need to capture clicks made on the background. This is done using some JQuery:

function recordOutboundLink(link, category, action) 
{
   _gat._getTrackerByName()._trackEvent(category, action);
   setTimeout('window.open("' + link + '")', 100);
}

jQuery(document).ready(function() {
       jQuery("body").click(function(e) {
               var target = jQuery(e.target);
               if (target.attr('id') == 'body_id')
               {
                       recordOutboundLink('http://www.karlmonaghan.com','outbound', 'karlmonaghan')
               }
       });
});

Last, but not least, we need to change the body tag:

<body id="body_id">

What the javascript in the document ready block does is capture click on the page. The id of the element clicked on is retrieved and if it was the id we’ve assigned to the body itself we call the recordOutboundLink function. This function takes 3 parameters – the URL the user should be brought to, the event category and event action. We use this function so we can record the click in Google Analytics for our own information. If you’re not interesting in the stats (but really, you should be) you can replace this line with a just a document.open call.

Personally I’m neither fond of this sort of advertising nor convienced that it’s particularly effective (although it will very effectively annoy your users) but if someone is willing to hand over a ball of money for it so be it.

Auto-Versioning and Auto-uploading to TestFlight/HockeyApp When Archiving in Xcode

I’ve been playing with TestFlight this week with some of my apps.  The main aim of my experimentation was to have the version numbers of my apps incremented and the IPA automatically uploaded when I archive a project.

There’s a lot of posts already on various parts of the process, but I’d thought I’d document the whole process I went through as there were a few tweaks to be made on the snippets of code I found.

I’ve projects both in local SVN repos and on GitHub so I need to be able to create version numbers from both. Another wrinkle is that I sometimes use HockeyApp as well, so I decided I may as well be prepared for those occasions and include it in the script.

The first step was to increment the version number. A post from Stackoverflow gave me the starting point and with a few minor tweaks I ended up with this:

This script needs to be run before Xcode does a build. To do this, it should be added as a ‘Pre-action’ to the build function. Edit you scheme, click the down arrow beside ‘Build’, select ‘Pre-actions’ and then on the + at the bottom left of the box on the right. You’ll be given two options and you’ll want to select ‘New Run Script Action’.  Select your target in the drop down beside ‘Provide build settings from’ and paste the script from above into the box below that.

Now when you archive your project the Bundle Version will be updated.

For git, we just adjust the REV line:

We could have used something like ‘git describe –dirty’ here instead, which would produce something like 1.2.1-1-ge03a85c-dirty as the version number. But when you submit the app to Apple if the version number isn’t all digits your app will fail validation so you’ll have to manually change it beforehand. Since this is something I’m prone to forget so I’d rather just have the digits.

After the version number has been updated, Xcode creates the archive and then we need to create the IPA upload it.  This is done by adding a script to the ‘Post-actions’ of the ‘Archive’ action.

Justin Miller’s post ‘Automating Development Uploads to TestFlight from Xcode‘ got me most of the way creating and uploading the IPA to TestFlight. There’s been a few forks of the original gist, and I ended up extending one by c0diq to include uploading to HockeyApp. I also added a couple of extra flags to make the script less chatty when you know you want to upload the IPA on archive and when you know the code signing identity to always use.

Something to note is that HockeyApp is less tolerant of duplicate bundle versions than TestFlight so if you’ve not made any commits since the previous version, the upload will fail. You’ll be able to see the error returned by HockeyApp in the error dialog and more details in the log.

That’s pretty much it. It seems to be working fine at the moment but I’m sure I’ll end up with a few more refinements as time goes on.

For the day that’s in it

I never got around to doing a post on this when I actually finished and what more appropriate day than today to share it?

This was done over a period of 6 weeks, spending an hour here and there on it.  I ended up with nearly 500 images which I imported into iMovie to create the video.

The setup was simple – my Nikon D40 on a tripod over the table and shots taken using a remote.  I had big plans (as you can tell from the start) for being adventurous with the pieces – having them dance around the place and all that, but I got a bit bored after a while and felt it was taking too long.

It wasn’t until I put it all together that I realised that the lighting in the room changes so much over the few weeks I did it.  If I were to do one again, I would try and block off more time to do it over a day or two as well as having a few more lamps around.

All said though, an enjoyable little project that kept me amused in the evenings.

GAA Scoreboard from DubMatchTracker

After a ridiculously long gestation, the latest app I’ve developed is available on the Apple App Store – GAA Scoreboard from DubMatchTracker.  As the name suggests, this app lets you track the score of a GAA match and tweet the current score.

Way back at the end of May 2011, a GAA obsessed friend of mine Ronan Gahan (one of the guys behind DubMatchTracker) approached me about developing an iPhone app so he could quickly tweet out the score of match. After a couple of to-ing and fro-ing emails, I told him it wouldn’t take long and I’d have time in a few weeks.

Roll on 6 months later and I finally had some time and threw together a prototype. Ronan and the DubMatchTracker lads field tested this over a couple of weekends. David Whelan in particular was a monster of a tester for us.

The first prototype

The first version started the user off in landscape mode and had tapable scoreboards. While I thought this was a great idea, no one realised the scoreboards were tapable. Using the app in portrait mode required two hands which proved awkward, especially in cold weather.

The final product

Armed with the feedback (and a request to use the Dublin colours), I rejigged it to work in portrait mode.   The tapable scoreboard was ditched and replaced with a simple LED font.  A few more weekend test runs shook out all the inevitable bugs and it was finally ready for the App Store.

One of the interesting parts of this app for me is that I’ve included the Heatma.ps library to track user interaction with the scoreboard screen.  The library was trival to add and gave back results pretty much instantly.

Heatmap of the scoreboard

At the moment, the preview button is getting a lot more love that the quick tweet but that’s because of working around issues during the field test.

I’d love to hear any feedback and comments people have about the app.

Not quite the Wild West

For the last week or so, the rather tiresome old versus new media has resurfaced.  It all kicked off with the proposed public broadcast charge and the with Alan Crosbie’s speech which devolved into luddite complaining about new media destroying civil society.  It continued with on-message articles in two of the Sundays.

First off, we have a column in today’s Irish Mail on Sunday where John Waters rants and raves about the lack of accountability on the internet.

Waters seems to be under a misapprehension that the internet is not covered by the current Defamation Act. Both he and the Independent seem to think that Minister Pat Rabitte’s recent speech on media diversity is looking to change the law to do this. What he actually is proposing is to bring parts of the Irish online media under the Press Council of Ireland which could actually afford a small amount of protection against vexatious litigation.

His annoyance with the internet seems to be around his Wikipedia page and a charge of hypocrisy (it also could be over a joke about his losing Eurovision entry).  He doesn’t go into detail what advice he exactly got but I’ll let David Cochrane of Politics.ie address his conclusion about dealing with being libeled on the internet:

What’s more likely is that he was told he’d have to sue Wikipedia in the U.S. and he’d just be wasting his money.  If the existing law didn’t cover the internet, then Broadsheet.ie wouldn’t have gotten double digit worth of legal threats in the last 18 months, MCD wouldn’t have tried to sue Boards.ie, and a €100K judgement wouldn’t have been made against a blogger.

He then goes on to talk about the shutdown of www.rate-your-solicitor.com. Fergal Crehan sums it up beautifully:

It is possibly the fact that it was an Irish owned site than meant the site owners could be brought before an Irish court but that’s far too obvious for Waters to see.

Then there is an opinion piece in the Sunday Independent by Eamon Delaney.  He covers much of the same ground as Water’s column – both mention Alan Crosbie and his speech, Pat Rabitte’s speech, Ruairi Quinn calling the internet “a playground for anonymous backstabbers” and those on Politics.ie as typical examples of internet commentators.

It concludes with the same assertion that the internet is not covered by the current laws governing libel.  Where this misapprehension stems from is not clear – either a lack of understanding of the law or a willful misinterpretation would be my guesses.

It’s all very tiresome to see the same ill-informed calls for regulation by people who obviously have little understanding of the internet, its mechanics and how it is currently regulated.

Where the law does need to be changed is to differentiate between content a site might create and that generated by users.  At the moment, a site is responsible for any comments left by a user rather than the user themselves.  While a site should respond to legitimate complaints about this user content, it should not be ultimately held responsible.

Still John Waters has to be given credit for the phrase ‘underpants commentariat’.

Edit:

Oh god my eyes:

Anything the Americans can do, we can do better – the Irish SOPA

Last week there was an online protest over a piece of American legislation called the Stop Online Piracy Act (SOPA).  It’s a particularly draconian piece of legislation and it’s been thankfully shelved.  Broadsheet.ie also took part in the blackout.  A lot of people thought this was just bandwagoning, but there was actually an Irish slant.

Due to pressure from the music industry, Sean Sherlock, Minister of State for Research and Innovation, will be signing a statutory instrument which will bring in an Irish equivalent of SOPA.  TJ McIntyre has an excellent FAQ on why this is really bad and isn’t just something that a few internet nerds are getting riled up about.

I’m not hugely politically, but this is something that won’t just disappear of its own accord.  I encourage anyone who has an interest in not being put under the kosh by vindictive music corporations contact Sean Sherlock (via his website or at sean.sherlock@oireachtas.ie) as I have and register you displeasure.  You could also email your local TD.  there is a full list of email address available on www.oireachtas.ie.

If you do contact any TDs about this, please be polite and not a rabid internet monkey.  That never does anyone any good.  I’ve included what I sent as an example.

Dear Mr. Sherlock,

I wish to register my disappointment as a life long labour voter at
the implementation of a biased, poorly thought out and harmful piece
of legislation via a statutory instrument which would allow Irish
courts to block access to websites accused of infringing copyright.

This will do nothing to prevent piracy and everything to stifle the
internet and all the business that go along with it – especially ones
the music industry finds particularly disruptive.

Have you consulted anyone at all from the Irish (or international)
technology industry about this? Has it been explained to you how easy
this sort of thing is to circumvent? How the media industry has used
similar laws in the US as blunt instruments to silence critics?

What protections will be put in place to stop vexatious takedown
attempts? What compensation will unjustly accused and shut down sites
receive? What is the level of proof that will be required?

It’s an utter disgrace that a Minister of State for Research and
Innovation will be ruining the best chance this country has for
building its economy back up again. The government talks enough about
the knowledge economy – maybe it should take heed from those who
actually understand the internet and its working than protectionist,
luddite, control freak corporations.

Mr McIntyre lays out exactly what is wrong with the law as proposed in
a recent blog post:

http://www.tjmcintyre.com/2012/01/irelands-sopa-faq.html

Yours sincerely,

Update 12/3/2012:
A canned response from Seán Sherlock hit my inbox a few minutes ago:

A Chara,

I would like to update you regarding the enactment of the European Union (Copyright and Related Rights) Regulations 2012.

I fully acknowledge the concerns that have been expressed by you regarding the introduction of the European Union (Copyright and Related Rights) Regulations 2012 which were signed into law on 29th February, 2012. I wish to re-emphasise that it has been necessary to introduce this legislative measure to restate the position that was thought to exist in the Copyright and Related Rights Act, 2000 regarding injunctions against intermediaries prior to the High Court Judgement of Justice Charleton in the case of EMI & others –v- UPC and to ensure that Ireland is compliant with our obligations under EU law.

I am satisfied that the High Court now has significant guidance in the implementation of this legislative measure arising from the underpinning EU Directives, as interpreted by the recent Court of Justice of the European Union case law, to ensure that any remedy provided will uphold the following principles:

• Freedom to conduct a business enjoyed by operators such as ISPs;
• The absolute requirement that an ISP cannot be required to carry out general monitoring on the information it carries on its network;
• Any measures must be fair and proportionate and not be unnecessarily complicated or costly;
• The fundamental rights of an ISPs’ customers must be respected, namely their right to protection of their personal data and their freedom to receive or impart information.

I am determined to ensure that Ireland will be a premier location where innovation can flourish and where innovation is facilitated by our copyright laws and data protection regime. In this regard, I am committed to reviewing and updating the Copyright legislation currently in place in order to strike the right balance between encouraging innovation and protecting creativity.

In this context, I am particularly anxious that the Consultation Paper of the Copyright Review Committee, which was launched on 29th February, 2012, is carefully studied by all interested parties to stimulate a constructive and well informed debate on these issues. This is a wide-ranging Consultation Paper which examines the current copyright legislative framework to identify any areas of the legislation that might be deemed to create barriers to innovation. The Consultation Paper is available to download at the following link: http://www.djei.ie/science/ipr/crc_statement.htm.

I would like to encourage the deepest engagement by all interested parties in the consultation process which has been launched in order to stimulate a constructive and well informed debate on all of the issues raised in this rapidly evolving area.

I am confident that the work being carried out by the Copyright Review Committee together with the interaction and input of all of the interested parties will result in establishing Irish copyright law on a firm footing to encourage innovation, foster creativity and meet the challenges of the future with confidence.

Yours sincerely,

Seán Sherlock TD
Minister for Research and Innovation