How universal is “universal”?

January 1st, 2010 § 0 comments § permalink

Tip: if building a +universal variant in MacPorts (for example, because you’re trying to build and install the Python Imaging Library), then you should check /opt/local/etc/macports/macports.conf to see what MacPorts considers “Universal”:

universal_archs

The machine architectures to use for +universal variant (multiple entries must be space delimited). Options include: ppc, i386, ppc64, x86_64

Default: x86_64 i386 (ppc i386 for 10.5 and earlier)

(from http://guide.macports.org/#internals.configuration-files)

On Mac OS X 10.6 (Snow Leopard), the default value for universal_archs is x86_64 i386. Note that it does not include the PowerPC architecture. This makes perfect sense, because Snow Leopard doesn’t run on PowerPCs. Unfortunately, when installing PIL with pip, it builds for PPC as well, and thus requires PPC architectures in its dependent libraries, even on 10.6. I do not know how to disable PPC support in PIL (or pip?). All of this Python extension building stuff is new to me :)

The upshot: if you are running 10.6, then you must edit macports.conf and add “ppc” to universal_archs before you follow the directions in the linked article.

Easter egg in your iPhone app? Don’t hide it from Apple

October 21st, 2009 § 0 comments § permalink

Yesterday, when I logged into the iPhone Dev Centre, I was greeted with a “please agree to the new developer agreement” alert. As usual, I copied the text and diffed it with the previous version. The bulk of the changes had to do with allowing in-app purchases in free apps.

But the following change caught my eye: in section 12.2, “Termination”:

12.2 Termination
This Agreement and all rights and licenses granted by Apple hereunder and any services provided hereunder will terminate, effective immediately upon notice from Apple:

(f) if You engage, or encourage others to engage, in any misleading, fraudulent, improper, unlawful or dishonest act relating to this Agreement, including, but not limited to, misrepresenting the nature of Your submitted Application (e.g., hiding or trying to hide functionality from Apple’s review).

(emphasis added)

So be careful, hidden-unlockable-feature-mongers. Apple could terminate your licence!

Genesis^H^H^H^H^H^H^H Droid Does

October 18th, 2009 § 0 comments § permalink

Verizon’s hard-hitting “Droid Does” anti-iPhone ad (via TechCrunch):

I love my iPhone (and developing for it) but I definitely would like to see more competition in this space. I think this ad hits home for those of us who are frustrated with the iPhone’s shortcomings. On the other hand, the style of the end of the video makes me think of trailers for horror movies. I’m not sure that’s such a good association to make!

This ad campaign also reminds me of the old Sega Genesis commercials back in the day:

Flash and iPhone

October 11th, 2009 § 1 comment § permalink

It’s been a few days now since Adobe announced that Flash CS5 Professional will have a “publish for iPhone” feature for ActionScript 3 projects. Just wanted to jot down a few thoughts:

As a Flash developer and geek, the technology seems pretty damn impressive to me. It actually includes the LLVM compiler? Wild.

Still, there are technical concerns, although to be fair, there are many months before CS5 ships. And for the moment, Flash-built apps won’t have access to things like the iPhone’s native UIKit controls, but they will have access to the accelerometer and multitouch (which at first I thought they did not).

Furthermore, as an iPhone developer, I have concerns, and in a way these concerns have less to do with Adobe’s actions than Apple’s: the single chokepoint that is the App Store and its review/approval system. It’s clear that Apple’s review system does not scale (longer and longer delays in approvals), and discoverability is bad enough as it is with the number of apps in the store now and the limited number of ways there are to browse and find things in the store.

If the iPhone app ecosystem was completely open, with many “stores” and multiple ways of finding and buying apps, I’d welcome Flash-built iPhone apps with open arms: the more the merrier. As it is, though, I worry a bit about the flood of muck as every Flash developer (over a million by Adobe’s count: A MILLION!) with a back catalogue of content tries to get their old code into the App Store.

Some obvious predictions:

  • We’ll see more than a few Flash component libraries that emulate UIKit controls
  • Apple will unofficially delay or reject Flash-built apps for the first while until/unless Adobe and Apple come to some kind of understanding (see the issues that PhoneGap apps have had in the past, and that uses all native SDKs!).
  • Flash developers will find it more difficult than they expect to get their old code working well on the iPhone
  • Many iPhone programming contracts will be lost as clients decide (correctly or incorrectly) that they can do their iPhone project in-house with Flash

