 //
 
 import UIKit
+
 
 /// 应用版本号 Build 字段格式
 ///

    public func imagePath(forResource name: String?, ofType ext: String?) -> String? {
        guard let name = name else { return nil }
        guard let ext = ext else { return nil }
        
        var scaleString = "@2x"
        if UIScreen.main.scale == 3.0 {
            scaleString = "@3x"
        } else if UIScreen.main.scale == 1.0 {
            scaleString = "@1x"
        }
        
        guard let path = base.path(forResource: name + scaleString, ofType: ext) else {
            return base.path(forResource: name, ofType: ext)
        }
        return path
    }
    
}

        return format == .normal ? "\(version) (\(build))" : "\(version).\(build)"
    }

}


extension RGAppTools where Base: Bundle {

    /// Main Bundle 路径
    public static var mainBundlePath: String {
        return Bundle.main.bundlePath
    }

    public static var mainBundleVersion: String? {
        let version = Bundle.main.rat.version
        return version
