1

Xcode color themes

-

Sorry Apple, but your color themes are just awful. There’s no way to candy coat this. They suck.

So, readers, I have converted several easy-on-the-eyes TextMate and Vim themes for xcode and provided them for You! Go get them from Github and save yourself some eyestrain.

Download

Contains themes:

  • 2morrow Night
  • 2morrow Night (Eighties)
  • Coal Graal
  • Glitterbomb
  • Kellys
  • Monokai
  • Night
  • Resesif
  • Sidewalk Chalk

Installation

Place the

  1. ~/Library/Developer/Xcode/UserData/FontAndColorThemes
~/Library/Developer/Xcode/UserData/FontAndColorThemes

folder of your home directory.

0

Building for armv6 in Xcode 4.5

-

The original iPhone, iPhone 3G, and first two generations of iPod touch used processors supporting the armv6 instruction set. However, with the iPhone 3GS, Apple moved to the more modern, but backwards compatible, armv7 instruction set, and the iPhone 5 includes armv7s. To support older devices while taking advantage of the capabilities of the newer processors, iOS supports fat binaries, which are multiple executables, each for a separate instruction set, combined into one.

(more...)

0

.gitignore for Xcode 4

-
Finally, Apple introduced native Git support in Xcode 4. Git is now the standard version control system you can use within Xcode. The Apple engineers did a great job in integrating Git into Xcode 4 … but there is room for improvements ;) Tools like gitx still are essential for me to keep track of all the branches in the Git-repository.
If you want to use Git as the version control system for your Xcode projects, you definitely should use a specific .gitignore file to keep your Git-repository clean.That’s the content of a Xcode4 optimized .gitignore text-file:
  1. # Exclude the build directory
  2. build/*
  3.  
  4. # Exclude temp nibs and swap files
  5. *~.nib
  6. *.swp
  7.  
  8. # Exclude OS X folder attributes
  9. .DS_Store
  10.  
  11. # Exclude user-specific XCode 3 and 4 files
  12. *.mode1
  13. *.mode1v3
  14. *.mode2v3
  15. *.perspective
  16. *.perspectivev3
  17. *.pbxuser
  18. *.xcworkspace
  19. *.xcuserstate
  20. xcuserdata
# Exclude the build directory
build/*

# Exclude temp nibs and swap files
*~.nib
*.swp

# Exclude OS X folder attributes
.DS_Store

# Exclude user-specific XCode 3 and 4 files
*.mode1
*.mode1v3
*.mode2v3
*.perspective
*.perspectivev3
*.pbxuser
*.xcworkspace
*.xcuserstate
xcuserdata

one can also specify a global gitignore file in ~/.gitconfig:

  1. [core]
  2. excludesfile = /Users/username/.gitignore
[core]
excludesfile = /Users/username/.gitignore
0

Preventing Xcode 4 on Lion reopening windows

-

Xcode 4 on Mac OS X Lion reopens all the projects from the last session. This is pretty frustrating to me most of the time as I switch from working on a client app or two plus a couple of my own. I’d rather be able to quit and reopen a fresh session to work on what I want at that moment, not have to sift through four or five spaces with different Xcode projects to find the one I want… every time I switch to and from another app.

There used to be a way of preventing this in Xcode’s preference plist, but this no longer works. Instead, a solution is to set the following folder as locked, so Xcode can’t write to it to save the state.

  1. ~/Library/Saved\ Application\ State/com.apple.dt.Xcode.savedState
~/Library/Saved\ Application\ State/com.apple.dt.Xcode.savedState

You’ll want to delete the contents of this, then get info and click the locked checkbox. Et voila, no more projects reopening themselves.

0

Use device on iOS 5.1 with XCode 4.2

-
ios

You have to install latest iOS version (5.1) to your xcode to detect your ios5.1 devices. But it does not included in xcode4.2 installer, so you have to upgrade your OS to 10.7.

There is a way to install iOS sdk 5.1 to your xcode 4.2 running on Mac OS X 10.6.x.

First, you have to download latest xcode installer here (mine is xcode_4.3.1_for_lion.dmg, you may have to login to download)

Open terminal (Application->Utilities->Termial) and type these commands:

  1. sudo cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
  2. sudo cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/
  3. sudo cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1\ \(9B176\) /Developer/Platforms/iPhoneOS.platform/DeviceSupport/
  4. sudo rm -f /Developer/Platforms/iPhoneOS.platform/DeviceSupport/Latest
  5. cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport/
  6. sudo ln -s ./5.1\ \(9B176\) ./Latest
sudo cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
sudo cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/
sudo cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1\ \(9B176\) /Developer/Platforms/iPhoneOS.platform/DeviceSupport/
sudo rm -f /Developer/Platforms/iPhoneOS.platform/DeviceSupport/Latest
cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport/
sudo ln -s ./5.1\ \(9B176\) ./Latest
  1. <code>
  2. </code>
<code>
</code>

Restart you xcode and now it works.

0

Disable ARC for a single file in a project

-

It is possible to disable ARC for individual files by adding the

  1. -fno-objc-arc
-fno-objc-arc

compiler flag for those files.

You add compiler flags in Targets -> Build Phases -> Compile Sources. You have to double click on the right column of the row under Compiler Flags. You can also add it to multiple files by holding the cmd button to select the files and then pressing enter to bring up the flag edit box.

 

1 2 3 »