def derived_data_location
      derived_data_style = value_for_setting('IDEWorkspaceUserSettings_DerivedDataLocationStyle')
      custom_derived_data_location = value_for_setting('IDEWorkspaceUserSettings_DerivedDataCustomLocation')
      
      if derived_data_style == 2 # 2 is the code for 'Workspace-relative path'
        File.expand_path(custom_derived_data_location, self.root)
      else
        
        prefs = RXCode.xcode_preferences
        if prefs.derived_data_location_is_relative_to_workspace?
          File.expand_path(prefs.derived_data_location, self.root)
        else
          prefs.derived_data_location
        end
        
      end
    end
def derived_data_location
      derived_data_style = value_for_setting('IDEWorkspaceUserSettings_DerivedDataLocationStyle')
      custom_derived_data_location = value_for_setting('IDEWorkspaceUserSettings_DerivedDataCustomLocation')
      
      if derived_data_style == 2 # 2 is the code for 'Workspace-relative path'
        File.expand_path(custom_derived_data_location, self.root)
      else
        
        prefs = RXCode.xcode_preferences
        if prefs.derived_data_location_is_relative_to_workspace?
          File.expand_path(prefs.derived_data_location, self.root)
        else
          prefs.derived_data_location
        end
        
      end
    end
===== BUILD LOCATION =============================================================================================