Skip to content

Instantly share code, notes, and snippets.

@kenwilcox
kenwilcox / CarthageDistribution.md
Last active August 29, 2015 14:17
Building Alamofire framework for app distribution

Yesterday I was playing with Carthage for the first time. I got Alamofire to download and build in the simulator just fine.

However, when I tried to upload it to iTunes Connect it failed with PIE errors, invalid iOS min version... and something else, I don't remember...

What I did to get it to work:

  • Opened up the Alamofire workspace that Carthage downloaded for me.
  • On the project tab set the deployment target to 8.0
  • In Info.plist added MinimumOSVersion, string value of 8.0
  • Saved the project
  • Opened terminal to the Carthage/Checkouts/Alamofire directory
@kenwilcox
kenwilcox / AddSlash.markdown
Last active August 29, 2015 14:21
AddSlash

AddSlash ('-' * 8) Wanted to create a function that added a slash to a url path, but only if it was needed. Also wanted it to be able to ignore any query string items

A Pen by kenwilcox on CodePen.

License.

@kenwilcox
kenwilcox / gist:796f035fbe1a579e4a2c8489aeacdfc3
Created September 11, 2016 21:42 — forked from adamstac/gist:8347083
Enable HiDPI mode on a VMware Fusion OS X 10.9 Mavericks Vagrant VM
  1. Set "Use full resolution for Retina display" in the VM's Settings > Display
  2. Run this command in Terminal sudo defaults write /Library/Preferences/com.apple.windowserver.plist DisplayResolutionEnabled -bool true
  3. In System Preferences, set the display to "scaled" using the resolution 1292 x 807 (HiDPI)
  4. Enjoy.
@kenwilcox
kenwilcox / fizz buzz.swift
Created June 23, 2017 05:07
FizzBuzz Count
var counter = [
"fizz": 0,
"buzz": 0,
"fizzbuzz": 0,
"numbers": 0
]
for i in 1...100 {
switch i {
case let x where (x % 3) == 0 && (x % 5) == 0: