Cisco VPN uninstall on OS X

I don’t know for certain that the Cisco VPN Client has been responsible for all of my networking weirdness of late, but I do know that it was constantly writing messages to the console — even when I’m not using it.

I no longer need it and don’t want it — so here’s how to get rid of it:

sudo /usr/local/bin/vpn_uninstall

Simple, huh?

FiveStars

FiveStars

I had some spare time earlier this week and took the opportunity to get to know Core Graphics.  Its been a real treat as CG offers a lot of power but it takes some getting used to.

I’d been thinking for some time that a star rating widget for iPhone apps might be useful — so that became the target implementation of my CG journey.  At right is the FiveStar widget in action.  What you can’t tell from the image is that using the slider will change the value and display of the widget.  Using the slider allows the user to select fractional stars.

The user can also use a finger swipe to change the displayed value — in this mode, only whole stars can be ’selected’.

I set out to create this widget without the use of any image files — for a couple reasons:

  • I wanted to be able to add other ’shapes’ without having to create new graphics in PS everytime I wanted a new “shape” to use for my stars (i.e. circles, squares, palm trees)
  • I wanted to see if CG was fast enough to do the job (I’m not sure what that exactly means other than “doesn’t interfere with a pleasant user experience”)
  • I wanted to have the ability to display ‘fractional’ stars — using an image based solution might have required that I create several fractional images.

Initially, I had set out to only display stars either filled with one of two solid colors — one to represent a ‘used’ star and the other to represent an ‘unused’ star.  That is, if the widget were to be displaying a rating of three stars, I wanted to see the first three (from left to right) filled with one color and the remaining two filled with another color.

This turns out not to be terribly difficult in CG — simply draw a path in a graphics context and then stroke and fill the path.  Once you have a stroked and filled path, you create a CGImageRef from your context and from the CGImageRef you can create the familiar UIImage. (I should note that while drawing paths is simple in CG, generating the path my not be as easy — I had to reach way back into high school geometry to come up with a nifty algorithm to create my star path.

Creating fractional stars turns out to not be too difficult either — I simply created a filled star, clipped it with a rectangle of the appropriate size to capture the desired “fraction” of the star and then overlayed that clipped image onto the image of an unfilled star.

Once I (kind of) had the hang of that, I ventured into creating reflections.  I got a huge head start on this part by examining the code in Apple’s TheElements sample project.  The net of creating the effect is to invert the image to be reflected, clip the part of the image to show in the reflection and then apply a gradient (gray scale only!).

Finally, I ventured into creating a colored gradient for the stars — turns out to be pretty straight forward as well.  Using the original path for the star to clip the CGContext and then apply a gradient to the context.  The gradient will only appear in the clipped portion of the context.  Next, add the path back in and stroke it (don’t fill it — you’ll lose the gradient!)

I packaged the whole FiveStars widget up into a static library so that I can drop it into various projects.  The project I’ve linked to below was used to create the screenshot above. Note that there are two different instantiations of the widget — the large one uses a gradient fill and has a reflection.  The instantiation used in the table is a simple fill with no gradient and no reflection — and there is no user interaction in the table — they are ‘read only’.

Here’s a quick video of a FiveStars demo to give you a better idea of what’s going on, and what the widget can do.

I’d love to hear your thoughts, please leave a comment!

Windbuoy 2.0 Available Now in the AppStore

It’s been a long time coming, but the Windbuoy app has been updated.  Many user suggestions and features now possible with the latest SDK have been incorprated into the app.  Some of the new features include

  • Maps!  View and search for buoys on a map.  Search by ZIP, Buoy ID or location and see the results in a list or on a map
  • When searching by location, you can drag the location pin around on the map and search again.  No ZIP code 50 miles off Key West?  Don’t remember the ID of that station?  No problem.  Start a location search and recenter the location and touch the ‘Search’ button on the location annotation.
  • Historical Data — When viewing a station in portrait mode, turn your iPhone sideways to see the most recent readings and the trends.

Windbuoy 2.0 is available in the iTunes AppStore

Pazzi Launched! (also, promo codes)

Pazzi has been approved and is now available in the App Store. Pazzi is a great little tile game that challenges you to tip (or push) the tiles into groups of two or more and move them off the edge of the board. Addictively simple.

Here are a few promo codes free to first ones here.  (Please, one per reader).  If you miss out and really, really need to have a promo code, leave a comment or drop me a line and plead your case ;-)