Still, I have to admit I personally can’t wait to get my hands on the public beta of Flash CS5. I enjoy working with Flash and ActionScript.

Twitter follower tracker

September 18th, 2009 § 1 comment § permalink

There are a number of services out there that are supposed to notify you of when people follow or unfollow you on Twitter. I’ve tried a few and most of them seem mostly broken. The best one out there, formerly at joule.marnanel.org, is currently down and its creator doesn’t know when it’s coming back, alas.

The problem with running a service like that is scaling when huge numbers of people join. It always struck me that something like this might be better handled on the client side. It’s such a conceptually simple operation (fetch followers list, do a diff with the last time you checked), and each person/computer only has to worry about their own accounts. I’m surprised that Twitter clients don’t have functionality for this built in (that I know of).

I’ve been wanting to play with the Twitter API for a while, and I’ve also wanted to delve a little bit into some of the newer features that modern web browsers have to offer, so I’ve created a simple Twitter follower tracker proof of concept in JavaScript.

Twitter follower tracker in action
It’s a very crude app. It doesn’t update automatically—you have to manually refresh the data when you want to check to see if your follower list has changed. Also, the new and lost followers are shown only with their numeric user IDs. Each ID is a link, however—clicking on the link will fetch that user’s information and convert the number into a username. Clicking again will take you to that user’s profile. I did this to minimize the quantity of Twitter API calls.

Yes, the page is hosted on my site, but all of the work is done by the browser. It uses jQuery to fetch the data from Twitter; thanks to Twitter’s handy “callback” parameter in JSON responses, I don’t have to worry about having a proxy on my server handle any cross-domain requests. I use the localStorage property, supported in some modern browsers, to remember the user’s follower history. LocalStorage is interesting and easy to use. It’s like a giant browser cookie, except that its contents don’t get sent to the server.

Caveats: it’s just a proof of concept. I’ve only tested it (minimally) on a couple of browsers, on Mac OS X. It doesn’t do any error checking. I’m sure it will break if you have a lot of followers. I’m sure it may break if you look at it funny. It may well have security issues. I’m not sure what the storage limits are for localStorage, but if you hit the limit, I have no idea what will happen. Since localStorage is in the browser, you won’t be able to see your follower history if you move to a different machine or even to a different browser on the same machine.

If you want to look under the hood, all the real work is done in follow.js. It’s not well-commented at this point—it’s kind of a mess. I might put it under some sort of open source licence, although I’m not really sure if it’s worth it for something so simple.

Give it a shot and let me know what you think :)

Twitter follower tracker.

Another UITabBarController change from 2.x to 3.0

July 22nd, 2009 § 0 comments § permalink

Or actually with UITabBarControllerDelegate, and specifically, with the method tabBarController:didSelectViewController:.

According to the docs, the differences:

OS called only when
tab changes?
called when changed
programmatically?
before OS 3.0 YES YES
OS 3.0 and later NO NO

If you are writing code that runs on both 2.x and 3.0 that needs to get tricky with tabs, these changes are a nuisance.

Even more infuriating is that the Apple documentation isn’t complete. The section ends with the sentence fragment “If you are implementing….” Yes? If I am implementing what? And what do I do if I am?

Yes, I’ve already reported documentation error. No response though. My guess is they’ll just remove the sentence fragment instead of expanding on it :(

[edited: I made a mistake in the table the first time I posted this. Should be fixed now.]

I’ve never gotten this to work

July 17th, 2009 § 0 comments § permalink

Troubleshooting problems with WordPress’s automatic upgrade feature would be a lot easier if it gave more detailed error messages than this:
unhelpful wordpress error message
Grrr.

I keep thinking about moving away from WordPress anyway…

Approved!

July 11th, 2009 § 0 comments § permalink

I forgot to mention that my apps (two versions of the same app: a free, ad-supported one, and a 99-cent ad-free version) were approved this past week on the iPhone App Store!

Please check out My Monkey.

Time from submission to approval: 13 days.

It’s a simple app, an Objective-C port of my Flash monkey widget. I added support for multitouch, the accelerometer and custom image backgrounds chosen from the user’s photo library.

It was a pretty straightforward port. The main thing I had to get used to again (coming from ActionScript) was the lack of automatic garbage collection.

I don’t expect this app to tear up the charts or anything like that :) but mainly as an exercise in learning iPhone programming and the whole process from code to distribution.

