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
@interface AppDelegate() <GGLInstanceIDDelegate, GCMReceiverDelegate> | |
@property(nonatomic, strong) NSString *gcmSenderID; | |
@property(nonatomic, strong) NSDictionary *registrationOptions; | |
@end | |
@implementation AppDelegate | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>GCM_SENDER_ID</key> | |
<string>***************</string> | |
<key>PLIST_VERSION</key> | |
<string>1</string> | |
<key>BUNDLE_ID</key> | |
<string>com.example.testapp</string> |
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
// | |
// ViewController.m | |
// AVPlayerCaching | |
// | |
// Created by Anurag Mishra on 5/19/14. | |
// Sample code to demonstrate how to cache a remote audio file while streaming it with AVPlayer | |
// | |
#import "ViewController.h" | |
#import <AVFoundation/AVFoundation.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
#import <CommonCrypto/CommonCryptor.h> | |
#warning ADD Security.framework to your project | |
+ (NSData *)tripleDesEncryptData:(NSData *)inputData | |
key:(NSData *)keyData | |
error:(NSError **)error | |
{ | |
NSParameterAssert(inputData); | |
NSParameterAssert(keyData); |
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
// | |
// UIView+CustomTimingFunction.h | |
// Instants | |
// | |
// Created by Christian Giordano on 16/10/2013. | |
// Copyright (c) 2013 Christian Giordano. All rights reserved. | |
// | |
#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
# xcode-build-bump.sh | |
# @desc Auto-increment the build number every time the project is run. | |
# @usage | |
# 1. Select: your Target in Xcode | |
# 2. Select: Build Phases Tab | |
# 3. Select: Add Build Phase -> Add Run Script | |
# 4. Paste code below in to new "Run Script" section | |
# 5. Drag the "Run Script" below "Link Binaries With Libraries" | |
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0) |
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
// | |
// UIView+Parallax.h | |
// | |
#import <Foundation/Foundation.h> | |
@interface UIView (Parallax) | |
-(void)addBackgroundParallax:(CGFloat)strength; | |
-(void)addForegroundParallax:(CGFloat)strength; | |
-(void)removeParallax; |
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 bash | |
rm -rf "${HOME}/Library/Caches/CocoaPods" | |
rm -rf "`pwd`/Pods/" | |
pod update |
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
function xc { | |
bold=$(tput bold) | |
normal=$(tput sgr0) | |
xcode_proj=`find . -name "*.xc*" -d 1 | sort -r | head -1` | |
if [[ `echo -n $xcode_proj | wc -m` == 0 ]] | |
then | |
echo "No xcworkspace/xcodeproj file found in the current directory." | |
else | |
echo "Opening ${bold}\033[1;32m$xcode_proj" | |
open "$xcode_proj" |