 import Foundation
 import UIKit
 
-// MARK: - Variables -
+// MARK: - Global variables -
 
 /// Used to store the BFHasBeenOpened in defaults
-private let BFHasBeenOpened = "BFHasBeenOpened"
-/// Used to store the BFHasBeenOpenedForCurrentVersion in defaults
-private let BFHasBeenOpenedForCurrentVersion = "\(BFHasBeenOpened)\(APP_VERSION)"
+private let BFAppHasBeenOpened = "BFAppHasBeenOpened"
 
 /// Get App name
-public let APP_NAME: String = Bundle(for: BFApp.self).infoDictionary!["CFBundleDisplayName"] as! String
+public let AppName: String = Bundle(for: BFApp.self).infoDictionary!["CFBundleDisplayName"] as! String
 
 /// Get App build
-public let APP_BUILD: String = Bundle(for: BFApp.self).infoDictionary!["CFBundleVersion"] as! String
+public let AppBuild: String = Bundle(for: BFApp.self).infoDictionary!["CFBundleVersion"] as! String
 
 /// Get App version
-public let APP_VERSION: String = Bundle(for: BFApp.self).infoDictionary!["CFBundleShortVersionString"] as! String
+public let AppVersion: String = Bundle(for: BFApp.self).infoDictionary!["CFBundleShortVersionString"] as! String
 
 // MARK: - Global functions -
 

        }
    }
    
    /// Returns if is the first start of the App for current version
    public static var isFirstStartForCurrentVersion: Bool {
        let defaults = UserDefaults.standard()
        let hasBeenOpenedForCurrentVersion: Bool = defaults.bool(forKey: BFHasBeenOpenedForCurrentVersion)
        if hasBeenOpenedForCurrentVersion != true {
            return true
        } else {
            return false
        }
    }
    
    /**
     Returns if is the first start of the App for the given version
     
     - parameter version: Version to be checked
     
     - returns: Returns if is the first start of the App for the given version
     */
    public static func isFirstStartForVersion(_ version: String) -> Bool {
        let defaults = UserDefaults.standard()
        let hasBeenOpenedForCurrentVersion: Bool = defaults.bool(forKey: BFHasBeenOpened + "\(version)")
        if hasBeenOpenedForCurrentVersion != true {
            return true
        } else {
            return false
        }
    }
}

    return NSLocalizedString(key, comment: "")
}

#if os(iOS)
    /// Get AppDelegate. To use it, cast to AppDelegate with "as! AppDelegate"
    let appDelegate: UIApplicationDelegate? = UIApplication.shared().delegate
#endif

/// This class adds some useful functions for the App
public class BFApp {
