Archive for June, 2011

XCode 4: Conversion Problem

Did you try to build your project in XCode 4 for the first time and get an error that starts with “There is no SDK with the name or path”?

That happened to me recently.  And the path given in the message had nothing to do with SDK’s.  In fact it was an open-source sub-project I was using.

I Googled for the answer, but mostly just found references to posts on how to fix actual SDK path problems.

It turned out that the problem was how XCode 4 looked at the sub-project.  Somehow, XCode 4 had noticed a missing Base SDK, had a static library as the product, and assumed it was a Mac OS X project.

I closed the project and opened the sub-project directly.  I corrected the project settings back to iOS and it built correctly. Closing and going back to the first project, the build now built correctly (with some warnings that I did not recall from XCode 3.)



XCode 4 Column-Wise Copy-Paste Changed

One of the strangely useful features of XCode 3 and 4 is the column-wise copy-and-paste.  But a change in XCode 4 takes away column-pasting.

Not seen this before?  Just hold the option-key while you drag a selection in XCode 3 or 4.  The text cursor will be replaced with a “+” and you can select columns of text right out of the middle of a document. (It helps if the text has vertically-oriented columns.)  It made me chuckle the first time I used it to select a column of tabs and paste them into the middle of a bunch of declarations to move them over all at once.

Pasting in a column required adjustment in XCode 3.  It would paste in the same vertical fashion as the copy, so it was easy to write over quite a bit if you weren’t careful with giving yourself space.  But then that made it interesting too.  I copied a column of member variables and pasted them all at the ends of a series of @property directives in one shot.  The same for the series of @synthesize directives.

In XCode 4, while you can copy a column, pasting it is essentially the same as having copied from any other text. Pasting does not happen in columns.

Admittedly, I did convert my columns to regular text pasting with a quick paste and re-copy in an empty file once in a while because that is what was needed.

Still,  I think I’ll miss the ability to paste in a column.

Modal View appearing the wrong location?

Is calling presentModalViewController: while a keyboard is visible making your view appear in the wrong place on-screen?

Try sending the message to a different part of the view-controller hierarchy.

I had this problem recently and was getting ready to start hunting down the current first-responder when I lucked into a quicker answer:  change the receiver from the current view controller to the navigation controller. The navigation controller handles getting objects to resign first-repsonder status without any more code from me.

Getting the view dismissed when done is easy too.  Just send the dismiss message to the modal view’s navigationController.

Online Stores and Capped ISP’s; Conflict Looming?

One thing struck me when Apple announced that Mac OS X 10.7 (Lion) would be download-only:  its size.

When they said how many Gigabytes it was, it sounded like a huge chunk of, or more than, many ISP’s bandwidth caps.

And when you add automatic online backups, and uploads and downloads of synced files, I have to wonder how many people will begin getting upset about going over their caps without realizing it.

Update 6-19-11: David Pogue conjectures about the same thing:

Something about this struck me since I first wrote: many cable providers are now offering access to shows over the internet.  How are they now going to keep their own customers from breaking bandwidth caps with their own services?

If a cap-battle does loom, there is one thing that may be spotlighted they don’t want:  how do they even measure bandwidth in the first place?  Are re-transmitted packets counted twice?  How do customers even know how much they use? And for what?    If a virus starts eating up bandwidth will customers complain that they didn’t know and should not be charged?  What about bandwidth used by programs without customer knowledge?

If you have to know how much you use,  you are going to have to learn a lot about how the internet works.   How many of an ISP’s customers want to do that?


XCode 4 and Little Snitch and GitHub

Today was my first try using XCode 4 with GitHub.  When I tried to clone a repository,  Little Snitch dutifully reported it and asked me to approve the connection.  I gave it “forever” permission for GitHub and the git port number.

Just after I clicked it,  I saw that XCode was reporting that permission was denied.

Just pressing “Try Again” got it going, but I noticed that it had created the folder for the repository.  When I clicked the same outer folder, it asked about replacing it and I chose “Replace”.

After it spun for a while, it gave an error about a missing folder for the checksum.  When I looked, the entire repository folder did not exist.  So I tried yet again, choosing the same outer folder.

Finally it completed and my work can go forward.

XCode 4.0.2,  Build 4A2002a