//
//  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 {
        var bundleURL = Bundle.main.url(forResource: "Frameworks", withExtension: nil)
        bundleURL = bundleURL?.appendingPathComponent("BFCommonKit").appendingPathExtension("framework")
        let bundle: Bundle = Bundle.init(url: bundleURL!)!
        return bundle.url(forResource: "BFCommon_Resources", withExtension: "bundle")!
    }

    // bf main bundle
    func BF_mainbundle() -> Bundle {
        return Bundle(url: BF_mainbundle_URL())!
    }
}
