Tag Archives: development

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

iTunes Link Maker

Create links for the iTunes Store, the App Store, the iBookstore, and the Mac App Store. With Link Maker, you can create links to content on the iTunes Store, the App Store, the iBookstore, and the Mac App Store, and … Continue reading

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

iOS localization with iLocalize

I did it once and now I needed to do it again – and of course I forgot how to do it, so this time I’ll write it down how localisation of an iOS project works. I don’t use nib … Continue reading

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

git diff and objective c

When you are writing Objective-C code and using git you probably realised that the `git diff` is not mentioning the function name in which the change occurred. This can easily be changed by just running following cmd inside your git … 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

Send broadcast messages to android

Faking a received SMS: adb shell am broadcast -a android.provider.Telephony.SMS_RECEIVED

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

common.h

So I got sick with NSLog and wrote myself a simple wrapper which you can find here. The Syntax is the same but the printout is why nicer to read, it looks like this: 2013-09-02 17:00:49.543 AppName[4841:a0b] (FilterAppDelegate.m:15 -[FilterAppDelegate application:didFinishLaunchingWithOptions:]) … Continue reading

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

ActivityManager | isUserAMonkey()

public static boolean isUserAMonkey Added in API level 8 Returns “true” if the user interface is currently being messed with by a monkey. Update: There are more: public void fyiWillBeAdvancedByHostKThx () Added in API level 11 Called by an AppWidgetHost … Continue reading

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