From d25ba3bcd2ae9a7e86a049e3159830f76da4f418 Mon Sep 17 00:00:00 2001 From: Mehdi Mirzaie Date: Tue, 12 Jul 2022 01:46:30 +0430 Subject: [PATCH] Fix build warnings (#21) Co-authored-by: Mehdi Mirzaei --- Sources/NetShears/Extension/Bundle+Extension.swift | 4 ++-- Sources/NetShears/UI/BodyDetailViewController.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/NetShears/Extension/Bundle+Extension.swift b/Sources/NetShears/Extension/Bundle+Extension.swift index 70e8ed1..efa5a46 100644 --- a/Sources/NetShears/Extension/Bundle+Extension.swift +++ b/Sources/NetShears/Extension/Bundle+Extension.swift @@ -12,14 +12,14 @@ extension Bundle { #if SWIFT_PACKAGE let resourceBundle = Bundle.module return resourceBundle - #endif + #else let podBundle = Bundle(for: NetShears.classForCoder()) if let bundleURL = podBundle.url(forResource: "NetShears", withExtension: "bundle"){ if let bundle = Bundle(url: bundleURL) { return bundle } } - return Bundle(for: NetShears.classForCoder()) + #endif } } diff --git a/Sources/NetShears/UI/BodyDetailViewController.swift b/Sources/NetShears/UI/BodyDetailViewController.swift index 429cf44..a7c85b1 100644 --- a/Sources/NetShears/UI/BodyDetailViewController.swift +++ b/Sources/NetShears/UI/BodyDetailViewController.swift @@ -49,7 +49,7 @@ final class BodyDetailViewController: UIViewController, ShowLoaderProtocol { override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) let hud = showLoader(view: view) - RequestExporter.body(data, bodyExportType: bodyExportType ?? .default) { [weak self] (stringData) in + RequestExporter.body(data, bodyExportType: bodyExportType ) { [weak self] (stringData) in let formattedJSON = stringData DispatchQueue.main.async { self?.textView.text = formattedJSON