         return nil
     }
     
+    ///function to load data from NSUserDefaults
+    public func loadStringArrayDataConfig(locator: String) -> Array<String>? {
+        let data: AnyObject? = loadAnyData(locator)
+        
+        if let _: AnyObject = data {
+            let object = data as? Array<String>
+            return object
+        }
+        return nil
+    }
+    
     /**
      General function to load any type of data from an NSUserDefaults
      

//  Copyright (c) 2015 Hugo Alonso. All rights reserved.
//
import Foundation

public class GeneralDataManager {
    
    private var prefs: NSUserDefaults
    private var myDict: NSDictionary?
    //MARK: Singleton
    public static let instance = GeneralDataManager ()
    
    private convenience init() {
        self.init(userDefaults: NSUserDefaults.standardUserDefaults())
    }
    
    public func defaultDataIsLoaded() -> Bool {
        return myDict != nil
    }
    
    public func loadDefaults(configFileName: String, bundle: NSBundle?) -> GeneralDataManager {
        // Read from the Configuration plist the data to make the state of the object valid.
        if myDict != nil {return self}
        myDict = loadDictionary(configFileName,bundle: bundle)
        return self
    }
    
    public func loadDictionary(configFileName: String, bundle: NSBundle?) -> NSDictionary? {
        // Read from the Configuration plist the data to make the state of the object valid.
        if bundle == nil {
            print("bundle not found")
            return nil
        }
        let myDict : NSDictionary?
        if let path = bundle!.pathForResource(configFileName, ofType: "plist") {
            myDict = NSDictionary(contentsOfFile: path)
        }else {

        return myDict
    }
    
    //Extract Data from Plist Dictionaries
    public func getDetailsFromDict(locator: String) -> String? {
        if let myDict = myDict {
            return getDetailsFromSpecificDict(locator, dictionary: myDict)
        }
        return nil
    }
    
    public func getArrayDetailsFromDict(locator: String) -> Array<String>? {
        if let myDict = myDict {
            return getArrayDetailsFromSpecificDict(locator, dictionary: myDict)
        }
        return nil
    }
