This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run script to increase CFBundleVersion by 1 each time a build is archived under release or adhoc | |
#!/bin/sh | |
if [ "$CONFIGURATION" == Adhoc || "$CONFIGURATION" == Release ]; then | |
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") | |
buildNumber=$(($buildNumber + 1)) | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE" | |
fi | |
# Run script to set CFBundleVersion to local latest git commit hash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.DS_Store | |
*.swp | |
*~.nib | |
build/ | |
*.pbxuser | |
*.perspective | |
*.perspectivev3 | |
*.mode1v3 | |
*.mode2v3 | |
*.mode1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// AGSynthesizeSingleton.h | |
// Agnomical SDK | |
// | |
// Created by Andrew Garn on 22/03/2012. | |
// Copyright (c) 2012 Andrew Garn. All rights reserved. | |
// | |
/** | |
Singleton interface method macro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSDate+AGCategory.h | |
// AGFoundation | |
// | |
// Created by Andrew Garn on 23/07/2012. | |
// Copyright (c) 2012 Andrew Garn. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSURL+AGCategory.m | |
// AGFoundation | |
// | |
// Created by Andrew Garn on 24/07/2012. | |
// Copyright (c) 2012 Andrew Garn. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import <UIKit/UIKit.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSString *requestPath = [NSString stringWithFormat:@"http://itunes.apple.com/lookup?id=%@", @"528968746"]; | |
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:requestPath]]; | |
AFJSONRequestOperation *operation = [[AFJSONRequestOperation alloc] initWithRequest:request]; | |
[operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { | |
NSArray *results = [responseObject objectForKey:@"results"]; | |
if (results && [results isKindOfClass:[NSArray class]] && [results count] > 0) { | |
NSString *resultVersion = [[results objectAtIndex:0] objectForKey:@"version"]; | |
NSString *installedVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; | |
if ([installedVersion compare:resultVersion options:NSNumericSearch] == NSOrderedAscending) { |