How many times have you done a Find in Project (Command-Shift-F) in TextMate and accidentally searched through your Rails development.log or your Xcode build files?

TextMate tries to read these massive files and your whole machine grinds to a halt. I finally got tired of this and figured out how to configure TextMate to automatically ignore these folders.

Go to TextMate’s Preferences -> Advanced -> Folder Pattern

Replace this default pattern:
!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$

with this pattern that adds an exclusion for folders named ‘build’ or ‘log’:
!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))|build|log$

I started using the TweetDeck User Stream Preview today and instantly I was able to see how fast tweets were coming in for each column. I was especially struck by the speed difference between my iPhone/iPad column and my Android column:



Every once in a while you have to compile an older project with an iPhone SDK you may no longer have installed. Apple removes links to the older versions even though the SDKs are still on their servers.

Please note that you need to be logged into your iPhone Developer Account

Update: Removed the older links that are no longer hosted on adcdownload.apple.com.

iOS 4 Software Update

This update contains over 100 new features, including the following:

• Multitasking support for third-party apps*
- Multitasking user interface to quickly move between
apps
- Support for audio apps to play in the background
- VoIP apps can receive and maintain calls in the
background or when device is asleep
- Apps can monitor location and take action while
running in the background
- Alerts and messages can be pushed to apps using
push and local notifications
- Apps can complete tasks in the background
• Folders to better organize and access apps
• Home screen Wallpaper*
• Mail improvements
- Unified inbox to view emails from all accounts in one
place
- Fast inbox switching to quickly switch between
different email accounts
- Threaded messages to view multiple emails from the
same conversation
- Attachments can be opened with compatible third-
party apps
- Search results can now be filed or deleted
- Option to select size of photo attachments
- Messages in the Outbox can be edited or deleted
• Support for iBooks and iBookstore (available from the
App Store)
• Photo and Camera improvements
- 5x digital zoom when taking a photo**
- Tap to focus during video recording**
- Ability to sync Faces from iPhoto
- Geo-tagged photos appear on a map in Photos
• Ability to create and edit playlists on device
• Calendar invitations can be sent and accepted wirelessly
with supported CalDAV servers
• Support for MobileMe calendar sharing
• Suggestions and recent searches appear during a web
search
• Searchable SMS/MMS messages**
• Spotlight search can be continued on web and Wikipedia
• Enhanced location privacy
- New Location Services icon in the status bar
- Indication of which apps have requested your location
in the last 24 hours
- Location Services can be toggled on or off for
individual apps
• Automatic spellcheck
• Support for Bluetooth keyboards*
• iPod out to navigate music, podcasts and audiobooks
through an iPod interface with compatible cars
• Support for iTunes gifting of apps
• Wireless notes syncing with IMAP-based mail accounts
• Persistent WiFi connection to receive push notifications*
• New setting for turning on/off cellular data only**
• Option to display the character count while composing
new SMS/MMS**
• Visual Voicemail messages can be kept locally even if
they have been deleted from the server**
• Control to lock portrait orientation*
• Audio playback controls for iPod and third-party audio
apps*
• New languages, dictionaries and keyboards
• Accessibility enhancements*
• Bluetooth improvements
• Better data protection using the device passcode as an
encryption key* (Requires full restore.)
• Support for third-party Mobile Device Management
solutions
• Enables wireless distribution of enterprise applications
• Exchange Server 2010 compatibility
• Support for multiple Exchange ActiveSync accounts
• Support for Juniper Junos Pulse and Cisco AnyConnect
SSL VPN apps (available from the App Store)
• More than 1,500 new developer APIs
• Bug fixes

Products compatible with this software update:
• iPhone 3G
• iPhone 3GS
• iPhone 4
• iPod touch 2nd generation
• iPod touch 3rd generation (late 2009 models with 32GB
or 64GB)

* Requires iPhone 3GS, iPhone 4, and iPod touch 3rd generation.
** Requires iPhone 3G, iPhone 3GS, and iPhone 4. SMS/MMS messaging and Visual Voicemail require support from your wireless carrier.

For feature descriptions and complete instructions, see the user guides for iPhone and iPod touch at:

http://support.apple.com/manuals/iphone

http://support.apple.com/manuals/ipodtouch

For more information about iPhone and iPod touch, go to:

http://www.apple.com/iphone

http://www.apple.com/ipodtouch

To troubleshoot your iPhone or iPod touch, or to view additional support information go to:

http://www.apple.com/support/iphone

http://www.apple.com/support/ipodtouch

For information on the security content of this update, please visit this website:

http://support.apple.com/kb/HT1222

iPhone OS 3.0 introduced Spotlight Search: Flick to the left and you can search through the apps you have installed as well as other things like contacts, calendars events, emails, songs and notes.

For apps the iPhone OS will look at the app name that you see under it’s icon. So typing ‘bird’ would find the Birdfeed app.

