Author: Chris Lattner
// | |
// Keychain.swift | |
// SecKeychain | |
// | |
// Created by Paul Wagener on 01-11-17. | |
// Copyright © 2017 Paul Wagener. All rights reserved. | |
// | |
import Foundation |
localeIdentifier | Description | |
---|---|---|
eu | Basque | |
hr_BA | Croatian (Bosnia & Herzegovina) | |
en_CM | English (Cameroon) | |
en_BI | English (Burundi) | |
rw_RW | Kinyarwanda (Rwanda) | |
ast | Asturian | |
en_SZ | English (Swaziland) | |
he_IL | Hebrew (Israel) | |
ar | Arabic |
extension DispatchQueue { | |
class func mainSyncSafe(execute work: () -> Void) { | |
if Thread.isMainThread { | |
work() | |
} else { | |
DispatchQueue.main.sync(execute: work) | |
} | |
} | |
class func mainSyncSafe<T>(execute work: () throws -> T) rethrows -> T { |
I am trying to determine if it is possible to build a Swift dynamic library which is itself composed of one of more private modules, without needing to expose to that fact to outside users. My hope was that I could build the private module as a static library, which would be linked into the primary (dynamic) library. The dylib
could then be deployed together with its swiftmodule
and swiftdoc
and be imported, with the private module and its symbols not being exposed at all.
Unfortunately, what I'm currently observing seems to indicate that the private module's swiftmodule
also has to be available for the primary library to be successfully imported.
This can be reproduced as follows. I have the following directory structure:
./Greeter/Logger/Logger.swift
:
public func log(_ message: String) {
- Introduction to Functional Programming Johannes Weiß - https://vimeo.com/100786088
- ReactiveCocoa at MobiDevDay Andrew Sardone - https://vimeo.com/65637501
- The Future Of ReactiveCocoa Justin Spahr-Summers - https://www.youtube.com/watch?v=ICNjRS2X8WM
- Enemy of the State Justin Spahr-Summers - https://www.youtube.com/watch?v=7AqXBuJOJkY
- WWDC 2014 Session 229 - Advanced iOS Application Architecture and Patterns Andy Matuschak - https://developer.apple.com/videos/play/wwdc2014/229/
- Functioning as a Functionalist Andy Matuschak - https://www.youtube.com/watch?v=rJosPrqBqrA
- Controlling Complexity in Swift Andy Matuschak - https://realm.io/news/andy-matuschak-controlling-complexity/
/// An object that has some tear-down logic | |
public protocol Disposable { | |
func dispose() | |
} | |
/// An event provides a mechanism for raising notifications, together with some | |
/// associated data. Multiple function handlers can be added, with each being invoked, | |
/// with the event data, when the event is raised. | |
public class Event<T> { |
(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.
package com.someco.cmis.examples; | |
import java.io.ByteArrayInputStream; | |
import java.io.InputStream; | |
import java.math.BigInteger; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import org.apache.chemistry.opencmis.client.api.Document; |