From 5feca7211d6821e1cb91f5a2960e488da58c9b82 Mon Sep 17 00:00:00 2001 From: Brice Redmond Date: Wed, 11 Dec 2024 13:25:07 -0800 Subject: [PATCH] [other] ENGMT-1985: updates to api connectivity Gives some predefined options for stage, stage_ac, prod, prod_ac like the android and ios mobile apps Gives the option to specify your own endpoint Switches the default branch key for staging to the ones we are using for the mobile apps Adds an error message if branch.init fails --- deployment/deploy-qa.sh | 4 +- examples/example.template.html | 208 ++++++++++++++++++++++++++++----- startDev.js | 4 +- 3 files changed, 186 insertions(+), 30 deletions(-) diff --git a/deployment/deploy-qa.sh b/deployment/deploy-qa.sh index c21ceea5..522cccd0 100755 --- a/deployment/deploy-qa.sh +++ b/deployment/deploy-qa.sh @@ -21,8 +21,8 @@ NC='\033[0m' aws s3 cp --content-type="text/javascript" --content-encoding="gzip" dist/build.min.js.gz s3://branch-builds/web-sdk/branch-latest.min.js aws s3 cp --content-type="text/javascript" dist/build.js s3://branch-builds/web-sdk/branch.js - # Engagement Pro Staging Testing App - ID: 1359637087497768975 - ./deployment/build-example-html.sh "key_live_bydNZt6LxLEPG6QHe9BY8gbgDFjikcY5" "https://api.stage.branch.io" "https://cdn.branch.io/branch-staging-latest.min.js" + # External services app - ID: 436637608899006753 + ./deployment/build-example-html.sh "key_live_plqOidX7fW71Gzt0LdCThkemDEjCbTgx" "https://api.stage.branch.io" "https://cdn.branch.io/branch-staging-latest.min.js" aws s3 cp example.html s3://branch-cdn/example-staging.html echo -en "${GREEN}Pushing to CDN ...${NC}\n" diff --git a/examples/example.template.html b/examples/example.template.html index d00795ec..1cf93985 100644 --- a/examples/example.template.html +++ b/examples/example.template.html @@ -5,27 +5,170 @@ - Branch Metrics Web SDK Example App + + @@ -36,7 +179,7 @@

Branch Metrics Web SDK Example

Session Info

-
Reading session from .init()...
+
Reading session from .init()...

Request

Click a button!
@@ -51,12 +194,13 @@

Methods


Session and Identity

- + - +
+
+ -
@@ -76,14 +220,26 @@

QR Code

+

Api Settings

+
+ + + +
+ + +
+