29 Jun 2010, 2:20pm

leave a comment

No ‘Super’ Tax

Tony Abbott says something right for a change!!

“This is a bad tax,” the Opposition Leader said during a visit to Tasmania.

“We already have a profits-based tax; it’s called company tax. We already have a way of ensuring that the people get value for non-renewable resources; it’s called royalties.

“We don’t need any new taxes, we don’t need any different taxes, we don’t need anything which kills the mining boom.”

29 Jun 2010, 12:27am

leave a comment

Hardcore iPhone Memory Debugging

NSZombies is great for finding references to deallocated objects (a common crash issue). But it is less useful when trying to debug a crash in autorelease, especially if the object in question is very common.

For that, you can enable malloc logging (in the simulator) and really trace where the object in question was allocated.

As stated in this excellent post, with NSZombieEnabled, MallocStackLogging and MallocStackLoggingNoCompact enabled, you can get the PID of the simulator from your debug console, and then run shell malloc_history from the debugger to get the stack trace.

More great articles:
iPhone Memory Management & Debugging
Debugging Autorelease (not iPhone specific)
More on this topic
not directly related, but a favourite on the topic of objc_msgSend bugs

28 Jun 2010, 6:25pm

leave a comment

Android Marketplace is Very Limited

I’ve been learning more about Android recently. I like what I see. Seems like cool hardware, some cool Apps, and a good philosophy behind the whole thing (open source OS, “democratic” app approval process).

However as far as making money is concerned, I’m really not convinced this is the place to do it.

I’m not sure just how much is being bought and sold on the App store, but there appears to be a really big deficiency. And that is you can only sell your apps to 13 countries. Not only that, but the rate at which countries are added seems very slow (no additional ones in over a year).

Here is a bit of a deal breaker for Australian developers, they cannot legally sell Android Apps.

Compared to Apple, which can sell to many countries. As one person puts it “Apple is running out of map” when trying to find new countries to sell in. They recently launched support for Botswana, amongst others.

There is a big discussion here

Interestingly anyway can view how much money an App has made (as a range). This is public information! And is used as a shit-filter (like Apple failed to do with star-ratings). As a user, that is cool, I’m interested to see what Apps have done well. As a developer this is terrible! It means a rival developer is able to make a very accurate cost-benefit analysis of whether copying my App would be profitable!! Not so good…

My thoughts for now are: Android is a fine place to create a freely distributed app (which you possibly make money off another way, a.l.a drop-box, or via ads), but as for paid-Apps, it seems that Apple is not only king, but it is a much bigger king with heaps more moolah.

Steven Conroy Announces Additional Protocol Filtering

PARLIAMENT HOUSE, CANBERRA: Today Steven Conroy accepted the mounting criticism that his proposed “Great Firewall of China – Down Under” would be inept at achieving it’s stated goal of preventing distribution of refused-classification material due to only filtering web traffic.

Henceforth, he directed the engineering team to add the GOPHER, TELNET and LIBERAL.ORG.AU protocols to the filter.

When asked to quantify just how much porn was shared over GOPHER, he waved his hand and said “I am not the Communications Minister you are looking for” and promptly left the podium to stunned silence.

._.

9 Jun 2010, 7:34pm

leave a comment

MiFi

Gigamom is clueless on the actual problem, confusing cellular and WiFi. The issue isn’t Jobs asking people to turn off their abusive MiFis,or AT&T’s problematic network. It’s that devices like the MiFi are an incredibly stupid replacement for a one-foot USB cable, which is all these audience members were using it for. 802.11 does not support AP densities of more than three per 100′ radius under the best conditions. The WWDC had more like 50 per 100′.

If the clueless MiFiers (and other cellular personal hotspot users) simply USB-tethered their hotspots the problem would have never occurred. It’s scary that so-called “developers” couldn’t predict this problem and sensibly head it off.

“MiFi Jamming” is a usability killer in many Starbucks now, where a dozen or more thoughtless users smear the room with unnecessary interfering 802.11 radiation, jamming access for everyone trying to use Starbucks’ wireless. All for want of a one-foot cable that ships with the cellular modem! Idiots all.

