Aleksandar • Vacić

iOS bits and pieces

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):

<a title="Ads by Google" href="

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 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 web address. All the links pointing to old web site will get R=301 message and will hopefully soon be pointing to new addresses.