From 88054524b0b2682ede8e7d6d883b8a7cab49b84e Mon Sep 17 00:00:00 2001 From: Nathaniel Hamming Date: Tue, 29 Oct 2024 12:46:29 -0300 Subject: [PATCH] [PAL-818] block mock service when simulators are not allowed (#721) --- Loop/Managers/Service.swift | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Loop/Managers/Service.swift b/Loop/Managers/Service.swift index fa4a056779..6a6cc25764 100644 --- a/Loop/Managers/Service.swift +++ b/Loop/Managers/Service.swift @@ -16,6 +16,12 @@ let staticServicesByIdentifier: [String: Service.Type] = [ MockService.serviceIdentifier: MockService.self ] -let availableStaticServices: [ServiceDescriptor] = [ - ServiceDescriptor(identifier: MockService.serviceIdentifier, localizedTitle: MockService.localizedTitle) -] +var availableStaticServices: [ServiceDescriptor] { + if FeatureFlags.allowSimulators { + return [ + ServiceDescriptor(identifier: MockService.serviceIdentifier, localizedTitle: MockService.localizedTitle) + ] + } else { + return [] + } +}