XRNRY66L4FPT
W9XJTTTAKTR3
KK4X49EXX66P
FF36M9TK3MTL
X6PT4KNRHWX9

Look Ma! No Scrollbars!

I’ve been refreshing the Windbuoy app to make the UI just a bit more of a familiar user expeirence with respect to iPhone app standards. If you aren’t familiar with the Windbuoy app, it retrieves wind and weather info for NOAA buoys. Each buoy’s info is presented one at a time on a single UIView. The user “moves” from buoy to buoy by swiping across the UIView. The UIView does not slide off screen with a new one sliding in. Instead the info on the UIView is just updated; albeit with some animated alpha values. It works. But its not very pretty.

So I recently started down the path to make each buoy appear on a new (or recycled) UIView and as the user swipes across the UI, a new buoy UIView slides in as the old one slides out. Nifty. Sort of. I implemented this behavior using the advice found on the interwebs: “implement using a scroll view”. So I did.  In the end, it worked and looks pretty good, but I felt like it could be better.

Read the rest of this entry »

App Localization & Internatinalization

Wil Shipley has written a post on app localization and internationalization — and the pitfalls assoicated with each. A very good read. Also, free code to get it done.

Upgrading iPhone Apps

The Tweetie 2 upgrade discussion has me thinking about how I’m going to handle the next rev of the Windbuoy application.  (btw — a decent interview of  Loren Brichter — Tweeite dev –  by PatrickJ seems to have brought this mostly to conclusion — we still have to see how the App Store market reacts) .  While I’m not a full time app developer, I’m tending to lean that way and this issue has been one that has given me great pause.

For app development to be a sustainable endeavor, developing apps has got to provide an income stream.  I don’t believe its fair to app users to release an app and never make any upgrades.  On the other hand, the App Store doesn’t currently offer any great incentive to keep apps upgraded — upgrades are free.

Which brings me to Windbuoy. Windbuoy has been humming along and although there have been negative reviews from primarily from folks that don’t understand where the data comes from, it’s been largely successful in a small niche kinda way.  It does have a few shortcomings that I’d like to make changes to, but there’s just not much incentive to do so.

Now that Pazzi has been submitted for review, I’ve started thinking about some of the things that I’d like to change for Windbuoy — I’ve received a few ideas from users and with the release of the 3.0 SDK, there are other interesting features that can be integrated as well (e.g. Maps).  Looking at the code behind it, I find that there is a *lot* that I’d like to change about Windbuoy. :-)   So it looks like its going to be a big rewrite for Windbuoy.

Read the rest of this entry »

Ogori Charity

This post, this tweet and a follow-up with @rosemarybayer saying that the non-profit market is about $600B (annual revenue) have me thinking that there might be an iPhone app in there somewhere . . .

Dressing up your iTunes affiliate links: Part II

In yesterday’s post, I showed you how you can dress up and shorten your iTunes affiliate links.  If you followed all of the steps and uploaded your itunes.php file to your web server, you can now use an affiliate link that looks like this:


http://yourdomain.com/itunes.php?app=309342010

instead of this:


http://click.linksynergy.com/fs-bin/stat?id=0123456789&offerid=146261&type=3&subid=0&tmpid=1826&RD_PARM1=http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=309342010&mt=8&partnerId=30";

I like that the new link is shorter and less mysterious.  Its less likely to raise concern with a web wary user and is a bit more self contained.  But it could be better.  In this post, I will show you how you can use a flat link like http://cluebucket.com/AppStore/Windbuoy as your affiliate link.

Read the rest of this entry »

Dressing up your iTunes affiliate links

In a previous (very long) post, I showed you how to become and iTunes affiliate and reap an additional 5% on your iPhone app revenues.

In this post, I’d like to show you how to dress up your affiliate links so that they aren’t quite as cumbersome and look a little nicer. I like to do this for my affiliate links for a couple reasons. First, long URLs make for greater opportunity to screw things up when I’m adding them to my web pages. Second, they are impossible for your users/readers/viewers to remember. Third, to the alert web surfer they can tend to look unusual (at best) or cause suspicion (at worst).

To implement the stuff that I’m about to show you, you’ll need access to a web server and ability to serve PHP pages.

Read the rest of this entry »