But the OS also looks at the name of the app as it appears in iTunes. Birdfeed’s name in the app store is “Birdfeed – A very nice Twitter client”, which is why Birdfeed shows up when you type ‘twitter’.

spotlight

When you download an app to your phone the .ipa file includes the actual app binary as well as an iTunesMetadata.plist file. This plist file contains the app’s name as it appears in iTunes.

Tweetie on the other hand doesn’t show up in the screen-shot above even though it is installed on the phone. Tweetie’s name in the app store is “Tweetie 2″ which doesn’t include the word ‘twitter’.

Follow us on Twitter

I just finished helping a family member across the country with their wireless network setup. Neither the local ISP or Netgear technical support were able to help.

Problem: An iMac plugged directly to a Netegear router via Ethernet connected to the Internet just fine, but a wireless connection from a MacBook didn’t work.

First we figured out that the router was a Netgear WPN824v3 and the devices we are trying to connect are an iMac, a MacBook and an iPhone.

The problem was that the MacBook was connected to the wireless network but wasn’t properly getting an IP address via DHCP.

We verified that plugging the Ethernet cable into the Macbook worked, so we knew that the Internet connection to the ISP worked fine, and the problem was only for wireless.

First we tried temporarily turning off all wireless security but that made no difference.

Next I found a simulation of the UI for that unit here. This made it a lot easier to see what options were available for that router.

We changed the default password for the router and enabled Remote Management. Now I could log in to the router and see the router’s actual settings.

The first thing I noticed was that the Mode for the wireless network was set to “Auto 108Mbps”. Did this router support 802.11n? And did it work with the built-in Airport card? A couple of Google searches turned up no answer.

So next I decided to try to get things working with just 802.11g.
First I set the Mode to “g and b” and set the Channel to “Auto”. That didn’t change anything. The MacBook could still connect to the wireless network, but not get an IP address.

Under Advanced/Wireless Settings I noticed an “108Mbps Settings” area. I checked “Disable Advanced 108Mbps Features” and un-checked “Enable eXtended Range(XR) Feature”

Success! The Macbook could now successfully get a DHCP IP address!

Before finishing, we made sure that the bottom of the router had a piece of paper with the router’s password and we disabled the router’s Remote Management feature and re-enabled the WPA2 password and re-verified that everything was still working as expected. We also made sure that the iPhone could also connect without any problems.

Happy Troubleshooting!

Follow us on Twitter

Sometimes it’s useful to quickly see all the subviews of an iPhone view.

Perhaps you’re debugging a problem in one of your views or trying to understand the inner workings of one of the built in views.

You can simply iterate over a view’s subviews, but then you won’t see subviews deeper than one level. You need a method that recursively walks the hierarchy.

Luckily Apple has already done this with an undocumented UIDebugging category on UIView that makes this very easy: recursiveDescription

At the gdb prompt in the Xcode debugger you can say:

p [[self view] recursiveDescription]

and instantly see a description of the entire view hierarchy.

Follow us on Twitter

Did you know that it’s possible to remove someone from your followers without blocking them?

Normally when you visit your list of followers these are the options available to you:

No Remove option
But after you protect your twitter account and mark it private, the options change to include the remove option:

Remove a follower

Selecting “Remove” shows this alert and after you click OK, poof that user is no longer following you:

Confirm removing a follower

This nifty option is also available from the API, though it is undocumented:

curl -u user:password -d ” http://twitter.com/friendships/destroy/59648642.xml

Here is a patch to John Nunemaker’s Twitter gem that adds this functionality:

module Twitter
  class Base
    def friendship_remove(id)
      perform_post(“/friendships/remove/#{id}.xml”)
    end
  end

And here is a quick Ruby Script that removes all the followers of a user:

#!/usr/bin/ruby -rubygems
require ‘twitter’

module Twitter
  class Base
    def friendship_remove(id)
      perform_post(“/friendships/remove/#{id}.xml”)
    end
  end

auth = Twitter::HTTPAuth.new(‘user’, ‘password’)
twitter = Twitter::Base.new(auth)

twitter.follower_ids.each do |follower_id|
  begin
    twitter.friendship_remove(follower_id)
  rescue => err
    puts “#{err} for follower #{follower_id}”
    next
  end
end

Follow us on Twitter

It looks like Twitter is making lots of little changes on their site.

They’ve added new colorful default profile imagesrolled out some design tweaks and now they allow the @ symbol in URLs.

Previously if you tried twitter.com/@boctor or twitter.com/@tweetslounge you’d get an error. But now that link works just fine.

Handy for those times you’re copying and pasting and accidentally keep the  symbol

A welcome change from the brown!

Follow us on Twitter

If you’ve used Twitter at all you’ve seen the original default profile image that Twitter assigns you when you first join:

Default Profile Image

Now it looks like along with their home page redesign they have a set of new images. It appears that the colors are randomly assigned:

Default profile 1 Default profile 2 Default profile 3
Default profile 4 Default profile 5 Default profile 6

A welcome change from the brown!

Follow us on Twitter