If .DS_Store was never added to your git repository, simply add it to your .gitignore file.
.gitignore
In your the root directory of your app and simply write
| #if canImport(UIKit) | |
| import UIKit | |
| extension UIColor { | |
| static var random: UIColor { | |
| return UIColor( | |
| red: .random(in: 0...1), | |
| green: .random(in: 0...1), | |
| blue: .random(in: 0...1) | |
| ) |
| enum ASCIIColor: String { | |
| case black = "\u{001B}[0;30m" | |
| case red = "\u{001B}[0;31m" | |
| case green = "\u{001B}[0;32m" | |
| case yellow = "\u{001B}[0;33m" | |
| case blue = "\u{001B}[0;34m" | |
| case magenta = "\u{001B}[0;35m" | |
| case cyan = "\u{001B}[0;36m" | |
| case white = "\u{001B}[0;37m" | |
| case `default` = "\u{001B}[0;0m" |
| import Foundation | |
| extension Data { | |
| var prettyPrintedJSONString: NSString? { /// NSString gives us a nice sanitized debugDescription | |
| guard let object = try? JSONSerialization.jsonObject(with: self, options: []), | |
| let data = try? JSONSerialization.data(withJSONObject: object, options: [.prettyPrinted]), | |
| let prettyPrintedString = NSString(data: data, encoding: String.Encoding.utf8.rawValue) else { return nil } | |
| return prettyPrintedString | |
| } |