Posts Tagged ‘apple’

Using Xcode and Guard Malloc should be easier than this.. could not load inserted library: libgmalloc.dylib

After running into a nasty (read: can’t figure it the problem) EXC_BAD_ACCESS error I turned to guard malloc.

Enabling guard malloc in Xcode is deceptively simple: Run > Enable Guard Malloc. Done. Easy right?

It would be, and I believe it is supposed to be this simple. Of course when I run the app in debug mode through the iPhone Simulator I get a EXC_BAD_ACCESS error right off the bat. The debug console is a little more helpful here:

dyld: could not load inserted library: /usr/lib/libgmalloc.dylib

I do not find it inside /usr/lib. I do find it located in /Devloper/usr/lib as well as /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/lib.

I have updated to , so maybe this has something to do with it? I’m going to try the only thing I can think of and install the iPhone SDK 3.1.2 with Xcode 3.2.1.

Apparently I don’t know what I’m doing. Luckily Google is giving me comfort in knowing I’m not alone. However, it would be better if I hadn’t burned two hours so far on a EXC_BAD_ACCESS error…

Update: Upgrading to Xcode 3.2.1 does the trick. Weird.

 

Rantings and failures about unit testing iPhone apps

Apple Headquarters

I’ve been trying to write unit tests for any iPhone apps that I write. With Xcode, that’s much much easier said than done (it should not be this difficult!).

I’ve tired a couple of frameworks and tried to follow several steps found on Google. So far nothing is doing the trick.

My latest effort followed instructions for using OCUnit written by Sen:te. After following the steps outlined, I get this error when compiling and running the project:

error: Testing rig /Somepath/iPhoneSDKVersion/otest exited abnormally with code 139 (it may have crashed).

Naturally I turned to trusty Google which came up with nothing helpful.

Thinking that it was a failure to follow the directions, I downloaded the sample test application, loaded the project in Xcode, then built and ran the project. Same error.

I tweeted to Michael Galpin, a programmer at eBay, asking for any ideas on unit testing iPhone apps. Since he had just given two presentations on mobile development [1, 2] for the Silicon Valley Code Camp 09, I thought he might have some ideas.

His initial response does not give me good feelings about iPhone development:

I’ve only seen homebrewed stuff. XCode is not exactly extensible.

He did turn me to the google-toolbox-for-mac which has some promising instructions on doing iPhone unit testing.

Using Xcode feels something like this...

Using Xcode feels something like this...

What bothers me about doing iPhone development is that I am leaving all my very excellent development tools for iffy tools.

Sun wants Java on the iPhone and is willing to make it happen. Java has one hell of a community behind it and Apple could really benefit from it.

Unfortunately someone at Apple has some bad information on Java.

Perhaps Apple is just interested in keeping it’s pet language alive and kicking. After all, Apple seems to have problems with Not Invented Here.

This was not really meant to turn this into a bit of an Apple hate-fest. It’s just that the tools and community that Java has is light years ahead of what Apple is offering anyone interested in iPhone app development.

When I’m effectively boxed into Xcode to do iPhone development, that’s a problem. I would like an IDE that doesn’t seem to break at least one thing every update. Chris Hanson’s steps to setting up unit tests has required updating between various Xcode updates.

More importantly, the barrier to entry for unit testing iPhone apps is painfully high. I have almost given up and I’m already sold on the idea of unit testing. Imagine if I wasn’t already sold.

google-toolbox-for-mac is next up for me to try. Wish me luck, I’ll need it.

 

Swift bank code is required to receive payments from the Apple iPhone App Store sales

I tried to add my USAA bank account as my bank account to receive payments from Apple’s iPhone App Store. Unfortunately USAA does not have a swift bank code (see their FAQ on the subject).

I emailed Apple on the subject, here’s their reply:

Dear Ash,

The iTunes App Store makes Applications available for sale to customers around the world. Apple uses various global currencies to pay you, depending on the customer’s location. Apple pays via wire or electronic transfer, using a “SWIFT code” to route these payments. If a SWIFT code is not on file for you, Apple cannot pay you for purchases made by global customers.

