Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
I was following the examples in a post but rewrote the mathematical terminology so that it read a little bit easier.
A simple RSA example showing how to generate a public and private key pair for asymmetric encryption.
Worth a read for some more context.
Create the file in the root of the project (where your Package.swift
file lives as well), and use the following contents:
/// Package.xcconfig
/** | |
* Copyright (c) John Sundell 2017 | |
* Licensed under the MIT license | |
*/ | |
import Foundation | |
import XCTest | |
/** | |
* Assert that an expression throws a given error |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
// | |
// SpinlockTestTests.swift | |
// SpinlockTestTests | |
// | |
// Created by Peter Steinberger on 04/10/2016. | |
// Copyright © 2016 PSPDFKit GmbH. All rights reserved. | |
// | |
import XCTest |
# or exclude libs/ folder | |
find src -name "?*.*" ! -regex ".*libs.*" -exec /usr/local/bin/cpplint --filter=-build/header_guard,-runtime/references {} \; |
return
keyword. Don't add semicolons except where syntactically demanded in statements or to separate statements on the same line.var
when let
is appropriate, especially for properties. The compiler better optimizes let
statements for items whose values will not change during their lifetime. For example, Apple writes, "It is good practice to create immutable collections in all cases where the collection does not need to change. Doing so enables the Swift compiler to optimize the performance of the collections you create."(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// | |
// UIDeviceHardware.h | |
// | |
// Used to determine EXACT version of device software is running on. | |
#import <Foundation/Foundation.h> | |
@interface UIDeviceHardware : NSObject | |
- (NSString *) platform; |