Skip to content

Instantly share code, notes, and snippets.

View marciok's full-sized avatar
🎯
Focusing

Marcio Klepacz marciok

🎯
Focusing
View GitHub Profile

Resetting Permissions

iOS 8

Push notification

  1. Delete your app from the device.
  2. Turn the device off completely and turn it back on.
  3. Go to Settings > General > Date & Time and set the date ahead a day or more.
  4. Turn the device off completely again and turn it back on.

Contacts, Calendar, Reminders, Photos, Bluetooth, Sharing Microphone, Twitter, Facebook

  1. Go to Settings > General > Reset
<?php
// Put your device token here (without spaces):
$deviceToken = 'device token';
// Put your private key's passphrase here:
$passphrase = 'pass phrase';
// Put your alert message here:
$message = 'Seeking Alpha';

italics bold bold italic strikethrough

Header 1

Header 2

Header 3

Header 4

Header 5
@marciok
marciok / hannukiah
Created December 16, 2014 23:02
Hanukkiah
//// www.paintcodeapp.com
//// Color Declarations
let outerFlameColor = UIColor(red: 0.941, green: 0.906, blue: 0.572, alpha: 1.000)
let innerFlameColor = UIColor(red: 0.861, green: 0.137, blue: 0.137, alpha: 1.000)
let hanukkiahColor = UIColor(red: 0.455, green: 0.454, blue: 0.452, alpha: 1.000)
//// hanukkiah Drawing
var hanukkiahPath = UIBezierPath()
hanukkiahPath.moveToPoint(CGPointMake(120.5, 699.5))
@marciok
marciok / your-custom-build-script.sh
Created March 5, 2015 17:06
Adding an environment variable before building your app
# 1. Add an enviroment variable on your bundle identifier on Xcode for example:
# com.yourAppName.$(PRODUCT_NAME:rfc1034identifier).${MY_ENV_VARIBLE}.
# 2. You should have a custom build script to execute on travis, so your .travis.yml look like this:
# ....
# script:
# - ./your-custom-build-script.sh
# ....
# 3. Set a value to this variable before your build with travis:
export MY_ENV_VARIBLE="customName"
@marciok
marciok / Podfile
Last active August 29, 2015 14:17
Testing view controllers Podfile example
platform :ios, '8.0'
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target 'PonyTests', :exclusive => true do
pod 'Nimble', :git => 'https://github.com/Quick/Nimble.git' #, :branch => 'swift-1.1' # if you want to use swift 1.1
pod 'Quick', :git => 'https://github.com/Quick/Quick.git', # :branch => 'swift-1.1'
end
import Quick
import Nimble
import MyAppModule // Importing the app module
class HelloTest: QuickSpec {
override func spec() {
//...
}
}
public class MyPublicClass {
public var myPublicProperty: String?
public func myPublicFunc () {
//...
}
}
public class PonyTabController: UITabBarController {
override public func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
let userDefaults = NSUserDefaults.standardUserDefaults()
if !userDefaults.boolForKey("appIntroHasBeenPresented") {
let storyboard = UIStoryboard(name: "Main", bundle: NSBundle.mainBundle())
let appIntroViewController = storyboard.instantiateViewControllerWithIdentifier("appIntroViewControllerID") as! AppIntroViewController
import Quick
import Nimble
import Pony
class PonyTabBarControllerSpec: QuickSpec {
override func spec() {
var tabBarController: PonyTabController!
describe("viewDidAppear"){
describe("When app intro had never been dismissed"){