Aleksandar • Vacić

iOS bits and pieces

How not to do business, in two takes

I went for 10 days of “disconnected” vacation and when I returned I found some really unwelcome news.

One is that Photoshelter Collection is being immediatelly discontinued – for reasons that leave me with 0% faith that those people are worth investing any time and effort, for any product. I guess I can count myself lucky I spent two nights total in uploading my photos.

The other, seriously worrying piece of news is Apple’s rejection of an iPhone application because it duplicates the feature already present in their desktop application. If this is not mistake by some approval editor, it’s utterly despicable. As I’m working on my own iPhone app (first of several planned) it sends a chill of uncertainty down my spine.

Fraser Speirs, John Gruber, Harry McCracken, Paul Kafasis, Dave Winer have more.

Things were much more rosy before the vacation. :(

How to rename project in Xcode 3.x

I thought this would be a simple thing to do, but apparently not.

There’s no option to copy the state of the project as it is and continue working on it under the new name. The reason I need this is that I’m going through AAron Hillegass’s Cocoa Programming for Mac OS X, 3rd ed. and some of the projects span several chapters, each introducing new concepts. Thus I wanted to have each in the state it was at the end of the chapter, than compare and analyze the differences, to better understand what’s new and improved.

Since no option, we go with manual work.

  1. Copy/rename the folder into new name

  2. Get inside the new folder and rename the .pch and .xcodeproj files

  3. Delete the build folder

  4. Open .xcodeproj file in text editor, like TextMate or TextWrangler. That’s actually a folder, which contains 4 files (you can also right-click and do Show package contents, which will reveal the files)

  5. Open project.pbxproj in text editor and replace all instances of the old name with the new name

  6. Load the project file in XCode, do Build/Clean all targets

Now it should be ready for new build, under new name.

Update (Nov 28, ‘10): now there is a simple path: copy into a different folder, open the project and then in Xcode pick Project/Rename menu item. If that fails, there’s always a manual way above.

Obsolete Google Adsense links makes WordPress post go empty

In one of my posts here I had a referral link for Google Adsense. Recently, Google sent an email around that it will stop using them. I read that with half a mind and dismissed it.

However, this has one interesting consequence in WordPress - this link confuses the_content() API call and it returns empty string. I removed this Adsense link (broken into several lines for clarity):

1
2
3
4
5
6
7
8
<a title="Ads by Google" href="http://pagead2.googlesyndication.com/pagead/iclk?sa=l
&amp;num=0&amp;client=ca-ref-pub-1148791019820431
&amp;adurl=https://www.google.com/adsense/%3Fhl%3Den_US%26ai%3DBSsF-kUZjRc6ZFpWA-wK2rKTwCI2f8heZ0tCAAsWNtwEAEAEgyM
61BEDLFkicOVDBw_S-A2D8pvuN9CWgAZeVyP0DsgEFYXBsdXPIAQHaARBodHRwOi8vYXBsd
XM6ODEv4AECgAIBlQITul4KqAMD
&amp;ai=BwfOLkUZjRc6ZFpWA-wK2rKTwCI2f8heZ0tCAAsWNtwEAEAEgyM61BEDLFkicOVDD64L
CAmD8pvuN9CWgAZeVyP0DsgEFYXBsdXPIAQHaARBodHRwO
i8vYXBsdXM6ODEv4AECgAIBlQITul4KqAMD">Adsense</a>

and things were back in normal. No idea what is exact problem, just posting for the sake of others having the same problem. Thank you goes to commenter David that alerted me to this.

Moved to new domain

This domain used to reside on the aplus.co.yu domain. .yu domain belonged to former Yugoslavia, which has died, despite the futile attempts to keep whatever is left of it under the same name.

With it, the TLD is on its way out and the new Serbian domain is .rs

Thus this blog and all its auxiliary content is now under aplus.rs web address. All the links pointing to old web site will get R=301 message and will hopefully soon be pointing to new addresses.