10 Jan 15
19:06

Xcode: Semi-stale libraries and the simulator

xcode plays dirty when updating .a

xcode plays dirty when updating .a

Edit: (2/8/2014) As usual, I’m an idiot – this problem was caused by having explicit linker library search path flags (e.g. -LTo/My/Old/AdMobDir) that took precedence over the new libs I added. It didn’t matter that I removed the old ones from the Xcode and git, because they were (oddly) specifying an external directory that had a copy of the same libs. I’ll leave this post up to remind myself about this, at the expense of my credibility.

Today it is my birthday, so I thought how fun it would be to update AdMob for an iOS app. Since it’s just .a and .h files, it would be doable in under a minute. But after updating, I still got the message:

2015-01-10 20:40:24.194 Noise[13472:10630180] You are currently using version 6.5.1 of the SDK, which doesn’t officially support iOS 8. Please consider updating your SDK to the most recent sdk version, 6.12.2, to get iOS 8 support, including a fix for smart banner rendering in landscape mode. The latest SDK can be downloaded from http://goo.gl/iGzfsP. A full list of release notes is available at https://developers.google.com/mobile-ads-sdk/docs/admob/ios/rel-notes.

I did rebuilds after each of these steps: clean, deleted the old libGoogleAdMobAds.a of the same name from my source control, removed libGoogleAdMobAds.a from link phase (error’d as expected), re-added it, all to no avail – the simulator build was still showing the same message.

Then I remembered deleting the app from the simulator has historically fixed certain issues (stale app icon/xibs/etc), so I tried that. Worked like a charm.

I think I’ve seen this issue before – but the only way I knew that stale libs were the cause of it was because of the log message. Since upgrading a library usually will support the same old symbols, there generally won’t be a linker error – so this could potentially waste important debugging time with the programmer incorrectly believing he is debugging the newest version of the lib.

I hope and believe that the issue is just in the transfer of the project and ‘overly-clever’ optimization of transferring the app to the simulator that missed a diff case, because the deleting trick worked. Perhaps the transfer diffs only non-linked code – although, I would expect it to include statically linked stuff and only have this issue for dynamic linkage. This took around 15 minutes of messing around to figure out, but it seems like something that could bite back in the future.

Update: I tried this same project on another mac and my iPhone and found that the deprecated message was still there, just deferred, so this post may not be a correct solution. It’s possible that the message itself is bad, but I’m not sure yet. To check my sanity, I did these steps: git fetch/merge to update to the new admob libs (while the project was closed). The problem was different here – it persisted even after cleaning/rebuilding and deleting the app from the device. I restarted Xcode on a hunch, and also tried nuking the derived data folder.

05 Jan 15
22:30

2014 projects

my barebones background app

my background noise app

It’s been a while since I posted an actual project I’m working on. Since I started working full time for Apportable, I’ll admit there is less time to work on projects, but that’s really no excuse. In addition, as the new year merits such reflection, I’ve been thinking about why I didn’t ship anything last year.

Then I realized, I *technically* shiped something. I shipped my children’s note teaching app (that was already on iOS) on google play using the Apportable framework. Apportable lets you compile your objective-C iOS project to android and run natively. I thought it was lies and insane when I first heard about it; now I can confirm that it is simply black magic. Anyway, I’m usually working on other company’s apps, and improving the Apportable platform where it is is not perfect, so this was a nice way to hit two birds with one stone.

I also started on a binaural beats app, and got a quick prototype, but it didn’t seem as useful or original enough to publish without specific controls, so I’m still working on that. Instead, I put my efforts into a ‘background noise’ app. I started on this because I wanted to be able to drown out the sounds of the 580 and BART that my midcentury apartment building windows are not rude enough to prevent passage into my bedroom. It’s made me remember how much I love the sample synthesis for-loop in an audio callback. (I want to post more on various synthesis techniques in the future). So far the app only has three background noises – rain, waves, and crossfaded white noise. To stay productive, I might just release it as such and develop further as my interest stays with it. To the right is a screenshot of the minimal gl/coregraphics based rendering to accompany the background noise. I’ll try and do a live coding screencast just to get some of it on the screen again.

With the full time job, I can work on all those financially-worthless-but-fun ideas that are musing around in my head that were out of the question when I was doing the solo contract-dev shop. Just to be clear, I am posting this so that I will feel embarrassed if I don’t take advantage of that freedom when I come back and check on this blog.