Skip to content

Commit

Permalink
fix: address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanStepanok committed Nov 5, 2024
1 parent fd7c721 commit a060146
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
3 changes: 0 additions & 3 deletions OpenEdX/Managers/PluginManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
//

import Foundation
import Core
import OEXFoundation
import OEXFirebaseAnalytics
import Swinject

public class PluginManager {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import Foundation
import Core
import OEXFoundation
import OEXFirebaseAnalytics
import FirebaseCore
import FirebaseMessaging

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import Core
import OEXFoundation
import UIKit
import UserNotifications
import OEXFirebaseAnalytics
import FirebaseCore
import FirebaseMessaging

Expand Down
26 changes: 26 additions & 0 deletions config_script/whitelabel.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,18 @@ def set_flags_from_mobile_config(self):
with open(self.config_project_path, 'r') as openfile:
project_file_string = openfile.read()
errors_texts = []
# iterate for all configurations
for name, config in configurations.items():
if 'env_config' in config:
# get folder name for mobile config for current configuration by env_config
config_folder = config_settings.get(self.CONFIG_MAPPINGS, {}).get(config['env_config'])
if config_folder:
# example of usage
# project_file_string = self.replace_fullstory_flag(project_file_string, config_directory, name, config_folder, errors_texts)
else:
logging.error("Config folder for '"+config['env_config']+"' is not defined in config_settings.yaml->config_mapping")
else:
logging.error("'env_config' is not defined for "+name)
# write to project file
with open(self.config_project_path, 'w') as openfile:
openfile.write(project_file_string)
Expand All @@ -575,6 +587,20 @@ def set_flags_from_mobile_config(self):
else:
logging.error("Mobile config directory not found")

# def replace_fullstory_flag(self, project_file_string, config_directory, config_name, config_folder, errors_texts):
# # get mobile config
# mobile_config = self.get_mobile_config(config_directory, config_folder, errors_texts)
# if mobile_config:
# # get FULLSTORY settings from mobile config
# fullstory_config = mobile_config.get('FULLSTORY', {})
# if fullstory_config:
# fullstory_config_enabled = fullstory_config.get('ENABLED')
# fullstory_string = "FULLSTORY_ENABLED = YES;" if fullstory_config_enabled else "FULLSTORY_ENABLED = NO;"
# fullstory_regex = "FULLSTORY_ENABLED = .*;"
# # serach by regex and replace
# project_file_string = self.replace_parameter_for_build_config(project_file_string, config_name, fullstory_string, fullstory_regex, errors_texts)
# return project_file_string
#
def main():
"""
Parse the command line arguments, and pass them to WhitelabelApp.
Expand Down

0 comments on commit a060146

Please sign in to comment.