If you do not have an account with a bank that utilizes a SWIFT code, Apple recommends you establish such an account at your earliest convenience. Large, international banks utilize SWIFT codes. Credit Unions do not have this capability.

Apple does not recommend any particular bank, and recommends you research to determine which bank will best meet your needs.

Examples of US-based banks that utilize SWIFT codes:
Bank of America
JPMorgan Chase Bank
Wachovia Bank
Wells Fargo Bank
Citibank

Examples of Canada-based banks that utilize SWIFT codes:
CIBC
RBC
TD Canada

Apple may send multiple payments each month, depending on the regions and currencies in which you had activity. Your bank will handle any currency conversions when payments are applied to your account.

For reference, the locations and currencies are listed below.
United States – USD
Canada – CAD
Europe – EUR
United Kingdom – GBP
Australia – AUD
Japan – JPY
Rest of World – USD

If you have any further questions, please don’t hesitate to contact us.

Kind regards,

Callie
iTunes Finance
 Apple Inc.

I hope Arvest has a swift code, otherwise I’ll have to open yet another bank account with yet another company.

 

iPhone App Store sales (free download) statistics, first 10 weeks

As some of you may know, I’ve got an app in the iPhone App Store called Xbox Points. It’s a free app that does one thing: convert Microsoft Points to various currencies including USD, USD, AUD, CAD, EUR, GBP, and JPY.

Last I checked, there were three or four iPhone apps that have this exact functionality. Although they look more polished, all of them charged at least $0.99. So for my competition, mine is the only one that is free. Although some of the non-free versions also convert Nintendo Points.

You can check out the full data hosted on Google Fusion Tables.

Downloads per week (excluding updates)

On average the app is downloaded 529.2 times per week or 75.6 times per day. Not bad for a simple but functional app (I actually use it on occasion).

The below graphs and charts show the total sales (excluding updates) per week. I made a mistake and the second week is missing, but I think these charts get the point across quite well anyhow.

xbox-points-sales-per-week-2

xbox-points-sales-per-week

Total sales by country

Not surprisingly the United States leads the list of downloads per country.

To make this information more digestible, I’ve excluded 28 countries with less than 5 downloads.

xbox-points-sales-per-country

Updates per week

I submitted an update (it took 3 weeks to get approved, ugh). During the week of 6/29/2009 my update was released to the App Store.

Even if Xbox Points was a paid app, updates would be free.

xbox-points-updates-per-week-2

xbox-points-updates-per-week

What the…?

Just for fun, I’d like to point of some of the WTF-worthy review comments left for my app:

Review by =^.^=donkey on July 3, 2009:

I don’t know wat to do in this app do u get free points?

Review by xxRambo15xx on July 8, 2009:

I don’t know do u buy the points at whatever price u want or u get them 4 free

Review by Caddy239 on July 20, 2009:

How do u use this app do have 2 pay 4 it or is it free idk wat 2 do with it.

Review by pimp22juice on June 29, 2009:

How does this app work and do I get fre points

Review by Dsneek on July 28, 2009:

How do you even work this????????write back

Well, that’s the internet for you…

 

MacBook AirPort no longer works – “self assigned IP”

Fail!

Fail

This has been an absolutely frustrating few hours (I’m trying hard not to think about how long I’ve fiddled with this issue, ugh).

Last night my (mostly) brand new MacBook stopped working. My wife’s connection was still working and so was my laptop running Ubuntu. Weird.

First Stab at Troubleshooting

Ping yahoo.com? Nothing.

Ping 192.168.0.1? Nothing.

Turn off/on AirPort? No good.

Turn off/on the MacBook? No good.

Sanity check: ping 127.0.0.1? Great, I could get home, but I couldn’t get away.

Self-Assigned IP

I finally managed a clue to the problem beyond the vauge “it doesn’t work anymore”. While digging into the networks settings and making sure everything at least looked okay, everything did not look okay. In fact, one thing looked very wrong: you’re using a “self assigned IP address, may not be able to connect to internet“.

So I was off to Google for hours of fruitless searching.

