Skip to content

Commit 40c99f4

Browse files
committed
swift 5 plus build fix
1 parent b9b4a09 commit 40c99f4

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

Source/Print/Print.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public extension Stuff {
1616
/**
1717
Enumeration of the log levels
1818
*/
19-
public enum logLevel: Int {
19+
enum logLevel: Int {
2020
// Make sure all log events goes to the device log
2121
case productionLogAll = 0
2222
// Informational loging, lowest level
@@ -56,12 +56,12 @@ public extension Stuff {
5656
/**
5757
Set the minimum log level. By default set to .info which is the minimum. Everything will be loged.
5858
*/
59-
public static var minimumLogLevel: logLevel = .info
59+
static var minimumLogLevel: logLevel = .info
6060

6161
/**
6262
The print command for writing to the output window
6363
*/
64-
public static func print<T>(_ object: T, _ level: logLevel = (T.self is Error.Type ? .error : .debug), filename: String = #file, line: Int = #line, funcname: String = #function, trace: [String] = Thread.callStackSymbols) {
64+
static func print<T>(_ object: T, _ level: logLevel = (T.self is Error.Type ? .error : .debug), filename: String = #file, line: Int = #line, funcname: String = #function, trace: [String] = Thread.callStackSymbols) {
6565
if level.rawValue >= Stuff.minimumLogLevel.rawValue {
6666
let dateFormatter = DateFormatter()
6767
dateFormatter.dateFormat = "MM/dd/yyyy HH:mm:ss:SSS"
@@ -70,9 +70,9 @@ public extension Stuff {
7070
let file = URL(string: filename)?.lastPathComponent ?? ""
7171
let traceOutput: String = trace.map { "\t\t\($0)" }.reduce("\n") { "\($0)\n\($1)" }
7272
let output: String = object is Error ? "\((object as! Error).localizedDescription)\(traceOutput)" : "\(object)"
73-
var logText = "\n\(level.description()) .\(level)\(dateFormatter.string(from: Foundation.Date())) 📱 \(process.processName) [\(process.processIdentifier):\(threadId)] 📂 \(file)(\(line)) ⚙️ \(funcname) ➡️\r\t\(output)"
73+
let logText = "\n\(level.description()) .\(level)\(dateFormatter.string(from: Foundation.Date())) 📱 \(process.processName) [\(process.processIdentifier):\(threadId)] 📂 \(file)(\(line)) ⚙️ \(funcname) ➡️\r\t\(output)"
7474
if Stuff.minimumLogLevel == .productionLogAll {
75-
if #available(iOSApplicationExtension 10.0, *) {
75+
if #available(iOS 10.0, *) {
7676
let log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "Stuff")
7777
os_log("%{public}@", log: log, logText)
7878
} else {

Stuff.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "Stuff"
3-
s.version = "1.1.0"
3+
s.version = "1.1.1"
44
s.summary = "Too small for a library, too important to just forget"
55

66
s.description = <<-EOS

Stuff.xcodeproj/project.pbxproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
isa = PBXProject;
107107
attributes = {
108108
LastSwiftUpdateCheck = 0820;
109-
LastUpgradeCheck = 0930;
109+
LastUpgradeCheck = 1020;
110110
ORGANIZATIONNAME = evict;
111111
TargetAttributes = {
112112
7F29F3761E4E05070048B915 = {
@@ -119,7 +119,7 @@
119119
};
120120
buildConfigurationList = 7F29F35E1E4E05070048B915 /* Build configuration list for PBXProject "Stuff" */;
121121
compatibilityVersion = "Xcode 3.2";
122-
developmentRegion = English;
122+
developmentRegion = en;
123123
hasScannedForEncodings = 0;
124124
knownRegions = (
125125
en,
@@ -203,6 +203,7 @@
203203
isa = XCBuildConfiguration;
204204
buildSettings = {
205205
ALWAYS_SEARCH_USER_PATHS = NO;
206+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
206207
CLANG_ANALYZER_NONNULL = YES;
207208
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
208209
CLANG_CXX_LIBRARY = "libc++";
@@ -262,6 +263,7 @@
262263
isa = XCBuildConfiguration;
263264
buildSettings = {
264265
ALWAYS_SEARCH_USER_PATHS = NO;
266+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
265267
CLANG_ANALYZER_NONNULL = YES;
266268
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
267269
CLANG_CXX_LIBRARY = "libc++";

0 commit comments

Comments
 (0)