Skip to content

Instantly share code, notes, and snippets.

View pitfield's full-sized avatar

David Pitfield [dbp] pitfield

View GitHub Profile
@pitfield
pitfield / SASLPrep.swift
Last active July 12, 2020 20:11
Swift implementation of SASLPrep (RFC 4013)
//
// SASLPrep.swift
//
// Copyright 2020 David Pitfield
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
@pitfield
pitfield / BitshiftBenchmark.swift
Last active July 6, 2020 22:34
Swift bitshift operators << and >> are surprisingly slow in unoptimized builds.
//
// BitshiftBenchmark
//
// Copyright 2020 David Pitfield
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
@pitfield
pitfield / Create an iOS app with Swift Package Manager dependencies.md
Last active July 18, 2023 01:34
Create an iOS app with Swift Package Manager dependencies

Create an iOS app with Swift Package Manager dependencies

CAUTION: This information is mostly obsolete. Xcode 11 allows a project to directly declare its Swift Package Manager dependencies.

This gist walks through creating an Xcode project for an iOS app that consumes packages in Swift Package Manager (SPM).

We'll be using Xcode 10.2 and Swift 5.

Scenario