This gist has moved to https://github.com/0xced/ABGetMe
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
#!/usr/bin/env ruby | |
# Xcode auto-versioning script for Subversion by Axel Andersson | |
# Updated for git by Marcus S. Zarra and Matt Long | |
# Converted to ruby by Abizer Nasir | |
# Appends the git sha to the version number set in Xcode. | |
# see http://www.stompy.org/2008/08/14/xcode-and-git-another-build-script/ for more details | |
# These are the common places where git is installed. | |
# Change this if your path isn't here |
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
// UIPickerView_SelectionBarLabelSupport.h | |
// | |
// This file adds a new API to UIPickerView that allows to easily recreate | |
// the look and feel of UIDatePicker labeled components. | |
// | |
// Copyright (c) 2009, Andrey Tarantsov <[email protected]> | |
// | |
// Permission to use, copy, modify, and/or distribute this software for any | |
// purpose with or without fee is hereby granted, provided that the above | |
// copyright notice and this permission notice appear in all copies. |
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
// | |
// KSDIdlingWindow.h | |
// | |
// Created by Brian King on 4/13/10. | |
// Copyright 2010 King Software Designs. All rights reserved. | |
// | |
// Based off: | |
// http://stackoverflow.com/questions/273450/iphone-detecting-user-inactivity-idle-time-since-last-screen-touch | |
// |
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
@try | |
{ | |
id textView = [mailComposeViewController valueForKeyPath:@"internal.mailComposeView.textView"]; | |
if ([textView respondsToSelector:@selector(becomeFirstResponder)]) | |
[textView becomeFirstResponder]; | |
} | |
@catch (NSException *e) {} |
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
- (void)logDetailedError:(NSError *)error from:(id)caller selector:(SEL)selector | |
{ | |
#if DEBUG | |
LogMessage(@"coredata", 0, @"*** CORE DATA ERROR: a data store operation failed"); | |
LogMessage(@"coredata", 0, @"*** Caller was: %@ %p %@", [caller class], caller, NSStringFromSelector(selector)); | |
LogMessage(@"coredata", 0, @"*** Error: %@", [error localizedDescription]); | |
NSArray* detailedErrors = [[error userInfo] objectForKey:NSDetailedErrorsKey]; | |
if ([detailedErrors count] > 0) | |
{ | |
for(NSError* detailedError in detailedErrors) |
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
From PrivateFrameworks/Bom.framework: | |
U _BOMCopierCopyWithOptions | |
U _BOMCopierCountFilesInArchive | |
U _BOMCopierFree | |
U _BOMCopierNew | |
U _BOMCopierSetCopyFileFinishedHandler | |
U _BOMCopierSetCopyFileStartedHandler | |
U _BOMCopierSetCopyFileUpdateHandler | |
U _BOMCopierSetFatalErrorHandler | |
U _BOMCopierSetFatalFileErrorHandler |
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
@implementation IRWebViewController (irFullscreenMediaPlaybackAutorotationLayoutFix) | |
- (void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { | |
// There is a bug, where launching a media player from the web view, fullscreening it, then rotating the device, and tapping on the media to see the timelime, causes the layout to go all berserk. This is a hack to combat that. | |
[super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; | |
if ((!self.view.superview) || (self.parentViewController.modalViewController != self) || (self.modalPresentationStyle != UIModalPresentationFullScreen)) { |
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
# Xcode Auto-Versioning | |
# | |
# Updates your Info.plist's CFBundleVersion with the current git tag and/or sha. | |
# | |
# based on https://github.com/elliottcable/xcode-git-versioner | |
# | |
# Usage: | |
# 1. Right-click the target you want to add the versioning phase to (usually the target that builds your app) | |
# 2. Select: Add -> New Build Phase -> New Run Script Build Phase | |
# 3. Specify /usr/bin/env ruby as the shell for the script |
OlderNewer