Posted by jsz on June 24, 2010
So iOS 4.0 broke the "numeric keypad with decimal point"-hack. To verify that the UIKeyboardView was removed somehow from the app's view hierarchy I wrote a small function. Yeah, looks like there's no keyboard view in the hierarchy
Nevertheless I found the method handy. So here it is:
void enumerateSubviews (id viewlol)
{
static int enum_level = 0;
enum_level ++;
NSMutableString *tabstring = [NSMutableString stringWithCapacity: 8];
for (int i = 0; i < enum_level; i++)
[tabstring appendString:@"---"];
NSLog(@"%@%@",tabstring, viewlol);
NSLog(@"%@{",tabstring);
for (int i = 0; i < [[viewlol subviews] count]; i++)
{
id temp = [[viewlol subviews] objectAtIndex: i];
if ([[temp subviews] count] > 0)
enumerateSubviews (temp);
else
NSLog(@"%@%@",tabstring,temp);
}
NSLog(@"%@}",tabstring);
enum_level --;
}
Just pass a UIWindow/UIView to it and you will see what is attached to that view. It's recursive and has no depth break - so if you happen to kill the stack build an abort condition in
Posted by jsz on June 11, 2010
After upgrading my internet connection to 50mbit it was time for a new wifi router as my old Linksys capped out at 3MB/s (although 54g). So I bought a shiny Airport Extreme for super 5ghz hi-speed wifi fun. Everything worked perfectly. Everything but my old iPod touch 1G that I'm using for development to test for low-end compatibility.
I have my Airport Extreme running in dual band mode (5Ghz N for my macs and 2.4Ghz b/g for the small stuff). The problem was always the same: My old iPod Touch logged into the 2.4ghz network and lost its connection few seconds later.
Logs stated:
Associated with station 00:1d:4f:xx:xx:xx
Installed unicast CCMP key for supplicant 00:1d:4f:xx:xx:xx
Rotated CCMP group key.
Deauthenticating with station 00:1d:4f:xx:xx:xx (reserved 2).
Disassociated with station 00:1d:4f:xx:xx:xx
After searching for possible solutions on the net and tinkering with the Airport (I was just about installing my old Linksys for a 2nd wifi network for the iPod) I found the solution: Just turn off automatic radio channel selection and set a static radio channel. Seems like the Airport switches the channels too fast for the little iPod
You can do it in the Airport Utility.app (manual setup -> wireless):

Posted by jsz on January 28, 2010
After playing with the new iPad SDK I must say: I want Cocoa Touch for the Mac. Especially the UISplitViewController stuff.
I'm using for one of my recent Mac projects a split view with a custom split view controller and tinkering with the boiler plate code is just a mess. And when I look at the new iPad SDK I must admit that I love UIViewController - it's easy and it's effective. We need something like that for desktop Cocoa. ASAP!
Heck - we need a lot from Cocoa Touch on the desktop. The NSViewController stuff on the desktop is just a mess and does not add much value at all. You have to do all the ugly boiler plate yourself. In contrast you have on the iPhone the fantastic UIViewController components which make coding for the iPhone just fun. And the new UISplitViewController is just the next level.
So my plea to the mighty cocoa gods: Please improve desktop cocoa to the level of the iPhone SDK!
Posted by jsz on January 13, 2010
Yep, what happens if the user enters wrong credentials? As a developer you have to test this possibility in your app and implement error handling. Well ... error testing with twitter is somehow annoying:

Posted by jsz on January 5, 2010
Some time ago I had some free time and I started up World of Warcraft to overcome my boredom. Well seems like World of Warcraft is a terrific source of boredom too.
After some time lying on my couch I asked myself if I could control the WoW running on my Mac from the couch - without any screen sharing/vnc stuff. Just turning my iPhone into a wireless video game controller. My main question was if the latency in a 54g wifi network would be low enough to allow fluent play.
{ Read more... }
Posted by jsz on December 20, 2009
From time to time I have to use my UMTS modem (a Huawei e270) to connect to the internet. It does not occur often but when I need it it has to work. For this reason I purchased a license for Novamedia's launch2net some years ago. Sadly their DRM is somewhat restrictive and you may use your license on only one Mac. And as I sold my old mac book this summer and forgot to unregister it with Novamedia's DRM servers I could not use my license on my new MBP this weekend. E-Mail support tends to be slow on weekends so I had to come up with a way to use my modem without launch2net.
{ Read more... }
Posted by jsz on November 12, 2009
I was testing ads in one of my iPhone apps but the ads didn't display. After mailing the advertising company's support it was clear that they did not deliver any ads for the country I'm currently living in. (They check the user's location through IP geo location.) So I had to virtually move to the US
After having set up a forwarding SSH tunnel (acting like a SOCKS proxy) to my US-server I had somehow to enter the proxy information into my iPhone. But there is no setting in the iPhone's system preferences app for a SOCKS proxy. Just for a HTTP one. Yet you can use a SOCKS proxy. Just create a .pac file and choose in the proxy settings the "auto" option. Enter there the URL to your .pac file. (Can be a web server too - does not have to be in your local network. And you don't have to use IPs in the .pac file. Local computer names like "imac.local" will do it too.)
Here's a nice "howto": SOCKS proxy with iPhone (if this snipplet should ever get deleted click below on read more)
Oh yeah, the settings for proxies is hidden. You have to go to wifi-settings -> click on your active network and there you can enter proxy settings.
{ Read more... }
Posted by jsz on October 31, 2009
If you ever wondered what the OS X equivalent to Window's ReadProcessMemory() and WriteProcessMemory() is you might had a rather sobering research experience on this topic.
After googling for all possible combinations of "read memory, OS X, ReadProcessMemory(), etc, ..." the only information I found were posts in forums where somebody with that problem only got answers like "Well! That sounds suspicious to me. You should not mess with another process' memory! brb calling the internet police you terrorist!"
{ Read more... }
Posted by jsz on October 31, 2009
So now I am doing it too: a OS X dev blog.
I'm the guy behind fluxforge.com and here you will find posts about development related stuff, source code and some experimental apps.