This file contains hidden or 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) { |
This file contains hidden or 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 hidden or 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 |