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
Pod::Spec.new do |s| | |
s.name = 'AviarySDK' | |
s.version = '4.2.0' | |
s.summary = "Aviary's photo editing SDK for iOS." | |
s.homepage = 'http://developers.aviary.com/docs/ios' | |
s.license = { | |
:type => 'Commercial', | |
:text => <<-LICENSE | |
Copyright (c) 2014 Aviary, Inc. All rights reserved. | |
LICENSE |
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
#import <Foundation/Foundation.h> | |
enum { | |
LXMonday = 1 << 0, | |
LXTuesday = 1 << 1, | |
LXWednesday = 1 << 2, | |
LXThursday = 1 << 3, | |
LXFriday = 1 << 4, | |
LXSaturday = 1 << 5, | |
LXSunday = 1 << 6, |
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
typedef void (^LXSResumeBlock)(void); | |
typedef void (^LXSRunLoopBlock)(LXSResumeBlock resume); | |
// Call resume() to stop the block from exercising the run loop and break out of the loop/block. | |
// Failure to call resume() will cause the test to hang indefinitely. | |
// This is useful to testing asynchronous actions like AFNetworking operations. See https://gist.github.com/2215212 | |
// With some reference from https://github.com/icanzilb/MTTestSemaphore, I was able to simplify this method. | |
inline void LXS_exercisesRunLoopInBlock(LXSRunLoopBlock block) { | |
__block BOOL keepRunning = YES; | |
block(^{ keepRunning = NO; }); | |
while (keepRunning && [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.03]]) { |
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
- (IRGeoInterceptor *)interceptorWithDelegate:(id<MKMapViewDelegate>)theDelegate { | |
if (_interceptor == nil) { | |
_interceptor = [[IRGeoInterceptor alloc] init]; | |
_interceptor.middleMan = self; | |
_interceptor.receiver = theDelegate; | |
[super setDelegate:(id<MKMapViewDelegate>)_interceptor]; | |
} | |
return _interceptor; |
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
#import "ProxyView.h" | |
@implementation ProxyView | |
@synthesize targetView = _targetView; | |
- (UIView *)hitTest:(CGPoint)thePoint withEvent:(UIEvent *)theEvent { | |
return [self.targetView hitTest:thePoint withEvent:theEvent]; | |
} |
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
# The decoded `purchase-info` from `SKPaymentTransaction`: | |
{ | |
bid = "com.example.app"; | |
bvrs = 7; | |
"item-id" = 580191698; | |
"original-purchase-date" = "2012-11-27 15:26:42 Etc/GMT"; | |
"original-purchase-date-ms" = 1354030002000; | |
"original-purchase-date-pst" = "2012-11-27 07:26:42 America/Los_Angeles"; | |
"original-transaction-id" = 1000000059318468; |
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
# Base on http://stackoverflow.com/a/12839484/379604 and https://github.com/capistrano/capistrano/blob/master/lib/capistrano/recipes/deploy/assets.rb | |
namespace :deploy do | |
namespace :assets do | |
desc <<-DESC | |
Run the asset precompilation rake task locally. You can specify the \ | |
full path to the rake executable by setting the rake variable. You \ | |
can also specify additional environment variables to pass to rake via \ | |
the asset_env variable. The defaults are: | |
set :rake, "rake" |
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)modifySelectedString: (NSDictionary *)theAttribute { | |
NSString *mainString = [self.mainStringLabel.attributedText string]; | |
NSString *queryString = [self selectStringFromMainStringLabelViaStepper]; | |
NSRange selectedStringRange = NSMakeRange(0, mainString.length); | |
while (selectedStringRange.location != NSNotFound) { | |
NSRange selectedStringRange = [mainString rangeOfString:queryString options:0 range:selectedStringRange]; | |
if (selectedStringRange.location != NSNotFound) { | |
[self addAttributeWithRangeToSelectedString:theAttribute range:selectedStringRange]; |
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
if [ "$RUN_UNIT_TEST_WITH_IOS_SIM" = "YES" ]; then | |
test_bundle_path="$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.$WRAPPER_EXTENSION" | |
ios-sim launch "$(dirname "$TEST_HOST")" --setenv DYLD_INSERT_LIBRARIES=/../../Library/PrivateFrameworks/IDEBundleInjection.framework/IDEBundleInjection --setenv XCInjectBundle="$test_bundle_path" --setenv XCInjectBundleInto="$TEST_HOST" --args -SenTest All "$test_bundle_path" 2> log.txt | |
echo "Finished running tests with ios-sim" | |
failure=$(grep -q "with 0 failures" log.txt; echo $?) | |
if [ $failure != 0 ]; then | |
printf "\n" | |
grep --color=always "error:" log.txt | |
fi | |
rm log.txt |
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
sudo dscl . append /Groups/_developer GroupMembership $USER | |
sudo DevToolsSecurity -enable | |
sudo -S su $USER -l -c "instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate \"$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.$WRAPPER_EXTENSION\" -e UIASCRIPT \"$PROJECT_DIR/UIAutomations/uia_tap_on_unit_conversion.js\" -e UIARESULTSPATH \"$PROJECT_DIR/logs/\"" |
OlderNewer