Update about ‘Error from Debugger: Unknown packet reply: “timeout” to environment packet.’ from Xcode

June 20th, 2009

I previously posted about an error I was seeing in the Xcode console when trying to run an application I was working building on an actual iPhone. I believe I have figured out what was causing the problem, if not at least I’ve managed to make it stop happening so I can go back to testing on a real device now.

It seems that the problem had something to do with a ‘#’ in either ‘#AppName_Prefix.pch’ or ‘#AppName.xcodeproj’. I renamed the Prefix header and the xcodeproject file and updated the project to reflect the new name of the prefix header then a build -> clean and voilà everything seems to be working again.

opensim – Easy access to iPhone Simulator Applications

June 11th, 2009

I’ve been doing some development for the iPhone lately and came across a post by Craig Hockenberry where he give out a nice little bash script to make working with the iPhone simulator easier.

I’ve been using that script for a few months now and have added alot to it and think I should give back. I’ve packaged it up with a nice readme, posted it up on github and released it under the GPL.

Usage:

usage: /Users/trcjr/bin/opensim [ <app_name> | updateLinks <link_dir> [ Preferences | Documents | <cmd> <file> ]
ex: /Users/trcjr/bin/opensim updateLinks ~/iPhoneSimulatorApps
Creats symlinks for all installed apps in ~/iPhoneSimulatorApps
Note: <link_dir> must already exist.
ex: /Users/trcjr/bin/opensim SomeApp Preferences
Opens the Preferences folder
ex: /Users/trcjr/bin/opensim SomeApp Documents
Opens the Documents folder
ex: /Users/trcjr/bin/opensim SomeApp sqlite3 some_sqlite_database.sqlite
Opens runs sqlite3 with the full path to some_sqlite_database.sqlite as its first arguement

The README:

Opensim is a shell script that makes accessing applications on the iPhone
simulator a breeze.

Based on opensim by Craig Hockenberry
http://furbo.org/2009/03/03/open-sesame/

Examples.

opensim SomeApp Preferences
Opens the Preferences folder for SomeApp.
( ~/Library/Application Support/iPhone Simulator/User/Applications/<GUID>/SomeApp.app/Preferences )

opensim SomeApp Documents
Opens the Documents folder for SomeApp
( ~/Library/Application Support/iPhone Simulator/User/Applications/<GUID>/SomeApp.app/Documents )

opensim SomeApp sqlite3 some_sqlite_database.sqlite
Opens runs sqlite3 with the full path to some_sqlite_database.sqlite as its
first argument.
( sqlite3 ~/Library/Application Support/iPhone
Simulator/User/Applications/<GUID>/SomeApp.app/Documents/some_sqlite_database.sqlite )

Note:
If you have more than one file with the same name in two different
directories, ie db.sqlite in Documents/ and db.sqlite in SomeApp.app/
you would need to specify it by doing something like:
opensim SomeApp sqlite3 app/db.sqlite
This would open SomeApp.app/db.sqlite
opensim SomeApp sqlite3 Documents/db.sqlite
This would open SomeApp.app/Documents/db.sqlite

opensim updateLinks ~/iPhoneSimulatorApps
Creats symlinks for all installed apps in ~/iPhoneSimulatorApps
Note: <link_dir> must already exist.

Flying with Django

May 24th, 2009

This is from xkcd. Shows off everything great about Python.

Flying with Python

Flying with Python

Converting Poker Stars Play Money Logs to Real Money

May 20th, 2009

I wanted to use Poker Tracker to keep track of my stats when playing at the play money tables of Poker Stars. Poker Tracker doesn’t support the play money tables.

I wrote some Perl to convert the the lots from the play money format into the real money format.

#!/usr/bin/perl
use strict;
use Cwd;
use File::Find;
 
my $some_dir = "Z:\\HandHistory";
my $startDir = &Cwd::cwd();
find(\&processFile, $some_dir);
exit;
 
sub processFile {
    shift;
    return if not /\.txt$/;
    my $inFileName = $_;
    my $infile = "$startDir/$File::Find::name";
    my $outfile = "$startDir/outHands/$inFileName.$$.converted.txt";
    open (inFILE, "<$infile") or die "can't open in file!: #$infile# ($!)";
    open (outFILE, ">$outfile") or die "can't open out file!:#$outfile# ($!)";
    my @players;
    while(<inFILE>) {
        chomp;
        @players = () if (s/^(PokerStars Game .*\()(\d+)\/(\d*)(\).*)$/\1\$\2.00\/\$\3.00\4/);
        push(@players, $1) if (/^Seat [\d+]: (.*) \(\d+ in chips\)/);
        foreach my $key (@players) {
            my $value = $key;
            $value =~ s/\s+/_/;
            ($value = $1) =~ s/($1)/_\1/ if ($key =~ /^(\d+)$/);
            s/$key/$value/;
        }
        s/([\( ])(\d+)([\) \.])/\1\$\2.00\3/g;
        s/\(Play Money\) //g;
 
        s/^\s+//;
        s/\s+$//;
        print outFILE "$_\n";
    }
    close(inFILE);
    close(outFILE);
}

Candy theme for mac os 9?

May 13th, 2009

I remember a theme for mac os 9 that I’m pretty sure came with the bondi blue style iMacs. There was one theme with matching colors for each of the iMacs. I’m pretty sure I’m not making this up. I’ve googles around but can’t come up with anything. Does anyone remember this?

[REDACTED] beta 5 and ‘Error from Debugger: Unknown packet reply: “timeout” to environment packet.’

May 8th, 2009

I finally upgraded to [REDACTED] beta 5 on one of my iPhones. Everything seemed to go just fine. I upgraded Xcode and installed the new SDK. Yay. Things were looking pretty good until I tried to build some of my existing applications.

‘Error from Debugger: Unknown packet reply: “timeout” to environment packet.’

I don’t even know where to start with that error. I’m only getting it on the iPhone 1st gen that was upgraded to beta 5. The same project builds and runs just fine on my 2.2.1 3G.

I just tried another project and it builds and runs just fine on both my beta 5 1st gen and on my 2.2.1 3G.

Anyone else getting this? How did you fix it?

Xcode 3.1 and SVN > 1.5, Lets all be friends.

April 27th, 2009

I’ve been big into using git for all of my Python Version Control. I’ve been mucking around with GitX to use it with my Xcode projects and that works out pretty well. I wanted to have something that was actually integrated into Xcode, that limits me to Subversion, Perforce and CVS.

I’m not a fan of CVS so its out. Never used Perforce and Subversion seems to be the easiest to get started with.

I ran svnadmin create SVNrep and the set it up in Xcode and found it gave me Error: 180001. That’s no good. After some googling I found a post by James Murty which describes the problem. It seems Xcode 3.1 isn’t compatible with versions after 1.4. I’m I’m running 1.6.1. svnadmin has a flag –pre-1.5-compatible that will create repositories that are compatible with versions less than 1.5.

After removing the previous SVNrep and running svnadmin –pre-1.5-compatible create SVNrep I now have a SVN repository that Xcode 3.1 can use.

Diggbar – Love it or hate it? It’s one or the other!

April 24th, 2009

The other day Digg went live with the DiggBar. It is like a combination of TinyURL and Stumbleupon. There are a lot of people not too happy with Digg and the DiggBar right now. I must say that I am one of them.

I think the DiggBar is a throwback the internet of yesteryear. Don’t get me wrong, I see what they are trying to accomplish with it. They want to give the average Digg user a better experience. That is great. The DiggBar is not the way to do it. A better way to have the same results would be a toolbar for Firefox or Internet Explorer. Everyone wins in that case.

Making iTerm’s option+delete working like it does in Terminal

March 27th, 2009

Back before Leopard and the tabbed Terminal.app I was using iTerm. I iTerm, I did everything I wanted. Leopard came along and with it the new Terminal.app. Hello tabs. With this new tabbed Terminal.app I no longer needed iTerm. As time went on I had pretty much forgotten all about iTerm. Just the other day a friend tweeted about iTerm which made me download it and give it another try.

Things I love about iTerm.

  • Fuzzy transparency for a background
  • More of an Xterm like feel

Things I missed.

  • Option + Delete = delete previous word

The option + delete may not seem like such a huge deal but I used it all the time. After a bit of googling I’ve  found a simple way to make it work like it should.

Open the Manage Profiles window (Bookmarks -> Manage Profiles). Select the keyboard layout you use, and make sure +Esc is selected.

picture-10

#WHOIS Live in the App Store

March 26th, 2009

Apple approved #WHOIS, a whois client I wrote for the iPhone / iPod Touch. I’m glad they approved it. I had a blast getting familiar with Objective C and Cococa. Coming from a strong Python background it wasn’t that big of a leap. I’m not sure why I had been so intimidated by C before, It really isn’t a difficult language to use.

I’ve been hard at work coming up with ideas for the next few projects I want to do and should have the next thing submitted to Apple early next week.

All in all, the turn around time from submission to live was right around 7 days. Oh, I almost forgot, I have some promo codes to give out. If anyone is interested leave a comment, get in touch with me on Twittter (@trcjr) or AIM (stupidfoot)