IBM-MIL / IBM-Ready-App-for-Telecommunications

An Android Ready App that allows users to dynamically manage their data/talk/text plans while utilizing material design, MVP architecture, and reactive programming.
Other
33 stars 22 forks source link

Create logic to be able to run MQA in preproduction (OA), production (Market), and development mode (off) #13

Open ghost opened 8 years ago

ghost commented 8 years ago

We need logic like we have in iOS that allows for different variables be set for the state of MQA when it's built through Jenkins.

Here's some example code from iOS:

var isDevelopment = true
        // Read configurations from the Config.plist.
        let configurationPath = NSBundle.mainBundle().pathForResource("Config", ofType: "plist")
        if((configurationPath) != nil){
            let configuration = NSDictionary(contentsOfFile: configurationPath!) as! [String: AnyObject]!

            if let isDev = configuration["isDevelopment"] as? Bool {
                isDevelopment = isDev
            }
        }

        //Set the SDK mode Market vs QA for Production and Pre-Production
        #if Debug
            // Do nothing
        #else
            if isDevelopment {
                MQALogger.settings().mode = MQAMode.QA
            } else {
                MQALogger.settings().mode = MQAMode.Market
            }
        #endif