Tag Archives: XCode

Opening Xcode projects and workspaces

Inspired by ortas post about it I came up with this one-liner: alias openx=’open *.xcworkspace 2>/dev/null || open *.xcodeproj 2>/dev/null || echo "nagnagnag"’alias openx=’open *.xcworkspace 2>/dev/null || open *.xcodeproj 2>/dev/null || echo "nagnagnag"‘

git version sha in iOS apps

there’s tons of recipes out there how to do this – nevertheless I want to add another one: create a new build phase (here named „Git Sha -> Info.plist“) paste 1 2 3 4 5 6 7 8 # write git version SHA into Info.plist # # inspired by # – http://kswizz.com/post/2686511526/git-xcode-versioning # – http://stackoverflow.com/a/12658311 […]

Upgrade iOS SDK 4.0 -> 4.1 with custom location

again, for my custom install location I need to prepare: cleanly uninstall and remove cruft: $ dir=/Users/Developer.SnowLeopard $ sudo sh $dir/Library/uninstall-devtools $ sudo rm -r $dir/* $ sudo mv /Developer /Developer.deleteme$ dir=/Users/Developer.SnowLeopard $ sudo sh $dir/Library/uninstall-devtools $ sudo rm -r $dir/* $ sudo mv /Developer /Developer.deleteme then do the custom-location install and finally restore some […]

Develop with iOS 4 SDK on an OS 3.0 Device

After upgrading to iOS 4.0 SDK, iPhone OS 3.0 is no longer a valid „Base SDK“. Naively switching to iPhone 3.2 prevents deployment to a 3.0 device. But such „Project -> Edit Project Settings“ work out fine: „Deployment Target“ hint found here.

iOS 4 Simulator crash (when installed to custom folder)

just downloaded and installed the iOS 4 SDK and as my root OS X partition is rather (too) small, I put it into a custom location /Users/Developer.Snowleopard/. This causes the iPhone Simulator to crash and compiling gives an error like: ibtool failed with exception: Interface Builder encountered an error communicating with the iPhone Simulator. If […]

XCode: missing „deprecated“ warnings

when developing for long-term use, you want to use APIs that aren’t likely to be removed soon, a.k.a. „deprecated“. So, don’t use downward compatible calls below a point you really aim for. XCode helps with compiler warnings about „deprecated“ calls – if „Project -> Edit Project Settings -> GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS“ is set: But be careful, this […]

underretain in CoreAnimation / iPhone Simulator

After upgrading to Snow Leopard and XCode 3.2.1 I’ve seen such console output CAUnderRetain(32139,0xa0391500) malloc: *** error for object 0x3838000: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug when rotating the iPhone Simulator in a project with base SDK 3.0. This can be reproduced as follows: Create a fresh […]

Upgrade to Snow Leopard

Mac OS X 10.6 Snow Leopard (partition 25G, HFS+ Journaled, Upper/Lower) Mac OS X 10.5 Leopard (partition 25G, HFS+ Journaled, Upper/Lower) partition userspace 100G, HFS+ Journaled, Upper/Lower $ cat /etc/fstab # mount partition "userspace" as /Users UUID=D016E3FD-E322-3006-A8F5-D2348C6A5B7B /Users hfs rw,auto$ cat /etc/fstab # mount partition "userspace" as /Users UUID=D016E3FD-E322-3006-A8F5-D2348C6A5B7B /Users hfs rw,auto create user „mig“ […]

Unit Testing / iPhone

Having Eclipse & JUnit in mind I missed unit testing quite a bit while developing with XCode for iPhone. As a first shot, I set SenTestingKit up as explained by it’s author and it works really nicely. One thing I still miss is Step’n’Trace debugging the tests. Other intros to the topic from Apple about […]