Commit 97fd5d1
feat(audience): remove sandbox routing, add TestMode (SDK-352, SDK-353)
Sandbox removal (SDK-352):
- Remove TestKeyPrefix, SandboxBaseUrl, and key-prefix-based URL routing.
All keys now resolve to https://api.immutable.com by default; BaseUrl
override still works for internal dev environments.
- Remove WarnIfKeyEnvironmentMismatch and its log messages.
- Simplify BaseUrl/URL helper signatures (drop unused publishableKey param).
- Delete PublishableKeyPrefixTests.cs and its .meta file.
- Update ConstantsTests, ConsentSyncTests, HttpTransportTests.
Test mode (SDK-353):
- Add TestMode bool to AudienceConfig (default false). When true, every
outbound event carries test: true so the backend can filter test traffic.
- Add testMode param to MessageBuilder.Track/Identify/Alias; all call sites
in ImmutableAudience pass config.TestMode.
- Add TestMode tests to AudienceConfigTests and MessageBuilderTests.
Sample app:
- Add test-mode Toggle to UXML (default true) with tick-label workaround
matching the existing debug toggle.
- Wire TestMode through InitForm → BuildAudienceConfig → BuildConfigEcho.
- Apply same tick-label injection to test-mode and mobile-attribution toggles.
- Remove prod-warning banner (permanently true now that all keys go to prod).
- Replace SandboxBaseUrl with ExplicitBaseUrl in test constants; update
live-fire tests and stale comments.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 26dae71 commit 97fd5d1
18 files changed
Lines changed: 133 additions & 389 deletions
File tree
- examples/audience/Assets/SampleApp
- Resources
- Scripts
- Tests/Runtime
- src/Packages/Audience
- Runtime
- Core
- Events
- Transport
- Utility
- Tests/Runtime
- Events
- Transport
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | 6 | | |
10 | 7 | | |
11 | 8 | | |
| |||
78 | 75 | | |
79 | 76 | | |
80 | 77 | | |
81 | | - | |
| 78 | + | |
82 | 79 | | |
83 | 80 | | |
84 | 81 | | |
| |||
99 | 96 | | |
100 | 97 | | |
101 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
102 | 105 | | |
103 | 106 | | |
104 | 107 | | |
| |||
120 | 123 | | |
121 | 124 | | |
122 | 125 | | |
123 | | - | |
| 126 | + | |
124 | 127 | | |
125 | 128 | | |
126 | 129 | | |
| |||
Lines changed: 14 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
78 | | - | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
167 | | - | |
| 168 | + | |
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| |||
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
| 185 | + | |
184 | 186 | | |
185 | 187 | | |
186 | 188 | | |
187 | 189 | | |
188 | | - | |
189 | | - | |
| 190 | + | |
190 | 191 | | |
| 192 | + | |
| 193 | + | |
191 | 194 | | |
192 | 195 | | |
193 | 196 | | |
194 | | - | |
| 197 | + | |
195 | 198 | | |
196 | 199 | | |
197 | 200 | | |
| |||
610 | 613 | | |
611 | 614 | | |
612 | 615 | | |
613 | | - | |
614 | 616 | | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
| 617 | + | |
| 618 | + | |
622 | 619 | | |
623 | 620 | | |
624 | 621 | | |
| |||
676 | 673 | | |
677 | 674 | | |
678 | 675 | | |
| 676 | + | |
679 | 677 | | |
680 | 678 | | |
681 | 679 | | |
682 | 680 | | |
683 | | - | |
| 681 | + | |
684 | 682 | | |
685 | 683 | | |
686 | 684 | | |
687 | 685 | | |
688 | 686 | | |
| 687 | + | |
689 | 688 | | |
690 | 689 | | |
691 | 690 | | |
| |||
702 | 701 | | |
703 | 702 | | |
704 | 703 | | |
| 704 | + | |
705 | 705 | | |
706 | 706 | | |
707 | 707 | | |
| |||
780 | 780 | | |
781 | 781 | | |
782 | 782 | | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | 783 | | |
787 | 784 | | |
788 | 785 | | |
| |||
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
335 | | - | |
336 | | - | |
| 334 | + | |
| 335 | + | |
337 | 336 | | |
338 | 337 | | |
339 | 338 | | |
| |||
342 | 341 | | |
343 | 342 | | |
344 | 343 | | |
| 344 | + | |
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| 367 | + | |
367 | 368 | | |
368 | 369 | | |
369 | 370 | | |
| |||
377 | 378 | | |
378 | 379 | | |
379 | 380 | | |
380 | | - | |
| 381 | + | |
381 | 382 | | |
382 | 383 | | |
383 | 384 | | |
| |||
Lines changed: 11 additions & 40 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 53 | + | |
| 54 | + | |
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
| |||
89 | 87 | | |
90 | 88 | | |
91 | 89 | | |
92 | | - | |
93 | | - | |
| 90 | + | |
94 | 91 | | |
95 | 92 | | |
96 | 93 | | |
| |||
331 | 328 | | |
332 | 329 | | |
333 | 330 | | |
334 | | - | |
| 331 | + | |
335 | 332 | | |
336 | 333 | | |
337 | 334 | | |
| |||
495 | 492 | | |
496 | 493 | | |
497 | 494 | | |
498 | | - | |
499 | | - | |
500 | | - | |
| 495 | + | |
| 496 | + | |
501 | 497 | | |
502 | 498 | | |
503 | | - | |
| 499 | + | |
504 | 500 | | |
505 | 501 | | |
506 | 502 | | |
| |||
738 | 734 | | |
739 | 735 | | |
740 | 736 | | |
741 | | - | |
742 | | - | |
743 | | - | |
744 | | - | |
745 | | - | |
746 | | - | |
747 | | - | |
748 | | - | |
749 | | - | |
750 | | - | |
751 | | - | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
766 | 737 | | |
767 | 738 | | |
Lines changed: 6 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | 130 | | |
134 | 131 | | |
135 | 132 | | |
| |||
141 | 138 | | |
142 | 139 | | |
143 | 140 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | 141 | | |
148 | 142 | | |
149 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
30 | 37 | | |
31 | 38 | | |
32 | 39 | | |
| |||
0 commit comments