Kaynağa Gözat

Bye bye swifty beaver (#1765)

* replace SwiftyBeaver with SimpleLogger

* remove SwiftyBeaver framework
cyBerta 2 yıl önce
ebeveyn
işleme
44f264b682
39 değiştirilmiş dosya ile 759 ekleme ve 3805 silme
  1. 5 5
      DcCore/DcCore/DC/Logger.swift
  2. 8 0
      DcCore/DcCore/Helper/DateUtils.swift
  3. 0 22
      DcShare/Controller/ShareViewController.swift
  4. 0 1
      Podfile
  5. 1 5
      Podfile.lock
  6. 1 5
      Pods/Manifest.lock
  7. 685 706
      Pods/Pods.xcodeproj/project.pbxproj
  8. 0 21
      Pods/SwiftyBeaver/LICENSE
  9. 0 270
      Pods/SwiftyBeaver/README.md
  10. 0 190
      Pods/SwiftyBeaver/Sources/AES256CBC.swift
  11. 0 165
      Pods/SwiftyBeaver/Sources/Base64.swift
  12. 0 510
      Pods/SwiftyBeaver/Sources/BaseDestination.swift
  13. 0 72
      Pods/SwiftyBeaver/Sources/ConsoleDestination.swift
  14. 0 35
      Pods/SwiftyBeaver/Sources/Extensions.swift
  15. 0 229
      Pods/SwiftyBeaver/Sources/FileDestination.swift
  16. 0 283
      Pods/SwiftyBeaver/Sources/Filter.swift
  17. 0 129
      Pods/SwiftyBeaver/Sources/FilterValidator.swift
  18. 0 97
      Pods/SwiftyBeaver/Sources/GoogleCloudDestination.swift
  19. 0 628
      Pods/SwiftyBeaver/Sources/SBPlatformDestination.swift
  20. 0 212
      Pods/SwiftyBeaver/Sources/SwiftyBeaver.swift
  21. 0 25
      Pods/Target Support Files/Pods-deltachat-ios/Pods-deltachat-ios-acknowledgements.markdown
  22. 0 31
      Pods/Target Support Files/Pods-deltachat-ios/Pods-deltachat-ios-acknowledgements.plist
  23. 0 2
      Pods/Target Support Files/Pods-deltachat-ios/Pods-deltachat-ios-frameworks.sh
  24. 4 4
      Pods/Target Support Files/Pods-deltachat-ios/Pods-deltachat-ios.debug.xcconfig
  25. 4 4
      Pods/Target Support Files/Pods-deltachat-ios/Pods-deltachat-ios.release.xcconfig
  26. 3 3
      Pods/Target Support Files/Pods-deltachat-iosTests/Pods-deltachat-iosTests.debug.xcconfig
  27. 3 3
      Pods/Target Support Files/Pods-deltachat-iosTests/Pods-deltachat-iosTests.release.xcconfig
  28. 0 26
      Pods/Target Support Files/SwiftyBeaver/SwiftyBeaver-Info.plist
  29. 0 5
      Pods/Target Support Files/SwiftyBeaver/SwiftyBeaver-dummy.m
  30. 0 12
      Pods/Target Support Files/SwiftyBeaver/SwiftyBeaver-prefix.pch
  31. 0 16
      Pods/Target Support Files/SwiftyBeaver/SwiftyBeaver-umbrella.h
  32. 0 13
      Pods/Target Support Files/SwiftyBeaver/SwiftyBeaver.debug.xcconfig
  33. 0 6
      Pods/Target Support Files/SwiftyBeaver/SwiftyBeaver.modulemap
  34. 0 13
      Pods/Target Support Files/SwiftyBeaver/SwiftyBeaver.release.xcconfig
  35. 0 10
      Pods/Target Support Files/SwiftyBeaver/SwiftyBeaver.xcconfig
  36. 6 14
      deltachat-ios.xcodeproj/project.pbxproj
  37. 2 7
      deltachat-ios/AppDelegate.swift
  38. 0 26
      deltachat-ios/DC/DcLogger.swift
  39. 37 0
      deltachat-ios/Helper/SimpleLogger.swift

+ 5 - 5
DcCore/DcCore/DC/Logger.swift

@@ -1,8 +1,8 @@
 import Foundation
 public protocol Logger {
-    func verbose(_ message: String)
-    func debug(_ message: String)
-    func info(_ message: String)
-    func warning(_ message: String)
-    func error(_ message: String)
+    func verbose(_ message: Any...)
+    func debug(_ message: Any...)
+    func info(_ message: Any...)
+    func warning(_ message: Any...)
+    func error(_ message: Any...)
 }

+ 8 - 0
DcCore/DcCore/Helper/DateUtils.swift

@@ -90,4 +90,12 @@ public class DateUtils {
             return localDate
         }
     }
+
+    public static func getTimestamp() -> String {
+        let now = Date()
+        let formatter = DateFormatter()
+        formatter.timeZone = TimeZone.current
+        formatter.dateFormat = "HH:mm:ss:SSS"
+        return formatter.string(from: now)
+    }
 }

+ 0 - 22
DcShare/Controller/ShareViewController.swift