The thing is, the 802.11 standards committee predicted this problem FIVE YEARS ago. MiFi is just the first wave a self-defeating wireless decablers, wielded by clueless users that ignore spectrum realities, potentially destroying WiFi as a useful technology.

Packetguy on http://gigaom.com/2010/06/07/steve-jobs-survives-gizmodo-but-not-mifi/

Using Wifi to network a single device does seem like overkill.

4 Jun 2010, 6:19pm

leave a comment

iPad Porting: word of advice

On the iPad you must support all device orientations as the device has no “natural” orientation.

Be ware that UIViewController by default only returns “Portrait” when asked. You should change it to:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
	return YES;
}

This is obvious stuff… but what threw me is that in 1 place in my code I use UIViewController *without* subcalssing it. So it wasn’t caught with my find/replace for that method. Anyway… lesson to be learnt, search for any UIViewController alloc’s. Easier approach just subclass UIViewController once, add that method and use it in any such cases.

Without doing this your iPad will refuse to rotate for the views in question resulting in several visual glitches. Even if you just flash it for a second, it will go haywire.

4 Jun 2010, 12:54am

12 comments

iPad Simulator crashes if a UIDatePicker is in a UIPopoverController

Just had one of those afternoons, where you waste 2 hours trying to debug some really strange crash in fairly simple code only to find that the API is at fault.

I have a UIDatePicker which I present in a (custom) UIAlertView used on the iPhone.   On the iPad it makes sense to use a UIPopoverController.

However on use, it would crash about 20% of the time on the first showing, and 100% of the time on the second with various errors like:

*** -[_UIPickerViewSelectionBar lastClickRow]: unrecognized selector sent to instance 0x5570c80

and

*** -[_UIOnePartImageView lastClickRow]: unrecognized selector sent to instance 0x5576b70

and

*** -[NSCFString lastClickRow]: unrecognized selector sent to instance 0x6081770

Basically it’s just sending “lastClickRow” to junk…
And now… what cost me 2 hours but you get for free (hey why not check out GPS Log ;)

The workaround:  Set the UIViewController’s .view (to the view containing the UIDatePicker) AFTER you call presentPopoverFromRect on the UIPopoverController.

No visual glitches with the workaround.

Thanks A  ._.

I could file a bug report… but I can’t stand that the iPhone bug reports are hidden, i.e. I have no idea if 100s of others haven’t already filed the same one and I may just waste my time.  Already kinda regretting the waste of time on this issue.

Conroy is an idiot

It’s confirmed

My sentiments exactly.  There is no need for an internet filter to slow down the internet and remove our liberties, while not even satisfying the task it was put there for.

1 Jun 2010, 2:26pm

2 comments

Why is there no iPhone to iPad tethering?

So I have an iPhone.  It’s always in my pocket.  It has a 3G connection.

I can share the 3G Connection to a laptop.

So why the hell can’t I share this connection to an iPad? Even a Jobs-derided “Net Book” can use the iPhone’s 3G connection.

What’s worse is that this is not only technically feasible, but it’s been done!  What a slap in the face.

So now we have to buy another data plan? Even if you’re willing to pay it’s not (currently) easy to find Micro-SIM 3G plans in all countries.

Thanks Apple, thanks AT&T :-/

1 Jun 2010, 2:20pm

leave a comment

Porting to iPad

Some useful resources for the task:

Follow these steps to build a universal application that will run on both iPad and iPhone:

  • Set the Base SDK build setting (in the Architectures section) to iPhone SDK 3.2.
  • Set the iPhone OS Deployment Target build setting to iPhone OS 3.1.3 or earlier.
  • Set the Targeted Device Family build option to iPhone/iPad.
  • Make sure that your Architectures build setting uses both armv6 and armv7
  • Set the Active SDK to iPhone Device 3.2, select your Distribution configuration, build (select the Build button) your application, and submit it for App review.