ソースを参照

merge dd5d7e1fcb

wenweiwei 3 年 前
コミット
cd5239648c
2 ファイル変更0 行追加51 行削除
  1. 0 45
      BFBundle+Ext.swift
  2. 0 6
      BFCommonKit/Classes/BFCategorys/BFBundle+Ext.swift

+ 0 - 45
BFBundle+Ext.swift

@@ -1,45 +0,0 @@
-//
-//  Bundle+Ext.swift
-//  BFFramework
-//
-//  Created by ak on 2021/6/2.
-//  取 BFFramework 资源目录
-
-import Foundation
-
-public extension Bundle {
-    // bf main bundle url
-//    func BF_mainbundle_URL() -> URL {
-//        let bundle: Bundle = Bundle(for: BFBaseViewController.self)
-//        return bundle.url(forResource: "BFFramework", withExtension: "bundle")!
-//    }
-
-    func BF_mainbundle_URL() -> URL {
-        var bundleURL = Bundle.main.url(forResource: "Frameworks", withExtension: nil)
-        bundleURL = bundleURL?.appendingPathComponent("BFCommonKit").appendingPathExtension("framework")
-        let bundle: Bundle = Bundle(url: bundleURL!)!
-        return bundle.url(forResource: "BFCommonKit_Resources", withExtension: "bundle")!
-    }
-
-    // bf main bundle
-    func BF_mainbundle() -> Bundle {
-        return Bundle(url: BF_mainbundle_URL())!
-    }
-
-    private class func bundleURL(moduleName: String,isAssets: Bool = true) -> URL? {
-        if isAssets {
-            var bundleURL = Bundle.main.url(forResource: "Frameworks", withExtension: nil)
-            bundleURL = bundleURL?.appendingPathComponent(moduleName).appendingPathExtension("framework").appendingPathComponent("\(moduleName)_Resources").appendingPathExtension("bundle")
-            return bundleURL
-        } else {
-            return Bundle.main.url(forResource: "\(moduleName)_Resources", withExtension: "bundle")
-        }
-    }
-
-    class func current(moduleName: String,isAssets: Bool = true) -> Bundle? {
-        guard let url = bundleURL(moduleName: moduleName,isAssets: isAssets) else {
-            return nil
-        }
-        return Bundle(url: url)
-    }
-}

+ 0 - 6
BFCommonKit/Classes/BFCategorys/BFBundle+Ext.swift

@@ -8,12 +8,6 @@
 import Foundation
 
 public extension Bundle {
-    // bf main bundle url
-//    func BF_mainbundle_URL() -> URL {
-//        let bundle: Bundle = Bundle(for: BFBaseViewController.self)
-//        return bundle.url(forResource: "BFFramework", withExtension: "bundle")!
-//    }
-
     func BF_mainbundle_URL() -> URL {
         var bundleURL = Bundle.main.url(forResource: "Frameworks", withExtension: nil)
         bundleURL = bundleURL?.appendingPathComponent("BFCommonKit").appendingPathExtension("framework")