From f8db40b409213548065aab8b04b2d0671ed3f957 Mon Sep 17 00:00:00 2001 From: Elad Cohen Date: Mon, 20 May 2024 13:12:06 +0300 Subject: [PATCH] wip --- sns/lib.w | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sns/lib.w b/sns/lib.w index 59b7359c..44b89101 100644 --- a/sns/lib.w +++ b/sns/lib.w @@ -3,12 +3,19 @@ bring "./types.w" as types; bring "./sim.w" as sim; bring "./tfaws.w" as tfaws; +/// MobileClient is a client for interacting with SNS mobile service. +/// When running the simulator in a non test environment, it will use the +/// actual cloud implementation. pub class MobileClient impl types.IMobileClient { inner: types.IMobileClient; new() { let target = util.env("WING_TARGET"); if target == "sim" { - this.inner = new sim.MobileClient(); + if std.Node.of(this).app.isTestEnvironment { + this.inner = new sim.MobileClient(); + } else { + this.inner = new tfaws.MobileClient(); + } } elif target == "tf-aws" { this.inner = new tfaws.MobileClient(); } else {