Tag Archives: programming

Blocks, closures on stack and heap

Blocks on the Stack While reading through Apple’s open source code (headers) I came across queue.h and stumbled over the following warning: /*! * […] * * dispatch_block_t block; * * if (x) { * block = ^{ printf("true\n"); }; … Continue reading

Posted in computer | Tagged , , , , , , , , | Leave a comment

Property: strong and copy

Property: strong and copy // // main.m // strong_retain_copy // // Created by Christopher Loessl on 25/02/14. // Copyright (c) 2014 Christopher Loessl. All rights reserved. // #import <Foundation/Foundation.h> @interface Person : NSObject @property (strong, nonatomic) NSString *name; @property (copy, … Continue reading

Posted in computer | Tagged , , , , , | Leave a comment

Multiple Xcode targets and tests

Multiple Xcode targets Go to targets -> Select target -> Duplicate (I duplicated a target which name was “tests”) Rename the target to whatever you want (I use “Tooth” here) Go to “Manage Schemes” and delete the scheme with the … Continue reading

Posted in computer | Tagged , , , , , , , | Leave a comment

Deep Wizardry: Stack Unwinding

Nice blog post about stack unwinding.

Posted in computer | Tagged , , | Leave a comment

Automatically increment build number (CFBundleVersion)

David wrote this nice little helper that automatically increments the build version every time. #!/bin/bash buildNumber=$(/usr/libexec/PlistBuddy -c “Print CFBundleVersion” “$INFOPLIST_FILE”) buildNumber=$(echo $buildNumber | sed ‘s/0*//’) buildNumber=$(($buildNumber + 1)) buildNumber=$(printf “%04d” $buildNumber) /usr/libexec/PlistBuddy -c “Set :CFBundleVersion $buildNumber” “$INFOPLIST_FILE” In Xcode just … Continue reading

Posted in computer | Tagged , , , , , , , | Leave a comment