@@ -9,28 +9,6 @@ import SDWebImage
 
 class ShareViewController: SLComposeServiceViewController {
 
-    class SimpleLogger: Logger {
-        func verbose(_ message: String) {
-            print("ShareViewController", "verbose", message)
-        }
-
-        func debug(_ message: String) {
-            print("ShareViewController", "debug", message)
-        }
-
-        func info(_ message: String) {
-            print("ShareViewController", "info", message)
-        }
-
-        func warning(_ message: String) {
-            print("ShareViewController", "warning", message)
-        }
-
-        func error(_ message: String) {
-            print("ShareViewController", "error", message)
-        }
-    }
-
     let logger = SimpleLogger()
     let dcAccounts: DcAccounts = DcAccounts()
     lazy var dcContext: DcContext = {

+ 0 - 1
Podfile

@@ -11,7 +11,6 @@ target 'deltachat-ios' do
   pod 'SwiftFormat/CLI'
   # pod 'openssl-ios-bitcode'
   pod 'ReachabilitySwift'
-  pod 'SwiftyBeaver'
   pod 'SCSiriWaveformView'
   pod 'SDWebImage', '~> 5.9.1'
   pod 'SDWebImageWebPCoder'

+ 1 - 5
Podfile.lock

@@ -27,7 +27,6 @@ PODS:
   - Swifter (1.5.0)
   - SwiftFormat/CLI (0.40.9)
   - SwiftLint (0.47.0)
-  - SwiftyBeaver (1.9.4)
 
 DEPENDENCIES:
   - ReachabilitySwift
@@ -39,7 +38,6 @@ DEPENDENCIES:
   - Swifter
   - SwiftFormat/CLI
   - SwiftLint
-  - SwiftyBeaver
 
 SPEC REPOS:
   trunk:
@@ -53,7 +51,6 @@ SPEC REPOS:
     - Swifter
     - SwiftFormat
     - SwiftLint
-    - SwiftyBeaver
 
 EXTERNAL SOURCES:
   SVGKit:
@@ -77,8 +74,7 @@ SPEC CHECKSUMS:
   Swifter: e71dd674404923d7f03ebb03f3f222d1c570bc8e
   SwiftFormat: 6b67b6e7fe73d664f0cbb4f13721f130462c86a5
   SwiftLint: d41cc46a2ae58ac6d9f26954bc89f1d72e71fdef
-  SwiftyBeaver: 576177b2c5c94b3aedd5993914e91271a0524e88
 
-PODFILE CHECKSUM: 71221735c21ab13bc8d56c5fb5434a4f49d224b8
+PODFILE CHECKSUM: abcd97a81967a20c7f11502cfd961e9c787330f8
 
 COCOAPODS: 1.11.2

+ 1 - 5
Pods/Manifest.lock

@@ -27,7 +27,6 @@ PODS:
   - Swifter (1.5.0)
   - SwiftFormat/CLI (0.40.9)
   - SwiftLint (0.47.0)
-  - SwiftyBeaver (1.9.4)
 
 DEPENDENCIES:
   - ReachabilitySwift
@@ -39,7 +38,6 @@ DEPENDENCIES:
   - Swifter
   - SwiftFormat/CLI
   - SwiftLint
-  - SwiftyBeaver
 
 SPEC REPOS:
   trunk:
@@ -53,7 +51,6 @@ SPEC REPOS:
     - Swifter
     - SwiftFormat
     - SwiftLint
-    - SwiftyBeaver
 
 EXTERNAL SOURCES:
   SVGKit:
@@ -77,8 +74,7 @@ SPEC CHECKSUMS:
   Swifter: e71dd674404923d7f03ebb03f3f222d1c570bc8e
   SwiftFormat: 6b67b6e7fe73d664f0cbb4f13721f130462c86a5
   SwiftLint: d41cc46a2ae58ac6d9f26954bc89f1d72e71fdef
-  SwiftyBeaver: 576177b2c5c94b3aedd5993914e91271a0524e88
 
-PODFILE CHECKSUM: 71221735c21ab13bc8d56c5fb5434a4f49d224b8
+PODFILE CHECKSUM: abcd97a81967a20c7f11502cfd961e9c787330f8
 
 COCOAPODS: 1.11.2

Dosya farkı çok büyük olduğundan ihmal edildi
+ 685 - 706
Pods/Pods.xcodeproj/project.pbxproj


+ 0 - 21
Pods/SwiftyBeaver/LICENSE

@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Sebastian Kreutzberger
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.

+ 0 - 270
Pods/SwiftyBeaver/README.md

@@ -1,270 +0,0 @@
-<p align="center"><a href="https://swiftybeaver.com"><img src="https://cloud.githubusercontent.com/assets/564725/19889302/73b1ee84-a034-11e6-8753-2d060502397c.jpg" style="width: 888px;" alt="SwiftyBeaver"></a><br/><b>Colorful</b>, flexible, <b>lightweight</b> logging for Swift 3, Swift 4 & <b>Swift 5</b>.<br/>Great for <b>development & release</b> with support for Console, File & cloud platforms.<br/>Log <b>during release</b> to the conveniently built-in SwiftyBeaver Platform, the <b>dedicated Mac App</b> & <b>Elasticsearch</b>!<br/><br/><a href="http://docs.swiftybeaver.com">Docs</a> | <a href="https://swiftybeaver.com">Website</a> | <a href="https://twitter.com/SwiftyBeaver">Twitter</a> | <a href="#privacy">Privacy</a> | <a href="https://github.com/SwiftyBeaver/SwiftyBeaver/blob/master/LICENSE">License</a><br/></p>
-
-<p align="center"><a href="https://swift.org" target="_blank"><img src="https://img.shields.io/badge/Language-Swift%203,%204%20&%205-orange.svg" alt="Language Swift 2, 3, 4 & 5"></a> <a href="https://circleci.com/gh/SwiftyBeaver/SwiftyBeaver" target="_blank"><img src="https://circleci.com/gh/SwiftyBeaver/SwiftyBeaver/tree/master.svg?style=shield" alt="CircleCI"/></a><br/><p>
-
-----
-
-<br/>
-
-### During Development: Colored Logging to Xcode Console
-
-<img src="https://cloud.githubusercontent.com/assets/564725/18608323/ac065a98-7ce6-11e6-8e1b-2a062d54a1d5.png" width="608">
-
-[Learn more](http://docs.swiftybeaver.com/article/9-log-to-xcode-console) about colored logging to Xcode 8 Console with Swift 3, 4 & 5. For Swift 2.3 [use this Gist](https://gist.github.com/skreutzberger/7c396573796473ed1be2c6d15cafed34). **No need to hack Xcode 8 anymore** to get color. You can even customize the log level word (ATTENTION instead of ERROR maybe?), the general amount of displayed data and if you want to use the 💜s or replace them with something else 😉
-
-<br/>
-
-### During Development: Colored Logging to File
-
-<img src="https://cloud.githubusercontent.com/assets/564725/18608325/b7ecd4c2-7ce6-11e6-829b-7f8f9fe6ef2f.png" width="738">
-
-[Learn more](http://docs.swiftybeaver.com/article/10-log-to-file) about logging to file which is great for Terminal.app fans or to store logs on disk.
-
-<br/>
-
-
-### On Release: Encrypted Logging to SwiftyBeaver Platform
-
-<img src="https://cloud.githubusercontent.com/assets/564725/14281408/38d6a6ba-fb39-11e5-9584-34e3679bb1c5.jpg" width="700">
-
-[Learn more](http://docs.swiftybeaver.com/article/11-log-to-swiftybeaver-platform) about logging to the SwiftyBeaver Platform **during release!**
-
-<br/>
-
-
-### Browse, Search & Filter via Mac App
-
-![swiftybeaver-demo1](https://cloud.githubusercontent.com/assets/564725/14846071/218c0646-0c62-11e6-92cb-e6e963b68724.gif)
-
-Conveniently access your logs during development & release with our [free Mac App](https://swiftybeaver.com).
-
-<br/>
-
-
-### On Release: Enterprise-ready Logging to Your Private and Public Cloud
-
-<img src="https://user-images.githubusercontent.com/564725/34486363-dc501aec-efcf-11e7-92b2-1163cca9e7aa.jpg" width="700">
-
-[Learn more](https://swiftybeaver.com/enterprise.html) about **legally compliant**, end-to-end encrypted logging your own cloud with **SwiftyBeaver Enterprise**. Install via Docker or manual, fully-featured free trial included!
-
-<br/>
-
-### Google Cloud & More
-
-You can fully customize your log format, turn it into JSON, or create your own destinations. For example our [Google Cloud Destination](https://github.com/SwiftyBeaver/SwiftyBeaver/blob/master/Sources/GoogleCloudDestination.swift) is just another customized logging format which adds the powerful functionality of automatic server-side Swift logging when hosted on Google Cloud Platform.
-
-<br/>
-
-----
-
-<br/>
-<br/>
-
-## Installation
-
-- For **Swift 4 & 5** install the latest SwiftyBeaver version
-- For **Swift 3** install SwiftyBeaver 1.8.4
-- For **Swift 2** install SwiftyBeaver 0.7.0
-
-<br/>
-
-### Carthage
-
-You can use [Carthage](https://github.com/Carthage/Carthage) to install SwiftyBeaver by adding that to your Cartfile:
-
-Swift 4 & 5:
-``` Swift
-github "SwiftyBeaver/SwiftyBeaver"
-```
-
-
-Swift 3:
-``` Swift
-github "SwiftyBeaver/SwiftyBeaver" ~> 1.8.4
-```
-
-Swift 2:
-``` Swift
-github "SwiftyBeaver/SwiftyBeaver" ~> 0.7
-```
-
-<br/>
-
-### Swift Package Manager
-
-For [Swift Package Manager](https://swift.org/package-manager/) add the following package to your Package.swift file. Just Swift 4 & 5 are supported:
-
-``` Swift
-.package(url: "https://github.com/SwiftyBeaver/SwiftyBeaver.git", .upToNextMajor(from: "1.9.0")),
-```
-
-<br/>
-
-### CocoaPods
-
-To use [CocoaPods](https://cocoapods.org) just add this to your Podfile:
-
-Swift 4 & 5:
-``` Swift
-pod 'SwiftyBeaver'
-```
-
-Swift 3:
-``` Ruby
-target 'MyProject' do
-  use_frameworks!
-
-  # Pods for MyProject
-  pod 'SwiftyBeaver', '~> 1.8.4'
-end
-```
-
-Swift 2:
-``` Ruby
-target 'MyProject' do
-  use_frameworks!
-
-  # Pods for MyProject
-  pod 'SwiftyBeaver', '~> 0.7'
-end
-
-post_install do |installer|
-  installer.pods_project.build_configurations.each do |config|
-    # Configure Pod targets for Xcode 8 with Swift 2.3
-    config.build_settings['SWIFT_VERSION'] = '2.3'
-  end
-end
-```
-
-<br/>
-<br/>
-
-## Usage
-
-Add that near the top of your `AppDelegate.swift` to be able to use SwiftyBeaver in your whole project.
-
-``` Swift
-import SwiftyBeaver
-let log = SwiftyBeaver.self
-
-```
-
-At the the beginning of your `AppDelegate:didFinishLaunchingWithOptions()` add the SwiftyBeaver log destinations (console, file, etc.), optionally adjust the [log format](http://docs.swiftybeaver.com/article/20-custom-format) and then you can already do the following log level calls globally:
-
-``` Swift
-// add log destinations. at least one is needed!
-let console = ConsoleDestination()  // log to Xcode Console
-let file = FileDestination()  // log to default swiftybeaver.log file
-let cloud = SBPlatformDestination(appID: "foo", appSecret: "bar", encryptionKey: "123") // to cloud
-
-// use custom format and set console output to short time, log level & message
-console.format = "$DHH:mm:ss$d $L $M"
-// or use this for JSON output: console.format = "$J"
-
-// add the destinations to SwiftyBeaver
-log.addDestination(console)
-log.addDestination(file)
-log.addDestination(cloud)
-
-// Now let’s log!
-log.verbose("not so important")  // prio 1, VERBOSE in silver
-log.debug("something to debug")  // prio 2, DEBUG in green
-log.info("a nice information")   // prio 3, INFO in blue
-log.warning("oh no, that won’t be good")  // prio 4, WARNING in yellow
-log.error("ouch, an error did occur!")  // prio 5, ERROR in red
-
-// log anything!
-log.verbose(123)
-log.info(-123.45678)
-log.warning(Date())
-log.error(["I", "like", "logs!"])
-log.error(["name": "Mr Beaver", "address": "7 Beaver Lodge"])
-
-// optionally add context to a log message
-console.format = "$L: $M $X"
-log.debug("age", context: 123)  // "DEBUG: age 123"
-log.info("my data", context: [1, "a", 2]) // "INFO: my data [1, \"a\", 2]"
-
-```
-
-<br/>
-<br/>
-
-## Server-side Swift
-
-We ❤️ server-side Swift 4 & 5 and SwiftyBeaver supports it **out-of-the-box**! Try for yourself and run SwiftyBeaver inside a Ubuntu Docker container. Just install Docker and then go to your the project folder on macOS or Ubuntu and type:
-
-```shell
-# create docker image, build SwiftyBeaver and run unit tests
-docker run --rm -it -v $PWD:/app swiftybeaver /bin/bash -c "cd /app ; swift build ; swift test"
-
-# optionally log into container to run Swift CLI and do more stuff
-docker run --rm -it --privileged=true -v $PWD:/app swiftybeaver
-```
-
-Best: for the popular server-side Swift web framework [Vapor](https://github.com/vapor/vapor) you can use **[our Vapor logging provider](https://github.com/SwiftyBeaver/SwiftyBeaver-Vapor)** which makes server logging awesome again 🙌
-
-<br/>
-<br/>
-
-## Documentation
-
-**Getting Started:**
-
-- [Features](http://docs.swiftybeaver.com/article/7-introduction)
-- [Installation](http://docs.swiftybeaver.com/article/5-installation)
-- [Basic Setup](http://docs.swiftybeaver.com/article/6-basic-setup)
-
-**Logging Destinations:**
-
-- [Colored Logging to Xcode Console](http://docs.swiftybeaver.com/article/9-log-to-xcode-console)
-- [Colored Logging to File](http://docs.swiftybeaver.com/article/10-log-to-file)
-- [Encrypted Logging & Analytics to SwiftyBeaver Platform](http://docs.swiftybeaver.com/article/11-log-to-swiftybeaver-platform)
-- [Encrypted Logging & Analytics to Elasticsearch & Kibana](http://docs.swiftybeaver.com/article/34-enterprise-quick-start-via-docker)
-
-
-**Advanced Topics:**
-
-- [Custom Format & Context](http://docs.swiftybeaver.com/article/20-custom-format)
-- [Filters](http://docs.swiftybeaver.com/article/21-filters)
-
-**Stay Informed:**
-
-- [Official Website](https://swiftybeaver.com)
-- [On Twitter](https://twitter.com/SwiftyBeaver)
-
-<br/>
-<br/>
-
-## Privacy
-
-**SwiftyBeaver is not collecting any data without you as a developer knowing about it**. That's why it is **open-source** and developed in a simple way to be easy to inspect and check what it is actually doing under the hood.
-
-The only sending to servers is done if you use the `SBPlatformDestination`. That destination is meant for production logging and on default it sends your logs plus additional device information **end-to-end encrypted** to our cloud service. Our cloud service **can not decrypt the data**.
-
-Instead, you install our Mac App and that Mac App downloads the encrypted logs from the cloud and decrypts and shows them to you. Additionally, the Mac App stores all data that it downloads in a local SQLite database file on your computer so that you actually "physically" own your data.
-
-The business model of the SwiftyBeaver cloud service is to provide the most secure logging solution in the market. On purpose we do not provide a web UI for you because it would require us to store your encryption key on our servers.
-
-**Only you can see the logging and device data** which is sent from your users' devices. Our servers just see encrypted data and do not know your decryption key.
-
-SwiftyBeaver is **fully GDPR compliant** due to its focus on encryption and transparency in what data is collected and also meets **Apple’s latest requirements** on the privacy of 3rd party frameworks.
-
-Our Enterprise offering is an even more secure solution where you are not using anymore our cloud service and Mac App but you send your end-to-end encrypted logs directly to your own servers and you store them in your Elasticsearch cluster. The **Enterprise offering is used by health tech** and governmental institutions which require the highest level of privacy and security.
-
-<br/>
-<br/>
-
-## End-to-End Encryption
-
-SwiftyBeaver is using symmetric AES256CBC encryption in the `SBPlatformDestination` destination. No other officially supported destination uses encryption. 
-
-The encryption used in the `SBPlatformDestination` destination is end-to-end. The open-source SwiftyBeaver logging framework symmetrically encrypts all logging data on your client's device inside your app (iPhone, iPad, ...) before it is sent to the SwiftyBeaver Crypto Cloud. The decryption is done on your Mac which has the SwiftyBeaver Mac App installed. All logging data stays encrypted in the SwiftyBeaver Crypto Cloud due to the lack of the password.
-
-You are using the encryption at your own risk. SwiftyBeaver’s authors and contributors do not take over any guarantee about the absence of potential security or cryptopgraphy issues, weaknesses, etc.; please also read the LICENSE file for details. Also if you are interested in cryptography in general, please have a look at the file AES256CBC.swift to learn more about the cryptographical implementation.
-<br/>
-<br/>
-
-## License
-
-SwiftyBeaver Framework is released under the [MIT License](https://github.com/SwiftyBeaver/SwiftyBeaver/blob/master/LICENSE).

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 190
Pods/SwiftyBeaver/Sources/AES256CBC.swift


+ 0 - 165
Pods/SwiftyBeaver/Sources/Base64.swift

@@ -1,165 +0,0 @@
-//
-//  Base64.swift
-//  SwiftyBeaver (macOS)
-//
-//  Copyright © 2017 Sebastian Kreutzberger. All rights reserved.
-//
-#if os(Linux)
-import Foundation
-
-struct InvalidBase64: Error {}
-
-struct Base64 {
-    static func decode(_ string: String) throws -> [UInt8] {
-        return try decode([UInt8](string.utf8))
-    }
-
-    /// Decodes a Base64 encoded String into Data
-    ///
-    /// - throws: If the string isn't base64 encoded
-    static func decode(_ string: [UInt8]) throws -> [UInt8] {
-        let lookupTable: [UInt8] = [
-            64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-            64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-            64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 62, 64, 62, 64, 63,
-            52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 64, 64, 64, 64, 64,
-            64, 00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14,
-            15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 64, 64, 64, 64, 63,
-            64, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
-            41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 64, 64, 64, 64, 64,
-            64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-            64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-            64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-            64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-            64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-            64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-            64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-            64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-            64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64
-            ]
-
-        let remainder = string.count % 4
-        let length = (string.count - remainder) / 4
-
-        var decoded = [UInt8]()
-        decoded.reserveCapacity(length)
-
-        var index = 0
-        var i0: UInt8 = 0
-        var i1: UInt8 = 0
-        var i2: UInt8 = 0
-        var i3: UInt8 = 0
-
-        while index &+ 4 < string.count {
-            i0 = lookupTable[numericCast(string[index])]
-            i1 = lookupTable[numericCast(string[index &+ 1])]
-            i2 = lookupTable[numericCast(string[index &+ 2])]
-            i3 = lookupTable[numericCast(string[index &+ 3])]
-
-            if i0 > 63 || i1 > 63 || i2 > 63 || i3 > 63 {
-                throw InvalidBase64()
-            }
-
-            decoded.append(i0 << 2 | i1 >> 4)
-            decoded.append(i1 << 4 | i2 >> 2)
-            decoded.append(i2 << 6 | i3)
-            index += 4
-        }
-
-        if string.count &- index > 1 {
-            i0 = lookupTable[numericCast(string[index])]
-            i1 = lookupTable[numericCast(string[index &+ 1])]
-
-            if i1 > 63 {
-                guard string[index] == 61 else {
-                    throw InvalidBase64()
-                }
-
-                return decoded
-            }
-
-            if i2 > 63 {
-                guard string[index &+ 2] == 61 else {
-                    throw InvalidBase64()
-                }
-
-                return decoded
-            }
-
-            decoded.append(i0 << 2 | i1 >> 4)
-
-            if string.count &- index > 2 {
-                i2 = lookupTable[numericCast(string[index &+ 2])]
-
-                if i2 > 63 {
-                    guard string[index &+ 2] == 61 else {
-                        throw InvalidBase64()
-                    }
-
-                    return decoded
-                }
-
-                decoded.append(i1 << 4 | i2 >> 2)
-
-                if string.count &- index > 3 {
-                    i3 = lookupTable[numericCast(string[index &+ 3])]
-
-                    if i3 > 63 {
-                        guard string[index &+ 3] == 61 else {
-                            throw InvalidBase64()
-                        }
-
-                        return decoded
-                    }
-
-                    decoded.append(i2 << 6 | i3)
-                }
-            }
-        }
-
-        return decoded
-    }
-
-    static func encode(_ data: [UInt8]) -> String {
-        let base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
-        var encoded: String = ""
-
-        func appendCharacterFromBase(_ character: Int) {
-            encoded.append(base64[base64.index(base64.startIndex, offsetBy: character)])
-        }
-
-        func byte(_ index: Int) -> Int {
-            return Int(data[index])
-        }
-
-        let decodedBytes = data.map { Int($0) }
-
-        var i = 0
-
-        while i < decodedBytes.count - 2 {
-            appendCharacterFromBase((byte(i) >> 2) & 0x3F)
-            appendCharacterFromBase(((byte(i) & 0x3) << 4) | ((byte(i + 1) & 0xF0) >> 4))
-            appendCharacterFromBase(((byte(i + 1) & 0xF) << 2) | ((byte(i + 2) & 0xC0) >> 6))
-            appendCharacterFromBase(byte(i + 2) & 0x3F)
-            i += 3
-        }
-
-        if i < decodedBytes.count {
-            appendCharacterFromBase((byte(i) >> 2) & 0x3F)
-
-            if i == decodedBytes.count - 1 {
-                appendCharacterFromBase(((byte(i) & 0x3) << 4))
-                encoded.append("=")
-            } else {
-                appendCharacterFromBase(((byte(i) & 0x3) << 4) | ((byte(i + 1) & 0xF0) >> 4))
-                appendCharacterFromBase(((byte(i + 1) & 0xF) << 2))
-            }
-
-            encoded.append("=")
-        }
-
-        return encoded
-    }
-}
-
-#endif

+ 0 - 510
Pods/SwiftyBeaver/Sources/BaseDestination.swift

@@ -1,510 +0,0 @@
-//
-//  BaseDestination.swift
-//  SwiftyBeaver
-//
-//  Created by Sebastian Kreutzberger (Twitter @skreutzb) on 05.12.15.
-//  Copyright © 2015 Sebastian Kreutzberger
-//  Some rights reserved: http://opensource.org/licenses/MIT
-//
-
-import Foundation
-import Dispatch
-
-// store operating system / platform
-#if os(iOS)
-let OS = "iOS"
-#elseif os(OSX)
-let OS = "OSX"
-#elseif os(watchOS)
-let OS = "watchOS"
-#elseif os(tvOS)
-let OS = "tvOS"
-#elseif os(Linux)
-let OS = "Linux"
-#elseif os(FreeBSD)
-let OS = "FreeBSD"
-#elseif os(Windows)
-let OS = "Windows"
-#elseif os(Android)
-let OS = "Android"
-#else
-let OS = "Unknown"
-#endif
-
-/// destination which all others inherit from. do not directly use
-open class BaseDestination: Hashable, Equatable {
-
-    /// output format pattern, see documentation for syntax
-    open var format = "$DHH:mm:ss.SSS$d $C$L$c $N.$F:$l - $M"
-
-    /// runs in own serial background thread for better performance
-    open var asynchronously = true
-
-    /// do not log any message which has a lower level than this one
-    open var minLevel = SwiftyBeaver.Level.verbose
-
-    /// set custom log level words for each level
-    open var levelString = LevelString()
-
-    /// set custom log level colors for each level
-    open var levelColor = LevelColor()
-
-    public struct LevelString {
-        public var verbose = "VERBOSE"
-        public var debug = "DEBUG"
-        public var info = "INFO"
-        public var warning = "WARNING"
-        public var error = "ERROR"
-    }
-
-    // For a colored log level word in a logged line
-    // empty on default
-    public struct LevelColor {
-        public var verbose = ""     // silver
-        public var debug = ""       // green
-        public var info = ""        // blue
-        public var warning = ""     // yellow
-        public var error = ""       // red
-    }
-
-    var reset = ""
-    var escape = ""
-
-    var filters = [FilterType]()
-    let formatter = DateFormatter()
-    let startDate = Date()
-
-    // each destination class must have an own hashValue Int
-    #if swift(>=4.2)
-    public func hash(into hasher: inout Hasher) {
-        hasher.combine(defaultHashValue)
-    }
-    #else
-    lazy public var hashValue: Int = self.defaultHashValue
-    #endif
-
-    open var defaultHashValue: Int {return 0}
-
-    // each destination instance must have an own serial queue to ensure serial output
-    // GCD gives it a prioritization between User Initiated and Utility
-    var queue: DispatchQueue? //dispatch_queue_t?
-    var debugPrint = false // set to true to debug the internal filter logic of the class
-
-    public init() {
-        let uuid = NSUUID().uuidString
-        let queueLabel = "swiftybeaver-queue-" + uuid
-        queue = DispatchQueue(label: queueLabel, target: queue)
-    }
-
-    /// send / store the formatted log message to the destination
-    /// returns the formatted log message for processing by inheriting method
-    /// and for unit tests (nil if error)
-    open func send(_ level: SwiftyBeaver.Level, msg: String, thread: String, file: String,
-                   function: String, line: Int, context: Any? = nil) -> String? {
-
-        if format.hasPrefix("$J") {
-            return messageToJSON(level, msg: msg, thread: thread,
-                                 file: file, function: function, line: line, context: context)
-
-        } else {
-            return formatMessage(format, level: level, msg: msg, thread: thread,
-                                 file: file, function: function, line: line, context: context)
-        }
-    }
-
-    public func execute(synchronously: Bool, block: @escaping () -> Void) {
-        guard let queue = queue else {
-            fatalError("Queue not set")
-        }
-        if synchronously {
-            queue.sync(execute: block)
-        } else {
-            queue.async(execute: block)
-        }
-    }
-
-    public func executeSynchronously<T>(block: @escaping () throws -> T) rethrows -> T {
-        guard let queue = queue else {
-            fatalError("Queue not set")
-        }
-        return try queue.sync(execute: block)
-    }
-
-    ////////////////////////////////
-    // MARK: Format
-    ////////////////////////////////
-
-    /// returns (padding length value, offset in string after padding info)
-    private func parsePadding(_ text: String) -> (Int, Int) {
-        // look for digits followed by a alpha character
-        var s: String!
-        var sign: Int = 1
-        if text.firstChar == "-" {
-            sign = -1
-            s = String(text.suffix(from: text.index(text.startIndex, offsetBy: 1)))
-        } else {
-            s = text
-        }
-        let numStr = String(s.prefix { $0 >= "0" && $0 <= "9" })
-        if let num = Int(numStr) {
-            return (sign * num, (sign == -1 ? 1 : 0) + numStr.count)
-        } else {
-            return (0, 0)
-        }
-    }
-
-    private func paddedString(_ text: String, _ toLength: Int, truncating: Bool = false) -> String {
-        if toLength > 0 {
-            // Pad to the left of the string
-            if text.count > toLength {
-                // Hm... better to use suffix or prefix?
-                return truncating ? String(text.suffix(toLength)) : text
-            } else {
-                return "".padding(toLength: toLength - text.count, withPad: " ", startingAt: 0) + text
-            }
-        } else if toLength < 0 {
-            // Pad to the right of the string
-            let maxLength = truncating ? -toLength : max(-toLength, text.count)
-            return text.padding(toLength: maxLength, withPad: " ", startingAt: 0)
-        } else {
-            return text
-        }
-    }
-
-    /// returns the log message based on the format pattern
-    func formatMessage(_ format: String, level: SwiftyBeaver.Level, msg: String, thread: String,
-        file: String, function: String, line: Int, context: Any? = nil) -> String {
-
-        var text = ""
-        // Prepend a $I for 'ignore' or else the first character is interpreted as a format character
-        // even if the format string did not start with a $.
-        let phrases: [String] = ("$I" + format).components(separatedBy: "$")
-
-        for phrase in phrases where !phrase.isEmpty {
-            let (padding, offset) = parsePadding(phrase)
-            let formatCharIndex = phrase.index(phrase.startIndex, offsetBy: offset)
-            let formatChar = phrase[formatCharIndex]
-            let rangeAfterFormatChar = phrase.index(formatCharIndex, offsetBy: 1)..<phrase.endIndex
-            let remainingPhrase = phrase[rangeAfterFormatChar]
-
-            switch formatChar {
-            case "I":  // ignore
-                text += remainingPhrase
-            case "L":
-                text += paddedString(levelWord(level), padding) + remainingPhrase
-            case "M":
-                text += paddedString(msg, padding) + remainingPhrase
-            case "T":
-                text += paddedString(thread, padding) + remainingPhrase
-            case "N":
-                // name of file without suffix
-                text += paddedString(fileNameWithoutSuffix(file), padding) + remainingPhrase
-            case "n":
-                // name of file with suffix
-                text += paddedString(fileNameOfFile(file), padding) + remainingPhrase
-            case "F":
-                text += paddedString(function, padding) + remainingPhrase
-            case "l":
-                text += paddedString(String(line), padding) + remainingPhrase
-            case "D":
-                // start of datetime format
-                #if swift(>=3.2)
-                text += paddedString(formatDate(String(remainingPhrase)), padding)
-                #else
-                text += paddedString(formatDate(remainingPhrase), padding)
-                #endif
-            case "d":
-                text += remainingPhrase
-            case "U":
-                text += paddedString(uptime(), padding) + remainingPhrase
-            case "Z":
-                // start of datetime format in UTC timezone
-                #if swift(>=3.2)
-                text += paddedString(formatDate(String(remainingPhrase), timeZone: "UTC"), padding)
-                #else
-                text += paddedString(formatDate(remainingPhrase, timeZone: "UTC"), padding)
-                #endif
-            case "z":
-                text += remainingPhrase
-            case "C":
-                // color code ("" on default)
-                text += escape + colorForLevel(level) + remainingPhrase
-            case "c":
-                text += reset + remainingPhrase
-            case "X":
-                // add the context
-                if let cx = context {
-                    text += paddedString(String(describing: cx).trimmingCharacters(in: .whitespacesAndNewlines), padding) + remainingPhrase
-                } else {
-                    text += paddedString("", padding) + remainingPhrase
-                }
-            default:
-                text += phrase
-            }
-        }
-        // right trim only
-        return text.replacingOccurrences(of: "\\s+$", with: "", options: .regularExpression)
-    }
-
-    /// returns the log payload as optional JSON string
-    func messageToJSON(_ level: SwiftyBeaver.Level, msg: String,
-        thread: String, file: String, function: String, line: Int, context: Any? = nil) -> String? {
-        var dict: [String: Any] = [
-            "timestamp": Date().timeIntervalSince1970,
-            "level": level.rawValue,
-            "message": msg,
-            "thread": thread,
-            "file": file,
-            "function": function,
-            "line": line
-            ]
-        if let cx = context {
-            dict["context"] = cx
-        }
-        return jsonStringFromDict(dict)
-    }
-
-    /// returns the string of a level
-    func levelWord(_ level: SwiftyBeaver.Level) -> String {
-
-        var str = ""
-
-        switch level {
-        case .debug:
-            str = levelString.debug
-
-        case .info:
-            str = levelString.info
-
-        case .warning:
-            str = levelString.warning
-
-        case .error:
-            str = levelString.error
-
-        default:
-            // Verbose is default
-            str = levelString.verbose
-        }
-        return str
-    }
-
-    /// returns color string for level
-    func colorForLevel(_ level: SwiftyBeaver.Level) -> String {
-        var color = ""
-
-        switch level {
-        case .debug:
-            color = levelColor.debug
-
-        case .info:
-            color = levelColor.info
-
-        case .warning:
-            color = levelColor.warning
-
-        case .error:
-            color = levelColor.error
-
-        default:
-            color = levelColor.verbose
-        }
-        return color
-    }
-
-    /// returns the filename of a path
-    func fileNameOfFile(_ file: String) -> String {
-        let fileParts = file.components(separatedBy: "/")
-        if let lastPart = fileParts.last {
-            return lastPart
-        }
-        return ""
-    }
-
-    /// returns the filename without suffix (= file ending) of a path
-    func fileNameWithoutSuffix(_ file: String) -> String {
-        let fileName = fileNameOfFile(file)
-
-        if !fileName.isEmpty {
-            let fileNameParts = fileName.components(separatedBy: ".")
-            if let firstPart = fileNameParts.first {
-                return firstPart
-            }
-        }
-        return ""
-    }
-
-    /// returns a formatted date string
-    /// optionally in a given abbreviated timezone like "UTC"
-    func formatDate(_ dateFormat: String, timeZone: String = "") -> String {
-        if !timeZone.isEmpty {
-            formatter.timeZone = TimeZone(abbreviation: timeZone)
-        }
-        formatter.dateFormat = dateFormat
-        //let dateStr = formatter.string(from: NSDate() as Date)
-        let dateStr = formatter.string(from: Date())
-        return dateStr
-    }
-
-    /// returns a uptime string
-    func uptime() -> String {
-        let interval = Date().timeIntervalSince(startDate)
-
-        let hours = Int(interval) / 3600
-        let minutes = Int(interval / 60) - Int(hours * 60)
-        let seconds = Int(interval) - (Int(interval / 60) * 60)
-        let milliseconds = Int(interval.truncatingRemainder(dividingBy: 1) * 1000)
-
-        return String(format: "%0.2d:%0.2d:%0.2d.%03d", arguments: [hours, minutes, seconds, milliseconds])
-    }
-
-    /// returns the json-encoded string value
-    /// after it was encoded by jsonStringFromDict
-    func jsonStringValue(_ jsonString: String?, key: String) -> String {
-        guard let str = jsonString else {
-            return ""
-        }
-
-        // remove the leading {"key":" from the json string and the final }
-        let offset = key.length + 5
-        let endIndex = str.index(str.startIndex,
-                                 offsetBy: str.length - 2)
-        let range = str.index(str.startIndex, offsetBy: offset)..<endIndex
-        #if swift(>=3.2)
-        return String(str[range])
-        #else
-        return str[range]
-        #endif
-    }
-
-    /// turns dict into JSON-encoded string
-    func jsonStringFromDict(_ dict: [String: Any]) -> String? {
-        var jsonString: String?
-
-        // try to create JSON string
-        do {
-            let jsonData = try JSONSerialization.data(withJSONObject: dict, options: [])
-            jsonString = String(data: jsonData, encoding: .utf8)
-        } catch {
-            print("SwiftyBeaver could not create JSON from dict.")
-        }
-        return jsonString
-    }
-
-    ////////////////////////////////
-    // MARK: Filters
-    ////////////////////////////////
-
-    /// Add a filter that determines whether or not a particular message will be logged to this destination
-    public func addFilter(_ filter: FilterType) {
-        filters.append(filter)
-    }
-
-    /// Remove a filter from the list of filters
-    public func removeFilter(_ filter: FilterType) {
-        #if swift(>=5)
-        let index = filters.firstIndex {
-            return ObjectIdentifier($0) == ObjectIdentifier(filter)
-        }
-        #else
-        let index = filters.index {
-            return ObjectIdentifier($0) == ObjectIdentifier(filter)
-        }
-        #endif
-
-        guard let filterIndex = index else {
-            return
-        }
-
-        filters.remove(at: filterIndex)
-    }
-
-    /// Answer whether the destination has any message filters
-    /// returns boolean and is used to decide whether to resolve 
-    /// the message before invoking shouldLevelBeLogged
-    func hasMessageFilters() -> Bool {
-        return !getFiltersTargeting(Filter.TargetType.Message(.Equals([], true)),
-                                    fromFilters: self.filters).isEmpty
-    }
-
-    /// checks if level is at least minLevel or if a minLevel filter for that path does exist
-    /// returns boolean and can be used to decide if a message should be logged or not
-    func shouldLevelBeLogged(_ level: SwiftyBeaver.Level, path: String,
-                             function: String, message: String? = nil) -> Bool {
-
-        if filters.isEmpty {
-            if level.rawValue >= minLevel.rawValue {
-                if debugPrint {
-                    print("filters are empty and level >= minLevel")
-                }
-                return true
-            } else {
-                if debugPrint {
-                    print("filters are empty and level < minLevel")
-                }
-                return false
-            }
-        }
-
-        let filterCheckResult = FilterValidator.validate(input: .init(filters: self.filters, level: level, path: path, function: function, message: message))
-
-        // Exclusion filters match if they do NOT meet the filter condition (see Filter.apply(_:) method)
-        switch filterCheckResult[.excluded] {
-        case .some(.someFiltersMatch):
-            // Exclusion filters are present and at least one of them matches the log entry
-            if debugPrint {
-                print("filters are not empty and message was excluded")
-            }
-            return false
-        case .some(.allFiltersMatch), .some(.noFiltersMatchingType), .none: break
-        }
-
-        // If required filters exist, we should validate or invalidate the log if all of them pass or not
-        switch filterCheckResult[.required] {
-        case .some(.allFiltersMatch): return true
-        case .some(.someFiltersMatch): return false
-        case .some(.noFiltersMatchingType), .none: break
-        }
-
-        let checkLogLevel: () -> Bool = {
-            // Check if the log message's level matches or exceeds the minLevel of the destination
-            return level.rawValue >= self.minLevel.rawValue
-        }
-
-        // Non-required filters should only be applied if the log entry matches the filter condition (e.g. path)
-        switch filterCheckResult[.nonRequired] {
-        case .some(.allFiltersMatch): return true
-        case .some(.noFiltersMatchingType), .none: return checkLogLevel()
-        case .some(.someFiltersMatch(let partialMatchData)):
-            if partialMatchData.fullMatchCount > 0 {
-                // The log entry matches at least one filter condition and the destination's log level
-                return true
-            } else if partialMatchData.conditionMatchCount > 0 {
-                // The log entry matches at least one filter condition, but does not match or exceed the destination's log level
-                return false
-            } else {
-                // There is no filter with a matching filter condition. Check the destination's log level
-                return checkLogLevel()
-            }
-        }
-    }
-
-    func getFiltersTargeting(_ target: Filter.TargetType, fromFilters: [FilterType]) -> [FilterType] {
-        return fromFilters.filter { filter in
-            return filter.getTarget() == target
-        }
-    }
-
-  /**
-    Triggered by main flush() method on each destination. Runs in background thread.
-   Use for destinations that buffer log items, implement this function to flush those
-   buffers to their final destination (web server...)
-   */
-  func flush() {
-    // no implementation in base destination needed
-  }
-}
-
-public func == (lhs: BaseDestination, rhs: BaseDestination) -> Bool {
-    return ObjectIdentifier(lhs) == ObjectIdentifier(rhs)
-}

+ 0 - 72
Pods/SwiftyBeaver/Sources/ConsoleDestination.swift

@@ -1,72 +0,0 @@
-//
-//  ConsoleDestination.swift
-//  SwiftyBeaver
-//
-//  Created by Sebastian Kreutzberger on 05.12.15.
-//  Copyright © 2015 Sebastian Kreutzberger
-//  Some rights reserved: http://opensource.org/licenses/MIT
-//
-
-import Foundation
-
-public class ConsoleDestination: BaseDestination {
-
-    /// use NSLog instead of print, default is false
-    public var useNSLog = false
-    /// uses colors compatible to Terminal instead of Xcode, default is false
-    public var useTerminalColors: Bool = false {
-        didSet {
-            if useTerminalColors {
-                // use Terminal colors
-                reset = "\u{001b}[0m"
-                escape = "\u{001b}[38;5;"
-                levelColor.verbose = "251m"     // silver
-                levelColor.debug = "35m"        // green
-                levelColor.info = "38m"         // blue
-                levelColor.warning = "178m"     // yellow
-                levelColor.error = "197m"       // red
-
-            } else {
-                // use colored Emojis for better visual distinction
-                // of log level for Xcode 8
-                levelColor.verbose = "💜 "     // silver
-                levelColor.debug = "💚 "        // green
-                levelColor.info = "💙 "         // blue
-                levelColor.warning = "💛 "     // yellow
-                levelColor.error = "❤️ "       // red
-
-            }
-        }
-    }
-
-    override public var defaultHashValue: Int { return 1 }
-
-    public override init() {
-        super.init()
-        levelColor.verbose = "💜 "     // silver
-        levelColor.debug = "💚 "        // green
-        levelColor.info = "💙 "         // blue
-        levelColor.warning = "💛 "     // yellow
-        levelColor.error = "❤️ "       // red
-    }
-
-    // print to Xcode Console. uses full base class functionality
-    override public func send(_ level: SwiftyBeaver.Level, msg: String, thread: String,
-                                file: String, function: String, line: Int, context: Any? = nil) -> String? {
-        let formattedString = super.send(level, msg: msg, thread: thread, file: file, function: function, line: line, context: context)
-
-        if let str = formattedString {
-            if useNSLog {
-                #if os(Linux)
-                    print(str)
-                #else
-                    NSLog("%@", str)
-                #endif
-            } else {
-                print(str)
-            }
-        }
-        return formattedString
-    }
-
-}

+ 0 - 35
Pods/SwiftyBeaver/Sources/Extensions.swift

@@ -1,35 +0,0 @@
-//
-//  Extensions.swift
-//  SwiftyBeaver
-//
-//  Created by Sebastian Kreutzberger on 13.12.17.
-//  Copyright © 2017 Sebastian Kreutzberger. All rights reserved.
-//
-
-import Foundation
-
-extension String {
-    /// cross-Swift compatible characters count
-    var length: Int {
-        return self.count
-    }
-
-    /// cross-Swift-compatible first character
-    var firstChar: Character? {
-        return self.first
-    }
-
-    /// cross-Swift-compatible last character
-    var lastChar: Character? {
-        return self.last
-    }
-
-    /// cross-Swift-compatible index
-    func find(_ char: Character) -> Index? {
-        #if swift(>=5)
-            return self.firstIndex(of: char)
-        #else
-            return self.index(of: char)
-        #endif
-    }
-}

+ 0 - 229
Pods/SwiftyBeaver/Sources/FileDestination.swift

@@ -1,229 +0,0 @@
-//
-//  FileDestination.swift
-//  SwiftyBeaver
-//
-//  Created by Sebastian Kreutzberger on 05.12.15.
-//  Copyright © 2015 Sebastian Kreutzberger
-//  Some rights reserved: http://opensource.org/licenses/MIT
-//
-
-import Foundation
-
-open class FileDestination: BaseDestination {
-
-    public var logFileURL: URL?
-    public var syncAfterEachWrite: Bool = false
-    public var colored: Bool = false {
-        didSet {
-            if colored {
-                // bash font color, first value is intensity, second is color
-                // see http://bit.ly/1Otu3Zr & for syntax http://bit.ly/1Tp6Fw9
-                // uses the 256-color table from http://bit.ly/1W1qJuH
-                reset = "\u{001b}[0m"
-                escape = "\u{001b}[38;5;"
-                levelColor.verbose = "251m"     // silver
-                levelColor.debug = "35m"        // green
-                levelColor.info = "38m"         // blue
-                levelColor.warning = "178m"     // yellow
-                levelColor.error = "197m"       // red
-            } else {
-                reset = ""
-                escape = ""
-                levelColor.verbose = ""
-                levelColor.debug = ""
-                levelColor.info = ""
-                levelColor.warning = ""
-                levelColor.error = ""
-            }
-        }
-    }
-    
-    // LOGFILE ROTATION
-    // ho many bytes should a logfile have until it is rotated?
-    // default is 5 MB. Just is used if logFileAmount > 1
-    public var logFileMaxSize = (5 * 1024 * 1024)
-    // Number of log files used in rotation, default is 1 which deactivates file rotation
-    public var logFileAmount = 1
-
-    override public var defaultHashValue: Int {return 2}
-    let fileManager = FileManager.default
-
-
-    public init(logFileURL: URL? = nil) {
-        if let logFileURL = logFileURL {
-            self.logFileURL = logFileURL
-            super.init()
-            return
-        }
-
-        // platform-dependent logfile directory default
-        var baseURL: URL?
-        #if os(OSX)
-            if let url = fileManager.urls(for: .cachesDirectory, in: .userDomainMask).first {
-                baseURL = url
-                // try to use ~/Library/Caches/APP NAME instead of ~/Library/Caches
-                if let appName = Bundle.main.object(forInfoDictionaryKey: "CFBundleExecutable") as? String {
-                    do {
-                        if let appURL = baseURL?.appendingPathComponent(appName, isDirectory: true) {
-                            try fileManager.createDirectory(at: appURL,
-                                                            withIntermediateDirectories: true, attributes: nil)
-                            baseURL = appURL
-                        }
-                    } catch {
-                        print("Warning! Could not create folder /Library/Caches/\(appName)")
-                    }
-                }
-            }
-        #else
-            #if os(Linux)
-                baseURL = URL(fileURLWithPath: "/var/cache")
-            #else
-                // iOS, watchOS, etc. are using the caches directory
-                if let url = fileManager.urls(for: .cachesDirectory, in: .userDomainMask).first {
-                    baseURL = url
-                }
-            #endif
-        #endif
-
-        if let baseURL = baseURL {
-            self.logFileURL = baseURL.appendingPathComponent("swiftybeaver.log", isDirectory: false)
-        }
-        super.init()
-    }
-
-    // append to file. uses full base class functionality
-    override public func send(_ level: SwiftyBeaver.Level, msg: String, thread: String,
-        file: String, function: String, line: Int, context: Any? = nil) -> String? {
-        let formattedString = super.send(level, msg: msg, thread: thread, file: file, function: function, line: line, context: context)
-
-        if let str = formattedString {
-            _ = validateSaveFile(str: str)
-        }
-        return formattedString
-    }
-    
-    // check if filesize is bigger than wanted and if yes then rotate them
-    func validateSaveFile(str: String) -> Bool {
-        if self.logFileAmount > 1 {
-            guard let url = logFileURL else { return false }
-            let filePath = url.path
-            if FileManager.default.fileExists(atPath: filePath) == true {
-                do {
-                    // Get file size
-                    let attr = try FileManager.default.attributesOfItem(atPath: filePath)
-                    let fileSize = attr[FileAttributeKey.size] as! UInt64
-                    // Do file rotation
-                    if fileSize > logFileMaxSize {
-                        rotateFile(filePath)
-                    }
-                } catch {
-                    print("validateSaveFile error: \(error)")
-                }
-            }
-        }
-        return saveToFile(str: str)
-    }
-    
-    private func rotateFile(_ filePath: String) {
-       let lastIndex = (logFileAmount-1)
-       let firstIndex = 1
-       do {
-           for index in stride(from: lastIndex, to: firstIndex, by: -1) {
-               let oldFile = String.init(format: "%@.%d", filePath, index)
-
-               if FileManager.default.fileExists(atPath: oldFile) {
-                   if index == lastIndex {
-                       // Delete the last file
-                       try FileManager.default.removeItem(atPath: oldFile)
-                   } else {
-                       // Move the current file to next index
-                       let newFile = String.init(format: "%@.%d", filePath, index+1)
-                       try FileManager.default.moveItem(atPath: oldFile, toPath: newFile)
-                   }
-               }
-           }
-        
-           // Finally, move the current file
-           let newFile = String.init(format: "%@.%d", filePath, firstIndex)
-           try FileManager.default.moveItem(atPath: filePath, toPath: newFile)
-       } catch {
-           print("rotateFile error: \(error)")
-       }
-    }
-
-    /// appends a string as line to a file.
-    /// returns boolean about success
-    func saveToFile(str: String) -> Bool {
-        guard let url = logFileURL else { return false }
-
-        let line = str + "\n"
-        guard let data = line.data(using: String.Encoding.utf8) else { return false }
-
-        return write(data: data, to: url)
-    }
-
-    private func write(data: Data, to url: URL) -> Bool {
-        
-        #if os(Linux)
-            return true
-        #else
-        var success = false
-        let coordinator = NSFileCoordinator(filePresenter: nil)
-        var error: NSError?
-        coordinator.coordinate(writingItemAt: url, error: &error) { url in
-            do {
-                if fileManager.fileExists(atPath: url.path) == false {
-
-                    let directoryURL = url.deletingLastPathComponent()
-                    if fileManager.fileExists(atPath: directoryURL.path) == false {
-                        try fileManager.createDirectory(
-                            at: directoryURL,
-                            withIntermediateDirectories: true
-                        )
-                    }
-                    fileManager.createFile(atPath: url.path, contents: nil)
-
-                    #if os(iOS) || os(watchOS)
-                    if #available(iOS 10.0, watchOS 3.0, *) {
-                        var attributes = try fileManager.attributesOfItem(atPath: url.path)
-                        attributes[FileAttributeKey.protectionKey] = FileProtectionType.none
-                        try fileManager.setAttributes(attributes, ofItemAtPath: url.path)
-                    }
-                    #endif
-                }
-
-                let fileHandle = try FileHandle(forWritingTo: url)
-                fileHandle.seekToEndOfFile()
-                fileHandle.write(data)
-                if syncAfterEachWrite {
-                    fileHandle.synchronizeFile()
-                }
-                fileHandle.closeFile()
-                success = true
-            } catch {
-                print("SwiftyBeaver File Destination could not write to file \(url).")
-            }
-        }
-
-        if let error = error {
-            print("Failed writing file with error: \(String(describing: error))")
-            return false
-        }
-
-        return success
-        #endif
-    }
-
-    /// deletes log file.
-    /// returns true if file was removed or does not exist, false otherwise
-    public func deleteLogFile() -> Bool {
-        guard let url = logFileURL, fileManager.fileExists(atPath: url.path) == true else { return true }
-        do {
-            try fileManager.removeItem(at: url)
-            return true
-        } catch {
-            print("SwiftyBeaver File Destination could not remove file \(url).")
-            return false
-        }
-    }
-}

+ 0 - 283
Pods/SwiftyBeaver/Sources/Filter.swift

@@ -1,283 +0,0 @@
-//
-//  Filter.swift
-//  SwiftyBeaver
-//
-//  Created by Jeff Roberts on 5/31/16.
-//  Copyright © 2015 Sebastian Kreutzberger
-//  Some rights reserved: http://opensource.org/licenses/MIT
-//
-
-import Foundation
-
-/// FilterType is a protocol that describes something that determines
-/// whether or not a message gets logged. A filter answers a Bool when it
-/// is applied to a value. If the filter passes, it shall return true,
-/// false otherwise.
-///
-/// A filter must contain a target, which identifies what it filters against
-/// A filter can be required meaning that all required filters against a specific
-/// target must pass in order for the message to be logged.
-public protocol FilterType : AnyObject {
-    func apply(_ value: String?) -> Bool
-    func getTarget() -> Filter.TargetType
-    func isRequired() -> Bool
-    func isExcluded() -> Bool
-    func reachedMinLevel(_ level: SwiftyBeaver.Level) -> Bool
-}
-
-/// Filters is syntactic sugar used to easily construct filters
-public class Filters {
-    public static let Path = PathFilterFactory.self
-    public static let Function = FunctionFilterFactory.self
-    public static let Message = MessageFilterFactory.self
-}
-
-/// Filter is an abstract base class for other filters
-public class Filter {
-    public enum TargetType {
-        case Path(Filter.ComparisonType)
-        case Function(Filter.ComparisonType)
-        case Message(Filter.ComparisonType)
-    }
-
-    public enum ComparisonType {
-        case StartsWith([String], Bool)
-        case Contains([String], Bool)
-        case Excludes([String], Bool)
-        case EndsWith([String], Bool)
-        case Equals([String], Bool)
-        case Custom((String) -> Bool)
-    }
-
-    let targetType: Filter.TargetType
-    let required: Bool
-    let minLevel: SwiftyBeaver.Level
-
-    public init(_ target: Filter.TargetType, required: Bool, minLevel: SwiftyBeaver.Level) {
-        self.targetType = target
-        self.required = required
-        self.minLevel = minLevel
-    }
-
-    public func getTarget() -> Filter.TargetType {
-        return self.targetType
-    }
-
-    public func isRequired() -> Bool {
-        return self.required
-    }
-
-    public func isExcluded() -> Bool {
-        return false
-    }
-
-    /// returns true of set minLevel is >= as given level
-    public func reachedMinLevel(_ level: SwiftyBeaver.Level) -> Bool {
-        //print("checking if given level \(level) >= \(minLevel)")
-        return level.rawValue >= minLevel.rawValue
-    }
-}
-
-/// CompareFilter is a FilterType that can filter based upon whether a target
-/// starts with, contains or ends with a specific string. CompareFilters can be
-/// case sensitive.
-public class CompareFilter: Filter, FilterType {
-
-    private var filterComparisonType: Filter.ComparisonType?
-
-    override public init(_ target: Filter.TargetType, required: Bool, minLevel: SwiftyBeaver.Level) {
-        super.init(target, required: required, minLevel: minLevel)
-
-        let comparisonType: Filter.ComparisonType?
-        switch self.getTarget() {
-        case let .Function(comparison):
-            comparisonType = comparison
-
-        case let .Path(comparison):
-            comparisonType = comparison
-
-        case let .Message(comparison):
-            comparisonType = comparison
-
-            /*default:
-             comparisonType = nil*/
-        }
-        self.filterComparisonType = comparisonType
-    }
-
-    public func apply(_ value: String?) -> Bool {
-        guard let value = value else {
-            return false
-        }
-
-        guard let filterComparisonType = self.filterComparisonType else {
-            return false
-        }
-
-        let matches: Bool
-        switch filterComparisonType {
-        case let .Contains(strings, caseSensitive):
-            matches = !strings.filter { string in
-                return caseSensitive ? value.contains(string) :
-                    value.lowercased().contains(string.lowercased())
-                }.isEmpty
-
-        case let .Excludes(strings, caseSensitive):
-            matches = !strings.filter { string in
-                return caseSensitive ? !value.contains(string) :
-                    !value.lowercased().contains(string.lowercased())
-                }.isEmpty
-
-        case let .StartsWith(strings, caseSensitive):
-            matches = !strings.filter { string in
-                return caseSensitive ? value.hasPrefix(string) :
-                    value.lowercased().hasPrefix(string.lowercased())
-                }.isEmpty
-
-        case let .EndsWith(strings, caseSensitive):
-            matches = !strings.filter { string in
-                return caseSensitive ? value.hasSuffix(string) :
-                    value.lowercased().hasSuffix(string.lowercased())
-                }.isEmpty
-
-        case let .Equals(strings, caseSensitive):
-            matches = !strings.filter { string in
-                return caseSensitive ? value == string :
-                    value.lowercased() == string.lowercased()
-                }.isEmpty
-        case let .Custom(predicate):
-            matches = predicate(value)
-        }
-
-        return matches
-    }
-
-    override public func isExcluded() -> Bool {
-        guard let filterComparisonType = self.filterComparisonType else { return false }
-
-        switch filterComparisonType {
-        case .Excludes:
-            return true
-        default:
-            return false
-        }
-    }
-}
-
-// Syntactic sugar for creating a function comparison filter
-public class FunctionFilterFactory {
-    public static func startsWith(_ prefixes: String..., caseSensitive: Bool = false,
-                                  required: Bool = false, minLevel: SwiftyBeaver.Level = .verbose) -> FilterType {
-        return CompareFilter(.Function(.StartsWith(prefixes, caseSensitive)), required: required, minLevel: minLevel)
-    }
-
-    public static func contains(_ strings: String..., caseSensitive: Bool = false,
-                                required: Bool = false, minLevel: SwiftyBeaver.Level = .verbose) -> FilterType {
-        return CompareFilter(.Function(.Contains(strings, caseSensitive)), required: required, minLevel: minLevel)
-    }
-
-    public static func excludes(_ strings: String..., caseSensitive: Bool = false,
-                                required: Bool = false, minLevel: SwiftyBeaver.Level = .verbose) -> FilterType {
-        return CompareFilter(.Function(.Excludes(strings, caseSensitive)), required: required, minLevel: minLevel)
-    }
-
-    public static func endsWith(_ suffixes: String..., caseSensitive: Bool = false,
-                                required: Bool = false, minLevel: SwiftyBeaver.Level = .verbose) -> FilterType {
-        return CompareFilter(.Function(.EndsWith(suffixes, caseSensitive)), required: required, minLevel: minLevel)
-    }
-
-    public static func equals(_ strings: String..., caseSensitive: Bool = false,
-                              required: Bool = false, minLevel: SwiftyBeaver.Level = .verbose) -> FilterType {
-        return CompareFilter(.Function(.Equals(strings, caseSensitive)), required: required, minLevel: minLevel)
-    }
-
-    public static func custom(required: Bool = false, minLevel: SwiftyBeaver.Level = .verbose, filterPredicate: @escaping (String) -> Bool) -> FilterType {
-        return CompareFilter(.Function(.Custom(filterPredicate)), required: required, minLevel: minLevel)
-    }
-}
-
-// Syntactic sugar for creating a message comparison filter
-public class MessageFilterFactory {
-    public static func startsWith(_ prefixes: String..., caseSensitive: Bool = false,
-                                  required: Bool = false, minLevel: SwiftyBeaver.Level = .verbose) -> FilterType {
-        return CompareFilter(.Message(.StartsWith(prefixes, caseSensitive)), required: required, minLevel: minLevel)
-    }
-
-    public static func contains(_ strings: String..., caseSensitive: Bool = false,
-                                required: Bool = false, minLevel: SwiftyBeaver.Level = .verbose) -> FilterType {
-        return CompareFilter(.Message(.Contains(strings, caseSensitive)), required: required, minLevel: minLevel)
-    }
-
-    public static func excludes(_ strings: String..., caseSensitive: Bool = false,
-                                required: Bool = false, minLevel: SwiftyBeaver.Level = .verbose) -> FilterType {
-        return CompareFilter(.Message(.Excludes(strings, caseSensitive)), required: required, minLevel: minLevel)
-    }
-
-    public static func endsWith(_ suffixes: String..., caseSensitive: Bool = false,
-                                required: Bool = false, minLevel: SwiftyBeaver.Level = .verbose) -> FilterType {
-        return CompareFilter(.Message(.EndsWith(suffixes, caseSensitive)), required: required, minLevel: minLevel)
-    }
-
-    public static func equals(_ strings: String..., caseSensitive: Bool = false,
-                              required: Bool = false, minLevel: SwiftyBeaver.Level = .verbose) -> FilterType {
-        return CompareFilter(.Message(.Equals(strings, caseSensitive)), required: required, minLevel: minLevel)
-    }
-
-    public static func custom(required: Bool = false, minLevel: SwiftyBeaver.Level = .verbose, filterPredicate: @escaping (String) -> Bool) -> FilterType {
-        return CompareFilter(.Message(.Custom(filterPredicate)), required: required, minLevel: minLevel)
-    }
-}
-
-// Syntactic sugar for creating a path comparison filter
-public class PathFilterFactory {
-    public static func startsWith(_ prefixes: String..., caseSensitive: Bool = false,
-                                  required: Bool = false, minLevel: SwiftyBeaver.Level = .verbose) -> FilterType {
-        return CompareFilter(.Path(.StartsWith(prefixes, caseSensitive)), required: required, minLevel: minLevel)
-    }
-
-    public static func contains(_ strings: String..., caseSensitive: Bool = false,
-                                required: Bool = false, minLevel: SwiftyBeaver.Level = .verbose) -> FilterType {
-        return CompareFilter(.Path(.Contains(strings, caseSensitive)), required: required, minLevel: minLevel)
-    }
-
-    public static func excludes(_ strings: String..., caseSensitive: Bool = false,
-                                required: Bool = false, minLevel: SwiftyBeaver.Level = .verbose) -> FilterType {
-        return CompareFilter(.Path(.Excludes(strings, caseSensitive)), required: required, minLevel: minLevel)
-    }
-
-    public static func endsWith(_ suffixes: String..., caseSensitive: Bool = false,
-                                required: Bool = false, minLevel: SwiftyBeaver.Level = .verbose) -> FilterType {
-        return CompareFilter(.Path(.EndsWith(suffixes, caseSensitive)), required: required, minLevel: minLevel)
-    }
-
-    public static func equals(_ strings: String..., caseSensitive: Bool = false,
-                              required: Bool = false, minLevel: SwiftyBeaver.Level = .verbose) -> FilterType {
-        return CompareFilter(.Path(.Equals(strings, caseSensitive)), required: required, minLevel: minLevel)
-    }
-
-    public static func custom(required: Bool = false, minLevel: SwiftyBeaver.Level = .verbose, filterPredicate: @escaping (String) -> Bool) -> FilterType {
-        return CompareFilter(.Path(.Custom(filterPredicate)), required: required, minLevel: minLevel)
-    }
-}
-
-extension Filter.TargetType: Equatable {
-}
-
-// The == does not compare associated values for each enum. Instead == evaluates to true
-// if both enums are the same "types", ignoring the associated values of each enum
-public func == (lhs: Filter.TargetType, rhs: Filter.TargetType) -> Bool {
-    switch (lhs, rhs) {
-
-    case (.Path, .Path):
-        return true
-
-    case (.Function, .Function):
-        return true
-
-    case (.Message, .Message):
-        return true
-
-    default:
-        return false
-    }
-}

+ 0 - 129
Pods/SwiftyBeaver/Sources/FilterValidator.swift

@@ -1,129 +0,0 @@
-//
-//  FilterValidator.swift
-//  SwiftyBeaver (iOS)
-//
-//  Created by Felix Lisczyk on 07.07.19.
-//  Copyright © 2019 Sebastian Kreutzberger. All rights reserved.
-//
-
-import Foundation
-
-/// FilterValidator is a utility class used by BaseDestination.
-/// It encapsulates the filtering logic for excluded, required
-/// and non-required filters.
-///
-/// FilterValidator evaluates a set of filters for a single log
-/// entry. It determines if these filters apply to the log entry
-/// based on their condition (path, function, message) and their
-/// minimum log level.
-
-struct FilterValidator {
-
-    // These are the different filter types that the user can set
-    enum ValidationType: CaseIterable {
-        case excluded
-        case required
-        case nonRequired
-
-        func apply(to filters: [FilterType]) -> [FilterType] {
-            switch self {
-            case .excluded:
-                return filters.filter { $0.isExcluded() }
-            case .required:
-                return filters.filter { $0.isRequired() && !$0.isExcluded() }
-            case .nonRequired:
-                return filters.filter { !$0.isRequired() && !$0.isExcluded() }
-            }
-        }
-    }
-
-    // Wrapper object for input parameters
-    struct Input {
-        let filters: [FilterType]
-        let level: SwiftyBeaver.Level
-        let path: String
-        let function: String
-        let message: String?
-    }
-
-    // Result wrapper object
-    enum Result {
-        case allFiltersMatch                            // All filters fully match the log entry (condition + minimum log level)
-        case someFiltersMatch(PartialMatchData)         // Only some filters fully match the log entry (condition + minimum log level)
-        case noFiltersMatchingType                      // There are no filters set for a particular type (excluded, required, nonRequired)
-
-        struct PartialMatchData {
-            let fullMatchCount: Int                     // Number of filters that match both the condition and the minimum log level of the log entry
-            let conditionMatchCount: Int                // Number of filters that match ONLY the condition of the log entry (path, function, message)
-            let logLevelMatchCount: Int                 // Number of filters that match ONLY the minimum log level of the log entry
-        }
-    }
-
-    static func validate(input: Input, for types: [ValidationType] = ValidationType.allCases) -> [ValidationType: Result] {
-        var results = [ValidationType: Result]()
-        for type in types {
-            let filtersToValidate = type.apply(to: input.filters)
-
-            if filtersToValidate.isEmpty {
-                // There are no filters set for this particular type
-                results[type] = .noFiltersMatchingType
-            } else {
-                var fullMatchCount: Int = 0
-                var conditionMatchCount: Int = 0
-                var logLevelMatchCount: Int = 0
-
-                for filter in filtersToValidate {
-                    let filterMatchesCondition = self.filterMatchesCondition(filter, level: input.level, path: input.path, function: input.function, message: input.message)
-                    let filterMatchesMinLogLevel = self.filterMatchesMinLogLevel(filter, level: input.level)
-
-                    switch (filterMatchesCondition, filterMatchesMinLogLevel) {
-                    // Filter matches both the condition and the minimum log level
-                    case (true, true): fullMatchCount += 1
-                    // Filter matches only the condition (path, function, message)
-                    case (true, false): conditionMatchCount += 1
-                    // Filter matches only the minimum log level
-                    case (false, true): logLevelMatchCount += 1
-                    // Filter does not match the condition nor the minimum log level
-                    case (false, false): break
-                    }
-                }
-
-                if filtersToValidate.count == fullMatchCount {
-                    // All filters fully match the log entry
-                    results[type] = .allFiltersMatch
-                } else {
-                    // Only some filters match the log entry
-                    results[type] = .someFiltersMatch(.init(fullMatchCount: fullMatchCount, conditionMatchCount: conditionMatchCount, logLevelMatchCount: logLevelMatchCount))
-                }
-            }
-        }
-
-        return results
-    }
-
-    private static func filterMatchesCondition(_ filter: FilterType, level: SwiftyBeaver.Level,
-                                                path: String, function: String, message: String?) -> Bool {
-            let passes: Bool
-
-            switch filter.getTarget() {
-            case .Path(_):
-                passes = filter.apply(path)
-
-            case .Function(_):
-                passes = filter.apply(function)
-
-            case .Message(_):
-                guard let message = message else {
-                    return false
-                }
-
-                passes = filter.apply(message)
-            }
-
-            return passes
-    }
-
-    private static func filterMatchesMinLogLevel(_ filter: FilterType, level: SwiftyBeaver.Level) -> Bool {
-        return filter.reachedMinLevel(level)
-    }
-}

+ 0 - 97
Pods/SwiftyBeaver/Sources/GoogleCloudDestination.swift

@@ -1,97 +0,0 @@
-//
-//  GoogleCloudDestination.swift
-//  SwiftyBeaver
-//
-//  Copyright © 2017 Sebastian Kreutzberger. All rights reserved.
-//
-
-import Foundation
-
-public final class GoogleCloudDestination: BaseDestination {
-
-    private let serviceName: String
-
-    public init(serviceName: String) {
-        self.serviceName = serviceName
-        super.init()
-    }
-
-    override public var asynchronously: Bool {
-        get {
-            return false
-        }
-        set {
-            return
-        }
-    }
-
-    override public func send(_ level: SwiftyBeaver.Level, msg: String, thread: String,
-                              file: String, function: String, line: Int, context: Any? = nil) -> String? {
-
-        let reportLocation: [String: Any] = ["filePath": file, "lineNumber": line, "functionName": function]
-        var gcpContext: [String: Any] = ["reportLocation": reportLocation]
-        if let context = context as? [String: Any] {
-            if let httpRequestContext =  context["httpRequest"] as? [String: Any] {
-                gcpContext["httpRequest"] = httpRequestContext
-            }
-
-            if let user = context["user"] as? String {
-                gcpContext["user"] = user
-            }
-        }
-
-        let gcpJSON: [String: Any] = [
-            "serviceContext": [
-                "service": serviceName
-            ],
-            "message": msg,
-            "severity": level.severity,
-            "context": gcpContext
-        ]
-
-        let finalLogString: String
-
-        do {
-            finalLogString = try jsonString(obj: gcpJSON)
-        } catch {
-            let uncrashableLogString = "{\"context\":{\"reportLocation\":{\"filePath\": \"\(file)\"" +
-                ",\"functionName\":\"\(function)\"" +
-                ",\"lineNumber\":\(line)},\"severity\"" +
-                ":\"CRITICAL\",\"message\":\"Error encoding " +
-            "JSON log entry. You may be losing log messages!\"}"
-            finalLogString = uncrashableLogString.description
-        }
-        print(finalLogString)
-        return finalLogString
-    }
-
-    private func jsonString(obj: Dictionary<String, Any>) throws -> String {
-        let json = try JSONSerialization.data(withJSONObject: obj, options: [])
-        guard let string = String(data: json, encoding: .utf8) else {
-            throw GCPError.serialization
-        }
-        return string
-    }
-}
-
-///
-/// https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#LogSeverity
-extension SwiftyBeaver.Level {
-
-    /// Verbose is reported as Debug to GCP.
-    /// Recommend you don't bother using it.
-    var severity: String {
-        switch self {
-        // There is only one level below "Debug": "Default", which becomes "Any" and is considered as a potential error as well
-        case .verbose: return "DEBUG"
-        case .debug: return "DEBUG"
-        case .info: return "INFO"
-        case .warning: return "WARNING"
-        case .error: return "ERROR"
-        }
-    }
-}
-
-private enum GCPError: Error {
-    case serialization
-}

+ 0 - 628
Pods/SwiftyBeaver/Sources/SBPlatformDestination.swift

@@ -1,628 +0,0 @@
-//
-//  SBPlatformDestination
-//  SwiftyBeaver
-//
-//  Created by Sebastian Kreutzberger on 22.01.16.
-//  Copyright © 2016 Sebastian Kreutzberger
-//  Some rights reserved: http://opensource.org/licenses/MIT
-//
-
-import Foundation
-
-#if canImport(FoundationNetworking)
-import FoundationNetworking
-#endif
-
-// platform-dependent import frameworks to get device details
-// valid values for os(): OSX, iOS, watchOS, tvOS, Linux
-// in Swift 3 the following were added: FreeBSD, Windows, Android
-#if os(iOS) || os(tvOS) || os(watchOS)
-    import UIKit
-    var DEVICE_MODEL: String {
-        get {
-            var systemInfo = utsname()
-            uname(&systemInfo)
-            let machineMirror = Mirror(reflecting: systemInfo.machine)
-            let identifier = machineMirror.children.reduce("") { identifier, element in
-                guard let value = element.value as? Int8, value != 0 else { return identifier }
-                return identifier + String(UnicodeScalar(UInt8(value)))
-            }
-            return identifier
-        }
-    }
-#else
-    let DEVICE_MODEL = ""
-#endif
-
-#if os(iOS) || os(tvOS)
-    var DEVICE_NAME = UIDevice.current.name
-#else
-    // under watchOS UIDevice is not existing, http://apple.co/26ch5J1
-    let DEVICE_NAME = ""
-#endif
-
-public class SBPlatformDestination: BaseDestination {
-
-    public var appID = ""
-    public var appSecret = ""
-    public var encryptionKey = ""
-    public var analyticsUserName = "" // user email, ID, name, etc.
-    public var analyticsUUID: String { return uuid }
-
-    // when to send to server
-    public struct SendingPoints {
-        public var verbose = 0
-        public var debug = 1
-        public var info = 5
-        public var warning = 8
-        public var error = 10
-        public var threshold = 10  // send to server if points reach that value
-    }
-    public var sendingPoints = SendingPoints()
-    public var showNSLog = false // executes toNSLog statements to debug the class
-    var points = 0
-
-    public var serverURL = URL(string: "https://api.swiftybeaver.com/api/entries/") // optional
-    public var entriesFileURL = URL(fileURLWithPath: "") // not optional
-    public var sendingFileURL = URL(fileURLWithPath: "")
-    public var analyticsFileURL = URL(fileURLWithPath: "")
-
-    private let minAllowedThreshold = 1  // over-rules SendingPoints.Threshold
-    private let maxAllowedThreshold = 1000  // over-rules SendingPoints.Threshold
-    private var sendingInProgress = false
-    private var initialSending = true
-
-    // analytics
-    var uuid = ""
-
-    // destination
-    override public var defaultHashValue: Int {return 3}
-    let fileManager = FileManager.default
-    let isoDateFormatter = DateFormatter()
-
-    /// init platform with default internal filenames
-    public init(appID: String, appSecret: String, encryptionKey: String,
-                serverURL: URL? = URL(string: "https://api.swiftybeaver.com/api/entries/"),
-                entriesFileName: String = "sbplatform_entries.json",
-                sendingfileName: String = "sbplatform_entries_sending.json",
-                analyticsFileName: String = "sbplatform_analytics.json") {
-        super.init()
-        self.serverURL = serverURL
-        self.appID = appID
-        self.appSecret = appSecret
-        self.encryptionKey = encryptionKey
-
-        // setup where to write the json files
-        var baseURL: URL?
-        #if os(OSX)
-            if let url = fileManager.urls(for: .applicationSupportDirectory, in: .userDomainMask).first {
-                baseURL = url
-                // try to use ~/Library/Application Support/APP NAME instead of ~/Library/Application Support
-                if let appName = Bundle.main.object(forInfoDictionaryKey: "CFBundleExecutable") as? String {
-                    do {
-                        if let appURL = baseURL?.appendingPathComponent(appName, isDirectory: true) {
-                            try fileManager.createDirectory(at: appURL,
-                                                            withIntermediateDirectories: true, attributes: nil)
-                            baseURL = appURL
-                        }
-                    } catch {
-                        // it is too early in the class lifetime to be able to use toNSLog()
-                        print("Warning! Could not create folder ~/Library/Application Support/\(appName).")
-                    }
-                }
-            }
-        #else
-            #if os(tvOS)
-                // tvOS can just use the caches directory
-                if let url = fileManager.urls(for: .cachesDirectory, in: .userDomainMask).first {
-                    baseURL = url
-                }
-            #elseif os(Linux)
-                // Linux is using /var/cache
-                let baseDir = "/var/cache/"
-                entriesFileURL = URL(fileURLWithPath: baseDir + entriesFileName)
-                sendingFileURL = URL(fileURLWithPath: baseDir + sendingfileName)
-                analyticsFileURL = URL(fileURLWithPath: baseDir + analyticsFileName)
-            #else
-                // iOS and watchOS are using the app’s document directory
-                if let url = fileManager.urls(for: .documentDirectory, in: .userDomainMask).first {
-                    baseURL = url
-                }
-            #endif
-        #endif
-
-        #if os(Linux)
-            // get, update loaded and save analytics data to file on start
-            let dict = analytics(analyticsFileURL, update: true)
-            _ = saveDictToFile(dict, url: analyticsFileURL)
-        #else
-            if let baseURL = baseURL {
-                // is just set for everything but not Linux
-                entriesFileURL = baseURL.appendingPathComponent(entriesFileName,
-                                                                isDirectory: false)
-                sendingFileURL = baseURL.appendingPathComponent(sendingfileName,
-                                                                isDirectory: false)
-                analyticsFileURL = baseURL.appendingPathComponent(analyticsFileName,
-                                                                  isDirectory: false)
-
-                // get, update loaded and save analytics data to file on start
-                let dict = analytics(analyticsFileURL, update: true)
-                _ = saveDictToFile(dict, url: analyticsFileURL)
-            }
-        #endif
-    }
-
-    // append to file, each line is a JSON dict
-    override public func send(_ level: SwiftyBeaver.Level, msg: String, thread: String,
-        file: String, function: String, line: Int, context: Any? = nil) -> String? {
-
-        var jsonString: String?
-
-        let dict: [String: Any] = [
-            "timestamp": Date().timeIntervalSince1970,
-            "level": level.rawValue,
-            "message": msg,
-            "thread": thread,
-            "fileName": file.components(separatedBy: "/").last!,
-            "function": function,
-            "line": line]
-
-        jsonString = jsonStringFromDict(dict)
-
-        if let str = jsonString {
-            toNSLog("saving '\(msg)' to \(entriesFileURL)")
-            _ = saveToFile(str, url: entriesFileURL)
-            //toNSLog(entriesFileURL.path!)
-
-            // now decide if the stored log entries should be sent to the server
-            // add level points to current points amount and send to server if threshold is hit
-            let newPoints = sendingPointsForLevel(level)
-            points += newPoints
-            toNSLog("current sending points: \(points)")
-
-            if (points >= sendingPoints.threshold && points >= minAllowedThreshold) || points > maxAllowedThreshold {
-                toNSLog("\(points) points is >= threshold")
-                // above threshold, send to server
-                sendNow()
-
-            } else if initialSending {
-                initialSending = false
-                // first logging at this session
-                // send if json file still contains old log entries
-                if let logEntries = logsFromFile(entriesFileURL) {
-                    let lines = logEntries.count
-                    if lines > 1 {
-                        var msg = "initialSending: \(points) points is below threshold "
-                        msg += "but json file already has \(lines) lines."
-                        toNSLog(msg)
-                        sendNow()
-                    }
-                }
-            }
-        }
-
-        return jsonString
-    }
-
-    // MARK: Send-to-Server Logic
-
-    /// does a (manual) sending attempt of all unsent log entries to SwiftyBeaver Platform
-    public func sendNow() {
-
-        if sendFileExists() {
-            toNSLog("reset points to 0")
-            points = 0
-        } else {
-            if !renameJsonToSendFile() {
-                return
-            }
-        }
-
-        if !sendingInProgress {
-            sendingInProgress = true
-            //let (jsonString, lines) = logsFromFile(sendingFileURL)
-            var lines = 0
-
-            guard let logEntries = logsFromFile(sendingFileURL) else {
-                sendingInProgress = false
-                return
-            }
-
-            lines = logEntries.count
-
-            if lines > 0 {
-                var payload = [String: Any]()
-                // merge device and analytics dictionaries
-                let deviceDetailsDict = deviceDetails()
-
-                var analyticsDict = analytics(analyticsFileURL)
-
-                for key in deviceDetailsDict.keys {
-                    analyticsDict[key] = deviceDetailsDict[key]
-                }
-                payload["device"] = analyticsDict
-                payload["entries"] = logEntries
-
-                if let str = jsonStringFromDict(payload) {
-                    //toNSLog(str)  // uncomment to see full payload
-                    toNSLog("Encrypting \(lines) log entries ...")
-                    if let encryptedStr = encrypt(str) {
-                        var msg = "Sending \(lines) encrypted log entries "
-                        msg += "(\(encryptedStr.length) chars) to server ..."
-                        toNSLog(msg)
-                        sendToServerAsync(encryptedStr) { ok, _ in
-
-                            self.toNSLog("Sent \(lines) encrypted log entries to server, received ok: \(ok)")
-                            if ok {
-                                _ = self.deleteFile(self.sendingFileURL)
-                            }
-                            self.sendingInProgress = false
-                            self.points = 0
-                        }
-                    }
-                }
-            } else {
-                sendingInProgress = false
-            }
-        }
-    }
-
-    /// sends a string to the SwiftyBeaver Platform server, returns ok if status 200 and HTTP status
-    func sendToServerAsync(_ str: String?, complete: @escaping (_ ok: Bool, _ status: Int) -> Void) {
-
-        let timeout = 10.0
-
-        if let payload = str, let queue = self.queue, let serverURL = serverURL {
-
-            // create operation queue which uses current serial queue of destination
-            let operationQueue = OperationQueue()
-            operationQueue.underlyingQueue = queue
-
-            let session = URLSession(configuration:
-                URLSessionConfiguration.default,
-                delegate: nil, delegateQueue: operationQueue)
-
-            toNSLog("assembling request ...")
-
-             // assemble request
-             var request = URLRequest(url: serverURL,
-                                     cachePolicy: .reloadIgnoringLocalAndRemoteCacheData,
-                                     timeoutInterval: timeout)
-            request.httpMethod = "POST"
-            request.addValue("application/json", forHTTPHeaderField: "Content-Type")
-            request.addValue("application/json", forHTTPHeaderField: "Accept")
-
-            // basic auth header (just works on Linux for Swift 3.1+, macOS is fine)
-            guard let credentials = "\(appID):\(appSecret)".data(using: String.Encoding.utf8) else {
-                    toNSLog("Error! Could not set basic auth header")
-                    return complete(false, 0)
-            }
-
-            #if os(Linux)
-            let base64Credentials = Base64.encode([UInt8](credentials))
-            #else
-            let base64Credentials = credentials.base64EncodedString(options: [])
-            #endif
-            request.setValue("Basic \(base64Credentials)", forHTTPHeaderField: "Authorization")
-            //toNSLog("\nrequest:")
-            //print(request)
-
-            // POST parameters
-            let params = ["payload": payload]
-            if(JSONSerialization.isValidJSONObject(params)){
-                do {
-                    request.httpBody = try JSONSerialization.data(withJSONObject: params, options: [])
-                } catch {
-                    toNSLog("Error! Could not create JSON for server payload.")
-                    return complete(false, 0)
-                }
-            }else{
-                return complete(false, 0)
-            }
-            toNSLog("sending params: \(params)")
-            toNSLog("sending ...")
-
-            sendingInProgress = true
-
-            // send request async to server on destination queue
-            let task = session.dataTask(with: request) { _, response, error in
-                var ok = false
-                var status = 0
-                self.toNSLog("received response from server")
-
-                if let error = error {
-                    // an error did occur
-                    self.toNSLog("Error! Could not send entries to server. \(error)")
-                } else {
-                    if let response = response as? HTTPURLResponse {
-                        status = response.statusCode
-                        if status == 200 {
-                            // all went well, entries were uploaded to server
-                            ok = true
-                        } else {
-                            // status code was not 200
-                            var msg = "Error! Sending entries to server failed "
-                            msg += "with status code \(status)"
-                            self.toNSLog(msg)
-                        }
-                    }
-                }
-                return complete(ok, status)
-            }
-            task.resume()
-            session.finishTasksAndInvalidate()
-            //while true {} // commenting this line causes a crash on Linux unit tests?!?
-        }
-    }
-
-    /// returns sending points based on level
-    func sendingPointsForLevel(_ level: SwiftyBeaver.Level) -> Int {
-
-        switch level {
-        case .debug:
-            return sendingPoints.debug
-        case .info:
-            return sendingPoints.info
-        case .warning:
-            return sendingPoints.warning
-        case .error:
-            return sendingPoints.error
-        default:
-            return sendingPoints.verbose
-        }
-    }
-
-    // MARK: File Handling
-
-    /// appends a string as line to a file.
-    /// returns boolean about success
-    func saveToFile(_ str: String, url: URL, overwrite: Bool = false) -> Bool {
-        do {
-            if fileManager.fileExists(atPath: url.path) == false || overwrite {
-                // create file if not existing
-                let line = str + "\n"
-                try line.write(to: url, atomically: true, encoding: String.Encoding.utf8)
-            } else {
-                // append to end of file
-                let fileHandle = try FileHandle(forWritingTo: url)
-                _ = fileHandle.seekToEndOfFile()
-                let line = str + "\n"
-                if let data = line.data(using: String.Encoding.utf8) {
-                    fileHandle.write(data)
-                    fileHandle.closeFile()
-                }
-            }
-            return true
-        } catch {
-            toNSLog("Error! Could not write to file \(url).")
-            return false
-        }
-    }
-
-    func sendFileExists() -> Bool {
-        return fileManager.fileExists(atPath: sendingFileURL.path)
-    }
-
-    func renameJsonToSendFile() -> Bool {
-        do {
-            try fileManager.moveItem(at: entriesFileURL, to: sendingFileURL)
-            return true
-        } catch {
-            toNSLog("SwiftyBeaver Platform Destination could not rename json file.")
-            return false
-        }
-    }
-
-    /// returns optional array of log dicts from a file which has 1 json string per line
-    func logsFromFile(_ url: URL) -> [[String: Any]]? {
-        var lines = 0
-        do {
-            // try to read file, decode every JSON line and put dict from each line in array
-            let fileContent = try String(contentsOfFile: url.path, encoding: .utf8)
-            let linesArray = fileContent.components(separatedBy: "\n")
-            var dicts = [[String: Any]()] // array of dictionaries
-            for lineJSON in linesArray {
-                lines += 1
-                if lineJSON.firstChar == "{" && lineJSON.lastChar == "}" {
-                    // try to parse json string into dict
-                    if let data = lineJSON.data(using: .utf8) {
-                        do {
-                            if let dict = try JSONSerialization.jsonObject(with: data,
-                                options: .mutableContainers) as? [String: Any] {
-                                if !dict.isEmpty {
-                                    dicts.append(dict)
-                                }
-                            }
-                        } catch {
-                            var msg = "Error! Could not parse "
-                            msg += "line \(lines) in file \(url)."
-                            toNSLog(msg)
-                        }
-                    }
-                }
-            }
-            dicts.removeFirst()
-            return dicts
-        } catch {
-            toNSLog("Error! Could not read file \(url).")
-        }
-        return nil
-    }
-
-    /// returns AES-256 CBC encrypted optional string
-    func encrypt(_ str: String) -> String? {
-        return AES256CBC.encryptString(str, password: encryptionKey)
-    }
-
-    /// Delete file to get started again
-    func deleteFile(_ url: URL) -> Bool {
-        do {
-            try FileManager.default.removeItem(at: url)
-            return true
-        } catch {
-            toNSLog("Warning! Could not delete file \(url).")
-        }
-        return false
-    }
-
-    // MARK: Device & Analytics
-
-    // returns dict with device details. Amount depends on platform
-    func deviceDetails() -> [String: String] {
-        var details = [String: String]()
-
-        details["os"] = OS
-        let osVersion = ProcessInfo.processInfo.operatingSystemVersion
-        // becomes for example 10.11.2 for El Capitan
-        var osVersionStr = String(osVersion.majorVersion)
-        osVersionStr += "." + String(osVersion.minorVersion)
-        osVersionStr += "." + String(osVersion.patchVersion)
-        details["osVersion"] = osVersionStr
-        details["deviceName"] = ""
-        details["deviceModel"] = ""
-        details["hostName"] = ""
-        if DEVICE_NAME != "" {
-            details["deviceName"] = DEVICE_NAME
-        }
-        if DEVICE_MODEL != "" {
-            details["deviceModel"] = DEVICE_MODEL
-        }
-        return details
-    }
-
-    /// returns (updated) analytics dict, optionally loaded from file.
-    func analytics(_ url: URL, update: Bool = false) -> [String: Any] {
-
-        var dict = [String: Any]()
-        let now = NSDate().timeIntervalSince1970
-
-        uuid =  NSUUID().uuidString
-        dict["uuid"] = uuid
-        dict["firstStart"] = now
-        dict["lastStart"] = now
-        dict["starts"] = 1
-        dict["userName"] = analyticsUserName
-        dict["firstAppVersion"] = appVersion()
-        dict["appVersion"] = appVersion()
-        dict["firstAppBuild"] = appBuild()
-        dict["appBuild"] = appBuild()
-
-        if let loadedDict = dictFromFile(analyticsFileURL) {
-            if let val = loadedDict["firstStart"] as? Double {
-                dict["firstStart"] = val
-            }
-            if let val = loadedDict["lastStart"] as? Double {
-                if update {
-                    dict["lastStart"] = now
-                } else {
-                    dict["lastStart"] = val
-                }
-            }
-            if let val = loadedDict["starts"] as? Int {
-                if update {
-                    dict["starts"] = val + 1
-                } else {
-                    dict["starts"] = val
-                }
-            }
-            if let val = loadedDict["uuid"] as? String {
-                dict["uuid"] = val
-                uuid = val
-            }
-            if let val = loadedDict["userName"] as? String {
-                if update && !analyticsUserName.isEmpty {
-                    dict["userName"] = analyticsUserName
-                } else {
-                    if !val.isEmpty {
-                        dict["userName"] = val
-                    }
-                }
-            }
-            if let val = loadedDict["firstAppVersion"] as? String {
-                dict["firstAppVersion"] = val
-            }
-            if let val = loadedDict["firstAppBuild"] as? Int {
-                dict["firstAppBuild"] = val
-            }
-        }
-        return dict
-    }
-
-    /// Returns the current app version string (like 1.2.5) or empty string on error
-    func appVersion() -> String {
-        if let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String {
-                return version
-        }
-        return ""
-    }
-
-    /// Returns the current app build as integer (like 563, always incrementing) or 0 on error
-    func appBuild() -> Int {
-        if let version = Bundle.main.infoDictionary?["CFBundleVersion"] as? String {
-            if let intVersion = Int(version) {
-                return intVersion
-            }
-        }
-        return 0
-    }
-
-    /// returns optional dict from a json encoded file
-    func dictFromFile(_ url: URL) -> [String: Any]? {
-        do {
-            let fileContent = try String(contentsOfFile: url.path, encoding: .utf8)
-            if let data = fileContent.data(using: .utf8) {
-                return try JSONSerialization.jsonObject(with: data,
-                                    options: .mutableContainers) as? [String: Any]
-            }
-        } catch {
-            toNSLog("SwiftyBeaver Platform Destination could not read file \(url)")
-        }
-        return nil
-    }
-
-    // turns dict into JSON and saves it to file
-    func saveDictToFile(_ dict: [String: Any], url: URL) -> Bool {
-        let jsonString = jsonStringFromDict(dict)
-
-        if let str = jsonString {
-            toNSLog("saving '\(str)' to \(url)")
-            return saveToFile(str, url: url, overwrite: true)
-        }
-        return false
-    }
-
-    // MARK: Debug Helpers
-
-    /// log String to toNSLog. Used to debug the class logic
-    func toNSLog(_ str: String) {
-        if showNSLog {
-            #if os(Linux)
-                print("SBPlatform: \(str)")
-            #else
-                NSLog("SBPlatform: \(str)")
-            #endif
-        }
-    }
-
-    /// returns the current thread name
-    class func threadName() -> String {
-
-        #if os(Linux)
-            // on 9/30/2016 not yet implemented in server-side Swift:
-            // > import Foundation
-            // > Thread.isMainThread
-            return ""
-        #else
-            if Thread.isMainThread {
-                return ""
-            } else {
-                let threadName = Thread.current.name
-                if let threadName = threadName, !threadName.isEmpty {
-                    return threadName
-                } else {
-                    return String(format: "%p", Thread.current)
-                }
-            }
-        #endif
-    }
-}

+ 0 - 212
Pods/SwiftyBeaver/Sources/SwiftyBeaver.swift

@@ -1,212 +0,0 @@
-//
-//  SwiftyBeaver.swift
-//  SwiftyBeaver
-//
-//  Created by Sebastian Kreutzberger (Twitter @skreutzb) on 28.11.15.
-//  Copyright © 2015 Sebastian Kreutzberger
-//  Some rights reserved: http://opensource.org/licenses/MIT
-//
-
-import Foundation
-
-open class SwiftyBeaver {
-
-    /// version string of framework
-    public static let version = "1.9.4"  // UPDATE ON RELEASE!
-    /// build number of framework
-    public static let build = 1940 // version 1.6.2 -> 1620, UPDATE ON RELEASE!
-
-    public enum Level: Int {
-        case verbose = 0
-        case debug = 1
-        case info = 2
-        case warning = 3
-        case error = 4
-    }
-
-    // a set of active destinations
-    public private(set) static var destinations = Set<BaseDestination>()
-
-    // MARK: Destination Handling
-
-    /// returns boolean about success
-    @discardableResult
-    open class func addDestination(_ destination: BaseDestination) -> Bool {
-        if destinations.contains(destination) {
-            return false
-        }
-        destinations.insert(destination)
-        return true
-    }
-
-    /// returns boolean about success
-    @discardableResult
-    open class func removeDestination(_ destination: BaseDestination) -> Bool {
-        if destinations.contains(destination) == false {
-            return false
-        }
-        destinations.remove(destination)
-        return true
-    }
-
-    /// if you need to start fresh
-    open class func removeAllDestinations() {
-        destinations.removeAll()
-    }
-
-    /// returns the amount of destinations
-    open class func countDestinations() -> Int {
-        return destinations.count
-    }
-
-    /// returns the current thread name
-    class func threadName() -> String {
-
-        #if os(Linux)
-            // on 9/30/2016 not yet implemented in server-side Swift:
-            // > import Foundation
-            // > Thread.isMainThread
-            return ""
-        #else
-            if Thread.isMainThread {
-                return ""
-            } else {
-                let name = __dispatch_queue_get_label(nil)
-                return String(cString: name, encoding: .utf8) ?? Thread.current.description
-            }
-        #endif
-    }
-
-    // MARK: Levels
-
-    /// log something generally unimportant (lowest priority)
-    open class func verbose(_ message: @autoclosure () -> Any, _
-        file: String = #file, _ function: String = #function, line: Int = #line, context: Any? = nil) {
-        #if swift(>=5)
-        custom(level: .verbose, message: message(), file: file, function: function, line: line, context: context)
-        #else
-        custom(level: .verbose, message: message, file: file, function: function, line: line, context: context)
-        #endif
-    }
-
-    /// log something which help during debugging (low priority)
-    open class func debug(_ message: @autoclosure () -> Any, _
-        file: String = #file, _ function: String = #function, line: Int = #line, context: Any? = nil) {
-        #if swift(>=5)
-        custom(level: .debug, message: message(), file: file, function: function, line: line, context: context)
-        #else
-        custom(level: .debug, message: message, file: file, function: function, line: line, context: context)
-        #endif
-    }
-
-    /// log something which you are really interested but which is not an issue or error (normal priority)
-    open class func info(_ message: @autoclosure () -> Any, _
-        file: String = #file, _ function: String = #function, line: Int = #line, context: Any? = nil) {
-        #if swift(>=5)
-        custom(level: .info, message: message(), file: file, function: function, line: line, context: context)
-        #else
-        custom(level: .info, message: message, file: file, function: function, line: line, context: context)
-        #endif
-    }
-
-    /// log something which may cause big trouble soon (high priority)
-    open class func warning(_ message: @autoclosure () -> Any, _
-        file: String = #file, _ function: String = #function, line: Int = #line, context: Any? = nil) {
-        #if swift(>=5)
-        custom(level: .warning, message: message(), file: file, function: function, line: line, context: context)
-        #else
-        custom(level: .warning, message: message, file: file, function: function, line: line, context: context)
-        #endif
-    }
-
-    /// log something which will keep you awake at night (highest priority)
-    open class func error(_ message: @autoclosure () -> Any, _
-        file: String = #file, _ function: String = #function, line: Int = #line, context: Any? = nil) {
-        #if swift(>=5)
-        custom(level: .error, message: message(), file: file, function: function, line: line, context: context)
-        #else
-        custom(level: .error, message: message, file: file, function: function, line: line, context: context)
-        #endif
-    }
-
-    /// custom logging to manually adjust values, should just be used by other frameworks
-    open class func custom(level: SwiftyBeaver.Level, message: @autoclosure () -> Any,
-                             file: String = #file, function: String = #function, line: Int = #line, context: Any? = nil) {
-        #if swift(>=5)
-        dispatch_send(level: level, message: message(), thread: threadName(),
-                      file: file, function: function, line: line, context: context)
-        #else
-        dispatch_send(level: level, message: message, thread: threadName(),
-                      file: file, function: function, line: line, context: context)
-        #endif
-    }
-
-    /// internal helper which dispatches send to dedicated queue if minLevel is ok
-    class func dispatch_send(level: SwiftyBeaver.Level, message: @autoclosure () -> Any,
-        thread: String, file: String, function: String, line: Int, context: Any?) {
-        var resolvedMessage: String?
-        for dest in destinations {
-
-            guard let queue = dest.queue else {
-                continue
-            }
-
-            resolvedMessage = resolvedMessage == nil && dest.hasMessageFilters() ? "\(message())" : resolvedMessage
-            if dest.shouldLevelBeLogged(level, path: file, function: function, message: resolvedMessage) {
-                // try to convert msg object to String and put it on queue
-                let msgStr = resolvedMessage == nil ? "\(message())" : resolvedMessage!
-                let f = stripParams(function: function)
-
-                if dest.asynchronously {
-                    queue.async {
-                        _ = dest.send(level, msg: msgStr, thread: thread, file: file, function: f, line: line, context: context)
-                    }
-                } else {
-                    queue.sync {
-                        _ = dest.send(level, msg: msgStr, thread: thread, file: file, function: f, line: line, context: context)
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     DEPRECATED & NEEDS COMPLETE REWRITE DUE TO SWIFT 3 AND GENERAL INCORRECT LOGIC
-     Flush all destinations to make sure all logging messages have been written out
-     Returns after all messages flushed or timeout seconds
-
-     - returns: true if all messages flushed, false if timeout or error occurred
-     */
-    public class func flush(secondTimeout: Int64) -> Bool {
-
-        /*
-        guard let grp = dispatch_group_create() else { return false }
-        for dest in destinations {
-            if let queue = dest.queue {
-                dispatch_group_enter(grp)
-                queue.asynchronously(execute: {
-                    dest.flush()
-                    grp.leave()
-                })
-            }
-        }
-        let waitUntil = DispatchTime.now(dispatch_time_t(DISPATCH_TIME_NOW), secondTimeout * 1000000000)
-        return dispatch_group_wait(grp, waitUntil) == 0
-         */
-        return true
-    }
-
-    /// removes the parameters from a function because it looks weird with a single param
-    class func stripParams(function: String) -> String {
-        var f = function
-        if let indexOfBrace = f.find("(") {
-            #if swift(>=4.0)
-            f = String(f[..<indexOfBrace])
-            #else
-            f = f.substring(to: indexOfBrace)
-            #endif
-        }
-        f += "()"
-        return f
-    }
-}

+ 0 - 25
Pods/Target Support Files/Pods-deltachat-ios/Pods-deltachat-ios-acknowledgements.markdown

@@ -231,31 +231,6 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-## SwiftyBeaver
-
-The MIT License (MIT)
-
-Copyright (c) 2015 Sebastian Kreutzberger
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
-
 ## libwebp
 
 Copyright (c) 2010, Google Inc. All rights reserved.

+ 0 - 31
Pods/Target Support Files/Pods-deltachat-ios/Pods-deltachat-ios-acknowledgements.plist

@@ -302,37 +302,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</string>
 			<key>Type</key>
 			<string>PSGroupSpecifier</string>
 		</dict>
-		<dict>
-			<key>FooterText</key>
-			<string>The MIT License (MIT)
-
-Copyright (c) 2015 Sebastian Kreutzberger
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-</string>
-			<key>License</key>
-			<string>MIT</string>
-			<key>Title</key>
-			<string>SwiftyBeaver</string>
-			<key>Type</key>
-			<string>PSGroupSpecifier</string>
-		</dict>
 		<dict>
 			<key>FooterText</key>
 			<string>Copyright (c) 2010, Google Inc. All rights reserved.

+ 0 - 2
Pods/Target Support Files/Pods-deltachat-ios/Pods-deltachat-ios-frameworks.sh

@@ -184,7 +184,6 @@ if [[ "$CONFIGURATION" == "Debug" ]]; then
   install_framework "${BUILT_PRODUCTS_DIR}/SDWebImageWebPCoder/SDWebImageWebPCoder.framework"
   install_framework "${BUILT_PRODUCTS_DIR}/SVGKit/SVGKit.framework"
   install_framework "${BUILT_PRODUCTS_DIR}/Swifter/Swifter.framework"
-  install_framework "${BUILT_PRODUCTS_DIR}/SwiftyBeaver/SwiftyBeaver.framework"
   install_framework "${BUILT_PRODUCTS_DIR}/libwebp/libwebp.framework"
 fi
 if [[ "$CONFIGURATION" == "Release" ]]; then
@@ -196,7 +195,6 @@ if [[ "$CONFIGURATION" == "Release" ]]; then
   install_framework "${BUILT_PRODUCTS_DIR}/SDWebImageWebPCoder/SDWebImageWebPCoder.framework"
   install_framework "${BUILT_PRODUCTS_DIR}/SVGKit/SVGKit.framework"
   install_framework "${BUILT_PRODUCTS_DIR}/Swifter/Swifter.framework"
-  install_framework "${BUILT_PRODUCTS_DIR}/SwiftyBeaver/SwiftyBeaver.framework"
   install_framework "${BUILT_PRODUCTS_DIR}/libwebp/libwebp.framework"
 fi
 if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then

+ 4 - 4
Pods/Target Support Files/Pods-deltachat-ios/Pods-deltachat-ios.debug.xcconfig

@@ -1,12 +1,12 @@
 ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
 CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
-FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack" "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift" "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder" "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit" "${PODS_CONFIGURATION_BUILD_DIR}/Swifter" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyBeaver" "${PODS_CONFIGURATION_BUILD_DIR}/libwebp"
+FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack" "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift" "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder" "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit" "${PODS_CONFIGURATION_BUILD_DIR}/Swifter" "${PODS_CONFIGURATION_BUILD_DIR}/libwebp"
 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 $(inherited) SD_WEBP=1
-HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack/CocoaLumberjack.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift/Reachability.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView/SCSiriWaveformView.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin/SDWebImageSVGKitPlugin.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder/SDWebImageWebPCoder.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit/SVGKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Swifter/Swifter.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyBeaver/SwiftyBeaver.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/libwebp/libwebp.framework/Headers"
+HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack/CocoaLumberjack.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift/Reachability.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView/SCSiriWaveformView.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin/SDWebImageSVGKitPlugin.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder/SDWebImageWebPCoder.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit/SVGKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Swifter/Swifter.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/libwebp/libwebp.framework/Headers"
 LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks'
 LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
-OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack/CocoaLumberjack.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift/Reachability.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView/SCSiriWaveformView.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin/SDWebImageSVGKitPlugin.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder/SDWebImageWebPCoder.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit/SVGKit.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Swifter/Swifter.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyBeaver/SwiftyBeaver.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/libwebp/libwebp.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Swifter" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyBeaver" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/libwebp"
-OTHER_LDFLAGS = $(inherited) -l"xml2" -framework "AVFoundation" -framework "CocoaLumberjack" -framework "CoreGraphics" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "ImageIO" -framework "QuartzCore" -framework "Reachability" -framework "SCSiriWaveformView" -framework "SDWebImage" -framework "SDWebImageSVGKitPlugin" -framework "SDWebImageWebPCoder" -framework "SVGKit" -framework "Swifter" -framework "SwiftyBeaver" -framework "SystemConfiguration" -framework "UIKit" -framework "libwebp"
+OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack/CocoaLumberjack.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift/Reachability.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView/SCSiriWaveformView.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin/SDWebImageSVGKitPlugin.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder/SDWebImageWebPCoder.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit/SVGKit.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Swifter/Swifter.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/libwebp/libwebp.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Swifter" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/libwebp"
+OTHER_LDFLAGS = $(inherited) -l"xml2" -framework "AVFoundation" -framework "CocoaLumberjack" -framework "CoreGraphics" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "ImageIO" -framework "QuartzCore" -framework "Reachability" -framework "SCSiriWaveformView" -framework "SDWebImage" -framework "SDWebImageSVGKitPlugin" -framework "SDWebImageWebPCoder" -framework "SVGKit" -framework "Swifter" -framework "SystemConfiguration" -framework "UIKit" -framework "libwebp"
 OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
 PODS_BUILD_DIR = ${BUILD_DIR}
 PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

+ 4 - 4
Pods/Target Support Files/Pods-deltachat-ios/Pods-deltachat-ios.release.xcconfig

@@ -1,12 +1,12 @@
 ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
 CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
-FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack" "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift" "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder" "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit" "${PODS_CONFIGURATION_BUILD_DIR}/Swifter" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyBeaver" "${PODS_CONFIGURATION_BUILD_DIR}/libwebp"
+FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack" "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift" "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder" "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit" "${PODS_CONFIGURATION_BUILD_DIR}/Swifter" "${PODS_CONFIGURATION_BUILD_DIR}/libwebp"
 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 $(inherited) SD_WEBP=1
-HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack/CocoaLumberjack.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift/Reachability.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView/SCSiriWaveformView.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin/SDWebImageSVGKitPlugin.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder/SDWebImageWebPCoder.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit/SVGKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Swifter/Swifter.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyBeaver/SwiftyBeaver.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/libwebp/libwebp.framework/Headers"
+HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack/CocoaLumberjack.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift/Reachability.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView/SCSiriWaveformView.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin/SDWebImageSVGKitPlugin.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder/SDWebImageWebPCoder.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit/SVGKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Swifter/Swifter.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/libwebp/libwebp.framework/Headers"
 LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks'
 LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
-OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack/CocoaLumberjack.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift/Reachability.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView/SCSiriWaveformView.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin/SDWebImageSVGKitPlugin.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder/SDWebImageWebPCoder.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit/SVGKit.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Swifter/Swifter.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyBeaver/SwiftyBeaver.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/libwebp/libwebp.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Swifter" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyBeaver" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/libwebp"
-OTHER_LDFLAGS = $(inherited) -l"xml2" -framework "AVFoundation" -framework "CocoaLumberjack" -framework "CoreGraphics" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "ImageIO" -framework "QuartzCore" -framework "Reachability" -framework "SCSiriWaveformView" -framework "SDWebImage" -framework "SDWebImageSVGKitPlugin" -framework "SDWebImageWebPCoder" -framework "SVGKit" -framework "Swifter" -framework "SwiftyBeaver" -framework "SystemConfiguration" -framework "UIKit" -framework "libwebp"
+OTHER_CFLAGS = $(inherited) -isystem "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack/CocoaLumberjack.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift/Reachability.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView/SCSiriWaveformView.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin/SDWebImageSVGKitPlugin.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder/SDWebImageWebPCoder.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit/SVGKit.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/Swifter/Swifter.framework/Headers" -isystem "${PODS_CONFIGURATION_BUILD_DIR}/libwebp/libwebp.framework/Headers" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/Swifter" -iframework "${PODS_CONFIGURATION_BUILD_DIR}/libwebp"
+OTHER_LDFLAGS = $(inherited) -l"xml2" -framework "AVFoundation" -framework "CocoaLumberjack" -framework "CoreGraphics" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "ImageIO" -framework "QuartzCore" -framework "Reachability" -framework "SCSiriWaveformView" -framework "SDWebImage" -framework "SDWebImageSVGKitPlugin" -framework "SDWebImageWebPCoder" -framework "SVGKit" -framework "Swifter" -framework "SystemConfiguration" -framework "UIKit" -framework "libwebp"
 OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
 PODS_BUILD_DIR = ${BUILD_DIR}
 PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

+ 3 - 3
Pods/Target Support Files/Pods-deltachat-iosTests/Pods-deltachat-iosTests.debug.xcconfig

@@ -1,8 +1,8 @@
 CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
-FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack" "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift" "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder" "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit" "${PODS_CONFIGURATION_BUILD_DIR}/Swifter" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyBeaver" "${PODS_CONFIGURATION_BUILD_DIR}/libwebp"
+FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack" "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift" "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder" "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit" "${PODS_CONFIGURATION_BUILD_DIR}/Swifter" "${PODS_CONFIGURATION_BUILD_DIR}/libwebp"
 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 $(inherited) SD_WEBP=1
-HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack/CocoaLumberjack.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift/Reachability.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView/SCSiriWaveformView.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin/SDWebImageSVGKitPlugin.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder/SDWebImageWebPCoder.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit/SVGKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Swifter/Swifter.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyBeaver/SwiftyBeaver.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/libwebp/libwebp.framework/Headers"
-OTHER_LDFLAGS = $(inherited) -l"xml2" -framework "AVFoundation" -framework "CocoaLumberjack" -framework "CoreGraphics" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "ImageIO" -framework "QuartzCore" -framework "Reachability" -framework "SCSiriWaveformView" -framework "SDWebImage" -framework "SDWebImageSVGKitPlugin" -framework "SDWebImageWebPCoder" -framework "SVGKit" -framework "Swifter" -framework "SwiftyBeaver" -framework "SystemConfiguration" -framework "UIKit" -framework "libwebp"
+HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack/CocoaLumberjack.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift/Reachability.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView/SCSiriWaveformView.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin/SDWebImageSVGKitPlugin.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder/SDWebImageWebPCoder.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit/SVGKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Swifter/Swifter.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/libwebp/libwebp.framework/Headers"
+OTHER_LDFLAGS = $(inherited) -l"xml2" -framework "AVFoundation" -framework "CocoaLumberjack" -framework "CoreGraphics" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "ImageIO" -framework "QuartzCore" -framework "Reachability" -framework "SCSiriWaveformView" -framework "SDWebImage" -framework "SDWebImageSVGKitPlugin" -framework "SDWebImageWebPCoder" -framework "SVGKit" -framework "Swifter" -framework "SystemConfiguration" -framework "UIKit" -framework "libwebp"
 PODS_BUILD_DIR = ${BUILD_DIR}
 PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
 PODS_PODFILE_DIR_PATH = ${SRCROOT}/.

+ 3 - 3
Pods/Target Support Files/Pods-deltachat-iosTests/Pods-deltachat-iosTests.release.xcconfig

@@ -1,8 +1,8 @@
 CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
-FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack" "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift" "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder" "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit" "${PODS_CONFIGURATION_BUILD_DIR}/Swifter" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyBeaver" "${PODS_CONFIGURATION_BUILD_DIR}/libwebp"
+FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack" "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift" "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder" "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit" "${PODS_CONFIGURATION_BUILD_DIR}/Swifter" "${PODS_CONFIGURATION_BUILD_DIR}/libwebp"
 GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 $(inherited) SD_WEBP=1
-HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack/CocoaLumberjack.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift/Reachability.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView/SCSiriWaveformView.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin/SDWebImageSVGKitPlugin.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder/SDWebImageWebPCoder.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit/SVGKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Swifter/Swifter.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyBeaver/SwiftyBeaver.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/libwebp/libwebp.framework/Headers"
-OTHER_LDFLAGS = $(inherited) -l"xml2" -framework "AVFoundation" -framework "CocoaLumberjack" -framework "CoreGraphics" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "ImageIO" -framework "QuartzCore" -framework "Reachability" -framework "SCSiriWaveformView" -framework "SDWebImage" -framework "SDWebImageSVGKitPlugin" -framework "SDWebImageWebPCoder" -framework "SVGKit" -framework "Swifter" -framework "SwiftyBeaver" -framework "SystemConfiguration" -framework "UIKit" -framework "libwebp"
+HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack/CocoaLumberjack.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift/Reachability.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SCSiriWaveformView/SCSiriWaveformView.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage/SDWebImage.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageSVGKitPlugin/SDWebImageSVGKitPlugin.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImageWebPCoder/SDWebImageWebPCoder.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SVGKit/SVGKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Swifter/Swifter.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/libwebp/libwebp.framework/Headers"
+OTHER_LDFLAGS = $(inherited) -l"xml2" -framework "AVFoundation" -framework "CocoaLumberjack" -framework "CoreGraphics" -framework "CoreTelephony" -framework "CoreText" -framework "Foundation" -framework "ImageIO" -framework "QuartzCore" -framework "Reachability" -framework "SCSiriWaveformView" -framework "SDWebImage" -framework "SDWebImageSVGKitPlugin" -framework "SDWebImageWebPCoder" -framework "SVGKit" -framework "Swifter" -framework "SystemConfiguration" -framework "UIKit" -framework "libwebp"
 PODS_BUILD_DIR = ${BUILD_DIR}
 PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
 PODS_PODFILE_DIR_PATH = ${SRCROOT}/.

+ 0 - 26
Pods/Target Support Files/SwiftyBeaver/SwiftyBeaver-Info.plist

@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-  <key>CFBundleDevelopmentRegion</key>
-  <string>en</string>
-  <key>CFBundleExecutable</key>
-  <string>${EXECUTABLE_NAME}</string>
-  <key>CFBundleIdentifier</key>
-  <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
-  <key>CFBundleInfoDictionaryVersion</key>
-  <string>6.0</string>
-  <key>CFBundleName</key>
-  <string>${PRODUCT_NAME}</string>
-  <key>CFBundlePackageType</key>
-  <string>FMWK</string>
-  <key>CFBundleShortVersionString</key>
-  <string>1.9.4</string>
-  <key>CFBundleSignature</key>
-  <string>????</string>
-  <key>CFBundleVersion</key>
-  <string>${CURRENT_PROJECT_VERSION}</string>
-  <key>NSPrincipalClass</key>
-  <string></string>
-</dict>
-</plist>

+ 0 - 5
Pods/Target Support Files/SwiftyBeaver/SwiftyBeaver-dummy.m

@@ -1,5 +0,0 @@
-#import <Foundation/Foundation.h>
-@interface PodsDummy_SwiftyBeaver : NSObject
-@end
-@implementation PodsDummy_SwiftyBeaver
-@end

+ 0 - 12
Pods/Target Support Files/SwiftyBeaver/SwiftyBeaver-prefix.pch

@@ -1,12 +0,0 @@
-#ifdef __OBJC__
-#import <UIKit/UIKit.h>
-#else
-#ifndef FOUNDATION_EXPORT
-#if defined(__cplusplus)
-#define FOUNDATION_EXPORT extern "C"
-#else
-#define FOUNDATION_EXPORT extern
-#endif
-#endif
-#endif
-

+ 0 - 16
Pods/Target Support Files/SwiftyBeaver/SwiftyBeaver-umbrella.h

@@ -1,16 +0,0 @@
-#ifdef __OBJC__
-#import <UIKit/UIKit.h>
-#else
-#ifndef FOUNDATION_EXPORT
-#if defined(__cplusplus)
-#define FOUNDATION_EXPORT extern "C"
-#else
-#define FOUNDATION_EXPORT extern
-#endif
-#endif
-#endif
-
-
-FOUNDATION_EXPORT double SwiftyBeaverVersionNumber;
-FOUNDATION_EXPORT const unsigned char SwiftyBeaverVersionString[];
-

+ 0 - 13
Pods/Target Support Files/SwiftyBeaver/SwiftyBeaver.debug.xcconfig

@@ -1,13 +0,0 @@
-CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
-CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftyBeaver
-GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
-LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
-OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings
-PODS_BUILD_DIR = ${BUILD_DIR}
-PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
-PODS_ROOT = ${SRCROOT}
-PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftyBeaver
-PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
-PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
-SKIP_INSTALL = YES
-USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES

+ 0 - 6
Pods/Target Support Files/SwiftyBeaver/SwiftyBeaver.modulemap

@@ -1,6 +0,0 @@
-framework module SwiftyBeaver {
-  umbrella header "SwiftyBeaver-umbrella.h"
-
-  export *
-  module * { export * }
-}

+ 0 - 13
Pods/Target Support Files/SwiftyBeaver/SwiftyBeaver.release.xcconfig

@@ -1,13 +0,0 @@
-CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
-CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftyBeaver
-GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
-LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
-OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings
-PODS_BUILD_DIR = ${BUILD_DIR}
-PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
-PODS_ROOT = ${SRCROOT}
-PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftyBeaver
-PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
-PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
-SKIP_INSTALL = YES
-USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES

+ 0 - 10
Pods/Target Support Files/SwiftyBeaver/SwiftyBeaver.xcconfig

@@ -1,10 +0,0 @@
-CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftyBeaver
-GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
-OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings
-PODS_BUILD_DIR = ${BUILD_DIR}
-PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
-PODS_ROOT = ${SRCROOT}
-PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftyBeaver
-PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
-SKIP_INSTALL = YES
-USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES

+ 6 - 14
deltachat-ios.xcodeproj/project.pbxproj

@@ -70,7 +70,6 @@
 		3067AA4C2666310E00525036 /* ChatInputTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3067AA4B2666310E00525036 /* ChatInputTextView.swift */; };
 		3067AAC62667F3FE00525036 /* ImageFormat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3067AAC52667F3FE00525036 /* ImageFormat.swift */; };
 		3067AAC72667F3FE00525036 /* ImageFormat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3067AAC52667F3FE00525036 /* ImageFormat.swift */; };
-		306C32322445CDE9001D89F3 /* DcLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 306C32312445CDE9001D89F3 /* DcLogger.swift */; };
 		30703B6D27AA80FF00BDADE6 /* WebxdcCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30703B6C27AA80FF00BDADE6 /* WebxdcCell.swift */; };
 		30734326249A280B00BF9AD1 /* MediaQualityViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30734325249A280B00BF9AD1 /* MediaQualityViewController.swift */; };
 		307A82CC25B8D26700748B57 /* ChatEditingBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 307A82CB25B8D26700748B57 /* ChatEditingBar.swift */; };
@@ -116,6 +115,8 @@
 		30E348DF24F3F819005C93D1 /* ChatTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30E348DE24F3F819005C93D1 /* ChatTableView.swift */; };
 		30E348E124F53772005C93D1 /* ImageTextCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30E348E024F53772005C93D1 /* ImageTextCell.swift */; };
 		30E348E524F6647D005C93D1 /* FileTextCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30E348E424F6647D005C93D1 /* FileTextCell.swift */; };
+		30E6E35A293FEEA70093871E /* SimpleLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30E6E359293FEEA70093871E /* SimpleLogger.swift */; };
+		30E6E35B293FF9F30093871E /* SimpleLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30E6E359293FEEA70093871E /* SimpleLogger.swift */; };
 		30E83EFD289BF32C0035614C /* ShortcutManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30E83EFC289BF32C0035614C /* ShortcutManager.swift */; };
 		30E8F2132447285600CE2C90 /* ShareViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30E8F2122447285600CE2C90 /* ShareViewController.swift */; };
 		30E8F2162447285600CE2C90 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 30E8F2142447285600CE2C90 /* MainInterface.storyboard */; };
@@ -356,7 +357,6 @@
 		30653080254358B10093E196 /* QuoteView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuoteView.swift; sourceTree = "<group>"; };
 		3067AA4B2666310E00525036 /* ChatInputTextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatInputTextView.swift; sourceTree = "<group>"; };
 		3067AAC52667F3FE00525036 /* ImageFormat.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageFormat.swift; sourceTree = "<group>"; };
-		306C32312445CDE9001D89F3 /* DcLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DcLogger.swift; sourceTree = "<group>"; };
 		30703B6C27AA80FF00BDADE6 /* WebxdcCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebxdcCell.swift; sourceTree = "<group>"; };
 		30734325249A280B00BF9AD1 /* MediaQualityViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MediaQualityViewController.swift; sourceTree = "<group>"; };
 		307A82CB25B8D26700748B57 /* ChatEditingBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatEditingBar.swift; sourceTree = "<group>"; };
@@ -398,6 +398,7 @@
 		30E348DE24F3F819005C93D1 /* ChatTableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatTableView.swift; sourceTree = "<group>"; };
 		30E348E024F53772005C93D1 /* ImageTextCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageTextCell.swift; sourceTree = "<group>"; };
 		30E348E424F6647D005C93D1 /* FileTextCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileTextCell.swift; sourceTree = "<group>"; };
+		30E6E359293FEEA70093871E /* SimpleLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SimpleLogger.swift; sourceTree = "<group>"; };
 		30E83EFC289BF32C0035614C /* ShortcutManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShortcutManager.swift; sourceTree = "<group>"; };
 		30E8F2102447285600CE2C90 /* Delta Chat.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Delta Chat.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
 		30E8F2122447285600CE2C90 /* ShareViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareViewController.swift; sourceTree = "<group>"; };
@@ -595,7 +596,6 @@
 			isa = PBXGroup;
 			children = (
 				304219D82440734A00516852 /* DcMsg+Extension.swift */,
-				306C32312445CDE9001D89F3 /* DcLogger.swift */,
 			);
 			path = DC;
 			sourceTree = "<group>";
@@ -996,6 +996,7 @@
 				3011E8042787365D00214221 /* KeychainManager.swift */,
 				30E83EFC289BF32C0035614C /* ShortcutManager.swift */,
 				30CE137728D9C40700158DF4 /* ChatDropInteraction.swift */,
+				30E6E359293FEEA70093871E /* SimpleLogger.swift */,
 			);
 			path = Helper;
 			sourceTree = "<group>";
@@ -1273,7 +1274,6 @@
 				"${BUILT_PRODUCTS_DIR}/SDWebImageWebPCoder/SDWebImageWebPCoder.framework",
 				"${BUILT_PRODUCTS_DIR}/SVGKit/SVGKit.framework",
 				"${BUILT_PRODUCTS_DIR}/Swifter/Swifter.framework",
-				"${BUILT_PRODUCTS_DIR}/SwiftyBeaver/SwiftyBeaver.framework",
 				"${BUILT_PRODUCTS_DIR}/libwebp/libwebp.framework",
 			);
 			name = "[CP] Embed Pods Frameworks";
@@ -1286,7 +1286,6 @@
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImageWebPCoder.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SVGKit.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Swifter.framework",
-				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyBeaver.framework",
 				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libwebp.framework",
 			);
 			runOnlyForDeploymentPostprocessing = 0;
@@ -1432,6 +1431,7 @@
 				30152CA025A5D97900377714 /* UIEdgeInsets+Extensions.swift in Sources */,
 				3067AAC72667F3FE00525036 /* ImageFormat.swift in Sources */,
 				30E8F253244DAD0E00CE2C90 /* SendingController.swift in Sources */,
+				30E6E35B293FF9F30093871E /* SimpleLogger.swift in Sources */,
 				3057028C24C5E7B600D84EFC /* ContactCellViewModel.swift in Sources */,
 				30152C9425A5D91400377714 /* PaddingTextView.swift in Sources */,
 				30152C9725A5D91900377714 /* MessageLabel.swift in Sources */,
@@ -1500,7 +1500,6 @@
 				AEE700252438E0E500D6992E /* ProgressAlertHandler.swift in Sources */,
 				30E348E524F6647D005C93D1 /* FileTextCell.swift in Sources */,
 				30238CFD28A5028300EF14AC /* WebxdcGridCell.swift in Sources */,
-				306C32322445CDE9001D89F3 /* DcLogger.swift in Sources */,
 				3080A036277DE30100E74565 /* NSMutableAttributedString+Extensions.swift in Sources */,
 				307A82CC25B8D26700748B57 /* ChatEditingBar.swift in Sources */,
 				30703B6D27AA80FF00BDADE6 /* WebxdcCell.swift in Sources */,
@@ -1533,6 +1532,7 @@
 				3008CB7624F95B6D00E6A617 /* AudioController.swift in Sources */,
 				3080A035277DE30100E74565 /* String+Extensions.swift in Sources */,
 				302B84CE2397F6CD001C261F /* URL+Extension.swift in Sources */,
+				30E6E35A293FEEA70093871E /* SimpleLogger.swift in Sources */,
 				7A9FB1441FB061E2001FEA36 /* AppDelegate.swift in Sources */,
 				30C7D5EE28F47E620078D24C /* MessageCounter.swift in Sources */,
 				30E83EFD289BF32C0035614C /* ShortcutManager.swift in Sources */,
@@ -1999,8 +1999,6 @@
 					"\"${PODS_CONFIGURATION_BUILD_DIR}/QuickTableViewController/QuickTableViewController.framework/Headers\"",
 					"-isystem",
 					"\"${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift/Reachability.framework/Headers\"",
-					"-isystem",
-					"\"${PODS_CONFIGURATION_BUILD_DIR}/SwiftyBeaver/SwiftyBeaver.framework/Headers\"",
 					"-iframework",
 					"\"${PODS_CONFIGURATION_BUILD_DIR}/ALCameraViewController\"",
 					"-iframework",
@@ -2015,8 +2013,6 @@
 					"\"${PODS_CONFIGURATION_BUILD_DIR}/QuickTableViewController\"",
 					"-iframework",
 					"\"${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift\"",
-					"-iframework",
-					"\"${PODS_CONFIGURATION_BUILD_DIR}/SwiftyBeaver\"",
 				);
 				OTHER_LDFLAGS = "$(inherited)";
 				PRODUCT_BUNDLE_IDENTIFIER = chat.delta;
@@ -2073,8 +2069,6 @@
 					"\"${PODS_CONFIGURATION_BUILD_DIR}/QuickTableViewController/QuickTableViewController.framework/Headers\"",
 					"-isystem",
 					"\"${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift/Reachability.framework/Headers\"",
-					"-isystem",
-					"\"${PODS_CONFIGURATION_BUILD_DIR}/SwiftyBeaver/SwiftyBeaver.framework/Headers\"",
 					"-iframework",
 					"\"${PODS_CONFIGURATION_BUILD_DIR}/ALCameraViewController\"",
 					"-iframework",
@@ -2089,8 +2083,6 @@
 					"\"${PODS_CONFIGURATION_BUILD_DIR}/QuickTableViewController\"",
 					"-iframework",
 					"\"${PODS_CONFIGURATION_BUILD_DIR}/ReachabilitySwift\"",
-					"-iframework",
-					"\"${PODS_CONFIGURATION_BUILD_DIR}/SwiftyBeaver\"",
 				);
 				OTHER_LDFLAGS = "$(inherited)";
 				PRODUCT_BUNDLE_IDENTIFIER = chat.delta;

+ 2 - 7
deltachat-ios/AppDelegate.swift

@@ -1,6 +1,5 @@
 import AudioToolbox
 import Reachability
-import SwiftyBeaver
 import UIKit
 import UserNotifications
 import DcCore
@@ -8,7 +7,7 @@ import SDWebImageWebPCoder
 import Intents
 import SDWebImageSVGKitPlugin
 
-let logger = SwiftyBeaver.self
+let logger = SimpleLogger()
 
 @UIApplicationMain
 class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate {
@@ -54,10 +53,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
         // setupCrashReporting() may create an additional handler, but we do not want to rely on that
         signal(SIGPIPE, SIG_IGN)
 
-        let console = ConsoleDestination()
-        console.format = "$DHH:mm:ss.SSS$d $C$L$c $M" // see https://docs.swiftybeaver.com/article/20-custom-format
-        logger.addDestination(console)
-
         logger.info("➡️ didFinishLaunchingWithOptions")
 
         let webPCoder = SDImageWebPCoder.shared
@@ -65,7 +60,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
         let svgCoder = SDImageSVGKCoder.shared
         SDImageCodersManager.shared.addCoder(svgCoder)
 
-        dcAccounts.logger = DcLogger()
+        dcAccounts.logger = SimpleLogger()
         dcAccounts.openDatabase()
         migrateToDcAccounts()
 

+ 0 - 26
deltachat-ios/DC/DcLogger.swift

@@ -1,26 +0,0 @@
-import Foundation
-import DcCore
-
-class DcLogger: Logger {
-    func verbose(_ message: String) {
-        logger.verbose(message)
-    }
-
-    func debug(_ message: String) {
-        logger.debug(message)
-    }
-
-    func info(_ message: String) {
-        logger.info(message)
-    }
-
-    func warning(_ message: String) {
-        logger.warning(message)
-    }
-
-    func error(_ message: String) {
-        logger.error(message)
-    }
-
-
-}

+ 37 - 0
deltachat-ios/Helper/SimpleLogger.swift

@@ -0,0 +1,37 @@
+import Foundation
+import DcCore
+
+class SimpleLogger: Logger {
+
+    func verbose(_ messages: Any...) {
+        addLog(heart: "💜", messages: messages)
+    }
+
+    func debug(_ messages: Any...) {
+        addLog(heart: "💚", messages: messages)
+    }
+
+    func info(_ messages: Any...) {
+        addLog(heart: "💙", messages: messages)
+    }
+
+    func warning(_ messages: Any...) {
+        addLog(heart: "🧡", messages: messages)
+    }
+
+    func error(_ messages: Any...) {
+        addLog(heart: "❤️", messages: messages)
+    }
+
+    private func addLog(heart: String, messages: Any...) {
+        if messages is [String] {
+            var messagesSummary = ""
+            messages.forEach({(message) in
+                messagesSummary = "\(messagesSummary) \(message)"
+            })
+            print(DateUtils.getTimestamp(), heart, messagesSummary)
+        } else {
+            print(DateUtils.getTimestamp(), heart, messages)
+        }
+    }
+}

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor