Wednesday, April 2, 2014

how to find unused images from Xcode


#!/bin/sh
PROJ=`find . -name '*.xib' -o -name '*.[mh]'`

for png in `find . -name '*.png'`
do
    name=`basename $png`
    if ! grep -q $name $PROJ; then
        echo "$png is not referenced"
    fi
done


Credit:
http://mfaizanshaikh.wordpress.com/2012/12/17/how-to-remove-unused-images-from-xcode-project/

Wednesday, October 16, 2013

SVN missing in Mac OS X 10.8

After upgrading to Mountain Lion am unable to launch my SVNX tool (used to access SVN source control). Then I figured out Subverion library are not coming with by default with OS upgrade. Fix is given below:
Credit: http://blog.grapii.com/2012/08/svn-missing-in-mac-os-x-10-8-mountain-lion/

Old iOS SDKs in Xcode 5

How to build your app with sdk6.1 in Xcode 5. Because when you want to debug the iOS7 device with XCode 4 is not possible.

Credit: http://blog.spacemanlabs.com/2013/09/how-to-support-old-ios-sdks-in-xcode-5

Wednesday, April 10, 2013

Nexus 4 - config email signature

Credit:

http://www.dummies.com/how-to/content/how-to-create-an-email-signature-on-your-nexus-7.html

Monday, February 4, 2013

Get iOS Device Platform



#include
#include


/*
 Platforms
 iPhone1,1 -> iPhone 2G
 iPhone1,2 -> iPhone 3G
 iPhone2,1 -> iPhone 3GS
 iPhone3,1 -> iPhone 4 GSM
 iPhone3,3 -> iPhone 4 CDMA
 iPhone4,1 -> iPhone 4S
 iPod1,1   -> iPod touch 1G
 iPod2,1   -> iPod touch 2G
 iPod3,1   -> iPod touch 3G
 iPad1,1   -> iPad (Wifi or GSM)
 iPad2,1   -> iPad 2 Wifi
 iPad2,2   -> iPad 2 GSM
 iPad2,3   -> iPad 2 CDMA
 */
+ (NSString *) devicePlatform
{
    size_t size;
    sysctlbyname("hw.machine", NULL, &size, NULL, 0);
    char *machine = (char *)malloc(size);
    sysctlbyname("hw.machine", machine, &size, NULL, 0);
    NSString *platform = [NSString stringWithCString: machine encoding: NSUTF8StringEncoding]; 
    free(machine);
    return platform;
}

iOS6.1 - Tested.

Friday, February 1, 2013

Unit Test Case Configuration in Xcode 4

https://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/UnitTesting/00-About_Unit_Testing/about.html