UITabBarController timing change from OS 2.X to 3.0

June 29th, 2009 § 1 comment § permalink

This is just a short note about a change I discovered between iPhone OS 2.x and 3.0. It’s not very interesting or exciting but I thought I’d record it in the off chance that it helps someone else.

When the user switches tabs on a UITabBarController in iPhone OS 2.x, the sequence of events is:

  1. UIView of new tab gets added as a subview
  2. UIView of old tab gets removed
  3. The delegate’s tabBarController:didSelectViewController: method is called

Run the same code on iPhone OS 3.0, however, and the sequence is this:

  1. UIView of new tab gets added as a subview
  2. The delegate’s tabBarController:didSelectViewController: method is called
  3. UIView of old tab gets removed (sometime later, I think it’s invoked via one of NSObject‘s performSelector: methods)

This is a inconsequential change for most, but it might make a difference if you are checking the UIViews’ superview variables in your tab bar controller delegate method.

UIImagePickerController cropRect seems to be useless?

June 6th, 2009 § 12 comments § permalink

[UPDATE: In iPhone OS 3.0, the cropRect behaves more consistently (even if it's still a little odd), see Stormy Productions' Image Picker Sample, which works perfectly in 3.0. This article only applies to 2.2.1.]

I am using UIImagePickerController to let the user choose an image from their photo library, and allowing image editing (move and scale).

When the user is done moving and scaling, the OS calls my UIImagePickerControllerDelegate‘s didFinishPicking method with information about the original image and the cropping rect in editingInfo.
move and scale
One might think that the cropping rectangle returned by the UIImagePickerController would be in the coordinate system of the original UIImage, since that would make the most sense. One would be wrong, however. Based on my own experiments on my iPhone and various threads on Apple message boards, it seems that sometimes the cropping rectangle is based on a 640×480 image (that is: the original photo is first resized to 640×480 pixels, and the cropRect is in the resized image’s coordinate system).

But not always! Screenshots taken on iPhone (using power button + home button), which are 320×480, have a cropRect based on the original image size.

So that’s easy to deal with then, right? Just compare the original image’s size to see if it’s 320×480 or not…

Not so fast. That does not always work. I have on my iPhone some 320×480 images that, when picked with the image picker, return cropRects that are in some weird coordinate system. An unzoomed (1:1) crop returns a width and height of 432×433! That would imply the image is scaled to 432×648 before cropping. Odd!

(Where did these images come from? Both of them were created by other iPhone apps, saving a 320×480 image to the photo library. UPDATE: it seems to happen with JPEGs of certain sizes/proportions. See my comments for sample images.)

Unfortunately, so far I have been unable to distinguish between these two types of 320×480 images in code. Without being able to get reliable info about the coordinate system of the cropping rect, the cropping rect is basically useless. (And no, you can’t just compare the cropRect to see if it’s 432 pixels wide :P Once you scale that picture in the image picker, the width could be anything, still in that weird coordinate system.)

If anyone has any code that reliably deals with all images (including images of arbitrary dimension [e.g 527 x 325] that are saved to the iPhone), at all zoom levels, please let me know :)

