Skip to content

Instantly share code, notes, and snippets.

View ShantiSR's full-sized avatar

Shanti Rodríguez ShantiSR

View GitHub Profile
//
// UIDeviceHardware.h
//
// Used to determine EXACT version of device software is running on.
#import <Foundation/Foundation.h>
@interface UIDeviceHardware : NSObject
- (NSString *) platform;
@ShantiSR
ShantiSR / pns.m
Created March 3, 2014 21:33 — forked from subdigital/pns.m
// Property Nonatomic Strong
// Platform: All
// Completion Scopes: ClassInterfaceMethods
@property (nonatomic, strong) <# class_name #> *<# variable_name #>;
#!/bin/sh
# Increments automatically CFBundleVersion or CFBundleVersion and CFBundleShortVersionString depending if it's a Debug or Release version.
# Created by Luis Ascorbe on 12/04/13.
# Copyright 2013 Luis Ascorbe. All rights reserved.
# Instructions
# 1- Put this file on the same folder where it's the .xcodeproj file
# 2- Create a new Run Script on Build Phases BEFORE Compile Sources
# 3- Rename it as "Auto Increment Version" (or whatever you want)
# /bin/bash
#Usage: $ ./cs_xproj_validate.sh path/to/xcode/project/file/theproject.xcodeproj
#More info: http://stackoverflow.com/q/13962341/89035
PROJECT_FILE="$1/project.pbxproj"
PREVIOUS_LINE=-1
for LINE in `cat "$PROJECT_FILE" | grep -n CODE_SIGN_IDENTITY | grep -o -E '^([0-9]*)'`
<?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>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
<?php
// Put your device token here (without spaces):
$deviceToken = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
// Put your private key's passphrase here:
$passphrase = 'xxxxxxx';
// Put your alert message here:
$message = 'A push notification has been sent!';