Following the Cookie Trail

After manually specifying my DHCP setting, three new clues surfaced in succession.

The first clue: I could still connect to my Ubuntu laptop running a Hudson and Sonar install for my upcoming presentation.

The second clue: I could not connect to my router’s browser interface (nor could I ping it).

The third clue: KisMAC was running like a champ.

With DHCP settings manually configured and successfully connecting to at least something on the router, what could possibly be wrong?

By this point my wife was no longer asking “what’s wrong?” every time I let out a deep sigh.

Villechaize: Ze clue! Ze clue!

After removing the manual DHCP settings, I tried again. Same problem about a “self assigned IP”. Apparently millionth time was not a charm (supposedly this is the definition of insanity).

Desperately, I decided to take a peak at my router’s logs. I don’t know what prompted this, but it turns out it was my final piece to the puzzle:

Jul 7 20:15:28 daemon.info dnsmasq[733]: DHCPINFORM(br0) nnn.nnn.nnn.nnn xx:xx:xx:xx:xx:xx
Jul 7 20:15:28 daemon.info dnsmasq[733]: DHCPACK(br0) nnn.nnn.nnn.nnn xx:xx:xx:xx:xx:xx

I must be blocking something, somehow.

GREAT SUCCESS!

Great Success!

I took a guess and disabled the software firewall. Changing the firewall from “set access for specific services and applications” to “allow all incoming connections” did the trick. Great success!

I remember turning on the “set access for specific services and applications” a long long long time ago. So why did it take so long to surface? I’m really not sure. Right now I’m just hoping this really was my problem.

 

First look at Apple’s App Store ratings system – Your iPhone is safe!

I somehow missed the flurry of Apple news today, so I was surprised to see the updates to iTunes Connect when I wanted to check up on the number of downloads for my first iPhone App Store application (it was approved late last night). I haven’t seen much talk on the Apple’s App Store ratings, so here’s the tiny bit of details that I’ve seen about this new feature.

Before an iPhone developer can update an existing app or upload a new app, they must select the ratings for their own applications:

appstore-content-descriptions

iPhone developers are asked to choose the content frequency (None, Infrequent/Mild, and Frequent/Intense) of various types of objectionable content.

I find it very interesting that developers are being asked to provide these details. Presumably the developers themselves would know about any Hot Coffee-eque features to their apps and fess up, right? I assume the game plan is for the employees already swamped with app approvals will be in charge of validating the accuracy of the developer’s own ratings.

App Store Ratings 4+, 9+, 12+, 17+

App Store Ratings

Apple apple appears to have their very own ratings system:

  • 4+, Applications in this category contain no objectionable material.
  • 9+, Applications in this category may contain mild or infrequent occurrences of cartoon, fantasy or realistic violence, and infrequent or mild mature, suggestive, or horror-themed content which may not be suitable for children under the age of 9.
  • 12+, Applications in this category may also contain infrequent mild language, frequent or intense cartoon, fantasy or realistic violence, and mild or infrequent mature or suggestive themes, and simulated gambling which may not be suitable for children under the age of 12.
  • 17+, Applications in this category may also contain frequent and intense offensive language, frequent and intense cartoon, fantasy or realistic violence, frequent and intense mature, horror, and suggestive themes, plus sexual content, nudity, alcohol, tobacco, and drugs which may not be suitable for children under the age of 17.

Interestingly no application will be sold on the App Store that has “Prolonged graphic or sadistic realistic violence” or “Graphic sexual content and nudity” regardless of the frequency or severity. I guess that means we won’t be seeing any porn anytime soon.

Apple also provides a chart showing the app store rating system’s equivalent to the ESRB and PEGI rating systems:

Are these are equivelent?

Are these are equivelent?

Hopefully this will eliminate the controversy surrounding the rejection of apps due to its objectionable content.

More importantly, I hope the ratings system does not delay the approval process anymore.

Enjoy the new iPhone OS 3.0 upgrade in about a week. Since I’m impatient I might finally grab the version already available to developers. If anything is hosed, I’ll be hosed in a about week anyhow.