generic viagra india
cialis versus levitra
where to puchase cialis online
viagra urethral
cialis for sale
viagra cialis levitra buy viagra
natural viagra
half price viagra
levitra canada
cialis 10 mg
viagra dosing
cialis side effect
generic cialis soft from india
shelf life of viagra
cialis en ligne de pharmacie
levitra alcohol
formula for viagra
100 dollars cialis
levitra lawyers
viagra
apcalis levitra vs
order discount viagra
levitra young people
viagra vs levitra
viagra oral sex
cialis response
viagra side effect
ladies viagra
levitra users
best generic viagra prices
cheap cialis find
bought viagra fuerteventura
viagra candy
viagra side affects
cialis headache
avandia
effects of viagra on women
viagra next day shipment
viagra extacy ashanti
what is cialis soft
viagra logo
viagra works
over the counter viagra
diabetes and viagra
viagra ocular side effects
viagra wholesale
cialis no perscription
buying viagra in new zealand
cialis allergic lesions
pharmacy online viagra
viagra for sale online
viagra gel
cialis generic
viagra joke
viagra what to expect
directions for taking viagra
lowest cost for cialis 20mm tablets
purchasing viagra
cialis next day delivery
cialis prices
geniune cialis no prescription
viagra pay by e-check
side effects from viagra
levitra consumer information
cialises
viagra sideffects
viagra from usa
viagra uterine thickness
viagra blood pressure
cheapest viagra
cialis achalasia
cialis and levitra
generico viagra
cialis generic india
achat viagra
substitute for viagra
viagra pills cod
levitra sale
viagra availability at boots
cialis pill
viagra and women
buy viagra online in uk
what is the best herbal viagra
levitra medication
purchase cialis
health net viagra non-formulary cost
death by viagra
discount viagra online
roomid 71 cialis
viagra pic
on line prescriptions for cialis
cialis soft tab
viagra soft
viagra purchase
viagra discussion
viagra sheet off leg
what is better viagra or levitra
viagra s
viagra rx
viagra reviews
viagra women forum
viagra levitra cialis
cialis generic rx
viagra time
cialis lawyer ohio
order pfizer viagra with mastercard
drug impotence levitra
buy cialis online viagra
purchase generic viagra
viagra sildenafil citrate
cheap viagra new zealand
generic viagra overnight delivery
cialis australia
cialis overnight
gay men viagra vs cialis
prices cialis
money order viagra
lowest viagra prices
does viagra work for woman
viagra sildenafil
cialis and violent sex
is viagra for women
buy sublingual viagra online
buy viagra
on line viagra
cialis bph
levitra headache
where to buy viagra on line
20mg cialis
generic viagra
cialis super viagra
tadalafil generic cialis
viagra use of
viagra otc
purchase viagra
viagra dosage for women
viagra shelf life
canadian pharmacy viagra
viagra and cocaine
cialis murah klang
info on viagra
cialis dosage
pic viagra woman
discounted viagra
cheapest viagra prices
cheapest generic viagra
cialis user forum
wikipedia viagra
viagra sales uk
cialis viagra sampler
info on cialis
ship free viagra sample
buy cialis online uk
viagra or cealis
cialis women libido
searchstring cialis type all
buying cialis
cost levitra
cialis levitra viagra
viagra 6 free samples
ending viagra use
cialis no prescription
rosacea viagra
viagra adverse events
cialis drug information
viagra for under $2
buy cialis online now
advantages of viagra
c-ring viagra
male enhancement cialis
viagra rss feed
what is better levitra viagra cialis
viagra sample
cheapest price for viagra
headaches levitra
viagra for sale in the uk
viagra cialis levitra buy viagra
recreational viagra
viagra viagra
prescription for viagra
chineese viagra
cialis order form in uk
natural herbal viagra
cost of cialis
double dose of cialis
viagra versus cialis
canada cialis levitra
cialis softabs
can viagra be used by women
india generic cialis
buy viagra alternative
cialis erection problems
generic cialis from india
buying viagra buying viagra
bad side effects of viagra
levitra tabs
viagra inventor
buy cialis online
cheap viagra discount
buy viagra meds online
no prescription cialis
what is better viagra or levitra
que sabes del viagra
cialis canada
buying generic cialis
best buy viagra
online viagra store
natural viagra products
levitra vs cialis
women using viagra
generic viagra buy
buy cialis generic
women viagra
cialis without a prescription
videos viagra
viagra use and abuse
ingredients viagra
cialis cheap
us viagra
cialis vs levitra
what is levitra
side effects viagra
viagra women
what happens when you take viagra
cialis sample
overnight cialis
approval cialis fda
viagra no prescription
bayer and levitra
india cialis
new drug cialis
levitra website
side effects cialis
viagra and jokes
cialis vs levitra
lowest priced viagra in britain
generic viagra online
viagra generico
cialis or viagra
viagra for men
viagra vs cialis
viagra cialis levitra
viagra lawyer ohio
buy online viagra
uk pharmacies cheap viagra
german viagra substitutes
viagra boots
songs about viagra
levitra doses
levitra dose
natural substitute for viagra
cheapest generic levitra
generic levitra 32
women who take levitra
best price for generic viagra
cialis opposite effec
purchase cialis online
viagra online pharmacy
bayer levitra samples
heather viagra grow
cialis multiple attempts
buy viagra in amsterdam
viagra by mail
cialis levia and viagra
viagra uk 32
buy viagra on the internet
cheap cialis sale online
viagra pay pal
viagra discount store
genric viagra
cat 1 keyword viagra
order cialis uk
viagra cialis levitra
cialis overnight shipping
viagra usage
viagra free trials
viagra herbal substitute
negative effects of viagra
woman taking viagra
viagra ad
order cheap viagra
cialis new viagra
buy soma online
buy viagra online 35008
viagra alternative research
u 19835 cialis
cheapest price viagra
viagra free samples
viagra dosage
brand viagra without prescription
ebm diabetes viagra
liquid cialis
discount viagra canada
generic viagra from india
levitra for women
cialis alcohol
buy viagra in canada
women and viagra
cheapest place to buy viagra
40 grams of cialis
viagra info
cialis alternative
cialis naion
viagra experiences
no prescription order viagra online
make your own viagra
levitra vs viagra
pharmacy viagra
women who take viagra
lowest price generic viagra
cheapest place to buy viagra online
buy cialis by check
cialis new viagra
viagra soft tabs
levitra women
levitra pills
viagra and altace
viagra use
levitra vardenafil
buy viagra in mexico
generic viagra lowest prices
buy viagra in bangkok
viagra best way to use
best natural viagra
viagra retarded ejaculation
cialis mexico
generic low price viagra
buy viagra online without prescription
does levitra work
viagra cialis store
dosage of viagra
discount levitra online
viagra ads funny
cialis britain
viagra generique
cialis soft tab india
viagra faq
viagra from canada
levitra eye problems
cialis testimonial
viagra pennis enlargement
suppliers of viagra in uk
what is cialis
cialis trial pack $38
cialis pictures descriptions
cialis canada online pharmacy viagra
lowest prices for cialis
lowest prices viagra
cialis information
viagra australia
viagra india
uk cialis supplier
viagra natural
exercising after taking cialis
cheap viagra
cialis duration of effectiveness
cvs viagra
viagra on-line
cialis versus levitra
sample cialis
u id password cialis
generic for viagra
viagra not working
levitra medicine
natural cialis
cialis wholesale online
cialis samples
cialis viagra levitra
herbal viagra replacements
women use viagra
buy viagra online
viagra online no prescription
multiple acts viagra
viagra forum
viagra online asap
viagra in the water
generic viagra mexico
viagra cialis store
cialis interactions
generic brands of viagra online
soma
cialis pictures results
viagra without a prescription
viagra patent
viagra tiajuana
alchohol and cialis
cialis purchase
cialis and viagra together
overnight viagra
gernic viagra
cialis user reviews
levitra and marijana
viagra buy
viagra directions
rapid tabs viagra
viagra suppositories ivf
wild horses viva viagra
viagra beneficial side effects
canada cialis levitra
viagra cialis
cheap cialis
10 mg cialis
viagra for sale
viagra and jet lag
buy discount paxil
cialis oral
viagra side effects
get viagra over the counter
herbal viagra 32
viagra london
viagra and blood pressure
levitra men video
viagra online
womens viagra
sample of viagra
womens viagra
viagra professional
generic viagra cheap
efficacy levitra
viagra erection time
viagra stories
us pharmacy cialis
viagra cream
mexican viagra
discount generic viagra
viagra low cost
levitra side effects
hair growth with viagra
levitra cialis viagra
buy viagra usa
ed cialis
adverse side effects of viagra
side effects of cialis
viagra uk sales
uprima cialis viagra
apcalis vs viagra
viagra england
buy cheap viagra online uk
buy viagra in uk
guaranteed cheapest viagra
low cost viagra
levitra prescribing
cost of viagra
cialis drug prescription
cialis soft tab description
viagra supplier
viagra pictures
cialis viagra levitra
viagra prices
20mg levitra