-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.json
1142 lines (1142 loc) · 54.4 KB
/
config.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
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
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"configVersion": "v1",
"appId": "io.criticalmoments.demo-app",
"themes": {
"not_defaultTheme": {
"bannerBackgroundColor": "#000000",
"bannerForegroundColor": "#ffffff",
"fontName": "AvenirNext-Regular",
"boldFontName": "AvenirNext-Bold"
},
"defaultThemeName": "system",
"namedThemes": {
"blackAndWhiteTheme": {
"bannerBackgroundColor": "#000000",
"bannerForegroundColor": "#ffffff",
"fontScale": 1.1,
"fontName": "AvenirNext-Regular",
"boldFontName": "AvenirNext-Bold",
"scaleFontForUserPreference": false,
"darkModeTheme": {
"bannerBackgroundColor": "#ffffff",
"bannerForegroundColor": "#000000",
"fontScale": 1.1,
"fontName": "AvenirNext-Regular",
"boldFontName": "AvenirNext-Bold",
"scaleFontForUserPreference": false
}
},
"modalSampleTheme": {
"fontName": "AvenirNext-Regular",
"boldFontName": "AvenirNext-Bold",
"backgroundColor": "#0f0f0f",
"primaryColor": "#cf2a29",
"primaryTextColor": "#ffffff",
"secondaryTextColor": "#dddddd"
}
}
},
"actions": {
"namedActions": {
"journey_goal_1": {
"actionType": "conditional_action",
"actionData": {
"condition": "eventCount('created_list') == 0",
"passedActionName": "journey_goal_1_nudge",
"failedActionName": "journey_goal_1_complete"
}
},
"journey_goal_1_nudge": {
"actionType": "banner",
"actionData": {
"body": "Learn how to create your first list →",
"tapActionName": "journey_goal_1_tap"
}
},
"journey_goal_1_tap": {
"actionType": "alert",
"actionData": {
"title": "Demo Action",
"message": "If this was a real Todo list app, you could connect the banner tap to your 'Create New List' experience with a deeplink."
}
},
"journey_goal_1_complete": {
"actionType": "alert",
"actionData": {
"title": "Goal Already Completed",
"message": "The user has already created a list, and moved onto a later step of the user journey."
}
},
"journey_goal_2": {
"actionType": "conditional_action",
"actionData": {
"condition": "eventCount('created_list') > 0 && eventCount('created_list_item') < 2",
"passedActionName": "journey_goal_2_nudge",
"failedActionName": "journey_goal_2_fail"
}
},
"journey_goal_2_fail": {
"actionType": "conditional_action",
"actionData": {
"condition": "eventCount('created_list') > 0",
"passedActionName": "journey_goal_2_complete",
"failedActionName": "journey_goal_prior_step"
}
},
"journey_goal_2_complete": {
"actionType": "alert",
"actionData": {
"title": "Goal Already Completed",
"message": "The user has already added 2 tasks to lists, and moved onto a later step of the user journey."
}
},
"journey_goal_prior_step": {
"actionType": "alert",
"actionData": {
"title": "User is on earlier goal",
"message": "The user has not reached this goal. Try earlier goals."
}
},
"journey_goal_3_tap": {
"actionType": "alert",
"actionData": {
"title": "Demo Action",
"message": "If this was a real app, you could connect the 'Try Free Trial' button to your purchase experience."
}
},
"journey_goal_2_nudge": {
"actionType": "modal",
"actionData": {
"showCloseButton": true,
"content": {
"pageType": "stack",
"pageData": {
"sections": [
{
"pageSectionType": "image",
"topSpacingScale": 3,
"pageSectionData": {
"imageType": "sf_symbol",
"height": 80.0,
"imageData": {
"symbolName": "list.bullet.rectangle.portrait.fill",
"mode": "hierarchical"
}
}
},
{
"pageSectionType": "title",
"topSpacingScale": 2,
"pageSectionData": {
"title": "Create tasks to start organizing your life!"
}
},
{
"pageSectionType": "body",
"topSpacingScale": 3,
"pageSectionData": {
"bodyText": "This copy could explain to users how to add tasks, and the buttons below could deeplink into that UI in your app.\n\nThis modal UI is fully native, remotely updatable, and themeable.",
"scaleFactor": 1.3
}
}
],
"buttons": [
{
"title": "Take me there",
"style": "large",
"actionName": "journey_goal_2_tap"
},
{
"title": "Not Now",
"style": "info"
}
]
}
}
}
},
"journey_goal_2_tap": {
"actionType": "alert",
"actionData": {
"title": "Demo Action",
"message": "If this was a real Todo list app, you could connect the button tap to your 'Add Task to List' experience with a deeplink."
}
},
"journey_goal_3": {
"actionType": "conditional_action",
"actionData": {
"condition": "eventCount('created_list') > 0 && eventCount('created_list_item') >= 2 && eventCount('completed_task') > 0",
"passedActionName": "journey_goal_3_nudge",
"failedActionName": "journey_goal_prior_step"
}
},
"journey_goal_3_nudge": {
"actionType": "modal",
"actionData": {
"showCloseButton": false,
"content": {
"pageType": "stack",
"pageData": {
"sections": [
{
"pageSectionType": "image",
"topSpacingScale": 3,
"pageSectionData": {
"imageType": "sf_symbol",
"height": 80.0,
"imageData": {
"symbolName": "note.text.badge.plus",
"mode": "hierarchical"
}
}
},
{
"pageSectionType": "title",
"topSpacingScale": 2,
"pageSectionData": {
"title": "Try Pro to get even more!"
}
},
{
"pageSectionType": "body",
"topSpacingScale": 3,
"pageSectionData": {
"bodyText": "This UI should explain the benefits of the Pro plan, and allow the user to purchase a subscription. You can write your own, or use our modal UI system.\n\nThis modal UI is fully native, remotely updatable, and themeable.",
"scaleFactor": 1.3
}
}
],
"buttons": [
{
"title": "Try Free Trial",
"style": "large",
"actionName": "journey_goal_3_tap"
},
{
"title": "Not Now",
"style": "info"
}
]
}
}
}
},
"journey_goal_failed": {
"actionType": "alert",
"actionData": {
"title": "User not currently at this goal",
"message": "The user has either already completed this goal, or not yet reached this stage of the user journey.\n\nTry earlier or later demos steps."
}
},
"journey_goal_simulated": {
"actionType": "alert",
"actionData": {
"title": "User Action Simulated",
"message": "We've simulated the user completeing this action.\n\nThe state of the system has updated as the user is further along their user journey.\n\nThe evaluation demos may now produce different results."
}
},
"app_out_of_date": {
"actionType": "modal",
"actionData": {
"showCloseButton": true,
"content": {
"pageType": "stack",
"pageData": {
"sections": [
{
"pageSectionType": "image",
"topSpacingScale": 3,
"pageSectionData": {
"imageType": "sf_symbol",
"height": 80.0,
"imageData": {
"symbolName": "arrow.down.circle.fill",
"mode": "hierarchical"
}
}
},
{
"pageSectionType": "title",
"topSpacingScale": 2,
"pageSectionData": {
"title": "App Update Recommended"
}
},
{
"pageSectionType": "body",
"topSpacingScale": 3,
"pageSectionData": {
"bodyText": "Your app is out of date.\n\nWe suggest updating in the app store for the best expereince",
"scaleFactor": 1.3
}
}
],
"buttons": [
{
"title": "Update Now",
"style": "large",
"actionName": "update_app_action"
},
{
"title": "Not Now",
"style": "info"
}
]
}
}
}
},
"outage_modal": {
"actionType": "modal",
"actionData": {
"showCloseButton": true,
"content": {
"pageType": "stack",
"pageData": {
"sections": [
{
"pageSectionType": "image",
"topSpacingScale": 3,
"pageSectionData": {
"imageType": "sf_symbol",
"height": 80.0,
"imageData": {
"symbolName": "exclamationmark.icloud.fill",
"mode": "hierarchical"
}
}
},
{
"pageSectionType": "title",
"topSpacingScale": 2,
"pageSectionData": {
"title": "Temporary Interruption"
}
},
{
"pageSectionType": "body",
"topSpacingScale": 3,
"pageSectionData": {
"bodyText": "We're currently expereincing a temporary issue with our service.\n\nYour data is safe.\n\nOur team is hard at work and we we expect to have it resovled soon.",
"scaleFactor": 1.3
}
}
],
"buttons": [
{
"title": "OK",
"style": "large"
}
]
}
}
}
},
"update_app_action": {
"actionType": "link",
"actionData": {
"url": "https://testflight.apple.com/join/uSwscwu0"
}
},
"product_announcement": {
"actionType": "banner",
"actionData": {
"body": "New Feature: Explore Collaboration Tools →",
"tapActionName": "nested_alert"
}
},
"legal_update": {
"actionType": "banner",
"actionData": {
"body": "New EU data regulations. Learn how we protect your data →",
"tapActionName": "tos"
}
},
"tos": {
"actionType": "link",
"actionData": {
"url": "https://criticalmoments.io/legal",
"useEmbeddedBrowser": true
}
},
"app_review_simple": {
"actionType": "alert",
"actionData": {
"title": "Enjoying Critical Moments?",
"message": "If you’re enjoying Critical Moments, we would greatly appreciate an app review!\n\nIf you are having an issue, our Help Docs and support team are here to help!",
"showOkButton": false,
"showCancelButton": false,
"customButtons": [
{
"label": "Rate Us",
"actionName": "app_review_faux",
"style": "primary"
},
{
"label": "Help, Feedback & Contact Us",
"actionName": "docs_page"
},
{
"label": "Not Now"
}
]
}
},
"docs_page": {
"actionType": "link",
"actionData": {
"url": "https://docs.criticalmoments.io/support",
"useEmbeddedBrowser": true
}
},
"app_review_faux": {
"actionType": "alert",
"actionData": {
"title": "Review Critical Moments",
"message": "\n★★★★★\n\nThis isn't a real review prompt as this demo app is distributed via TestFlight, but it would work in a real app."
}
},
"short_banner": {
"actionType": "banner",
"actionData": {
"body": "A short banner!",
"tapActionName": "nested_alert"
}
},
"long_banner": {
"actionType": "banner",
"actionData": {
"body": "Welcome to critical moments! App wide banners can give your users crucial information.",
"tapActionName": "nested_alert"
}
},
"very_long_banner": {
"actionType": "banner",
"actionData": {
"body": "Welcome to critical moments! App wide banners can give your users crucial information. This one happens to be really really long, and will probably be truncated eventually. It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of light, it was the season of darkness, it was the spring of hope, it was the winter of despair",
"tapActionName": "nested_alert"
}
},
"custom_theme_banner": {
"actionType": "banner",
"actionData": {
"body": "This banner has a custom theme+action set in config. Tap me!",
"themeName": "blackAndWhiteTheme",
"tapActionName": "nested_alert"
}
},
"top_banner": {
"actionType": "banner",
"actionData": {
"body": "This banner will appear at the top! Any banner can specify top or bottom position.",
"preferredPosition": "top",
"tapActionName": "nested_alert"
}
},
"bottom_banner": {
"actionType": "banner",
"actionData": {
"body": "This banner will appear at the bottom! Any banner can specify top or bottom position.",
"preferredPosition": "bottom",
"tapActionName": "nested_alert"
}
},
"undismissable_banner": {
"actionType": "banner",
"actionData": {
"body": "You are stuck with me... unless you use the \"Clear all banners\" action",
"showDismissButton": false,
"tapActionName": "nested_alert"
}
},
"single_line_banner": {
"actionType": "banner",
"actionData": {
"body": "This message will truncate after the first line, unlike the default of 4 lines. This message is also very very very long so the truncation is visible on iPads, which can be wide, and require run-on sentences.",
"maxLineCount": 1,
"tapActionName": "nested_alert"
}
},
"theme_modal": {
"actionType": "modal",
"actionData": {
"showCloseButton": true,
"content": {
"pageType": "stack",
"pageData": {
"sections": [
{
"pageSectionType": "image",
"topSpacingScale": 3,
"pageSectionData": {
"imageType": "sf_symbol",
"height": 80.0,
"imageData": {
"symbolName": "circle.hexagongrid.circle",
"mode": "hierarchical"
}
}
},
{
"pageSectionType": "title",
"topSpacingScale": 2,
"pageSectionData": {
"title": "Theme changed!"
}
},
{
"pageSectionType": "body",
"topSpacingScale": 3,
"pageSectionData": {
"bodyText": "You've updated the default theme for the demo app.\n\nExplore other demos like modals and banners to see how the theme impacts Critical Moments UI.\n\nYou can reset to the system theme using the option at the top of the Themes demo screens.",
"scaleFactor": 1.3
}
}
],
"buttons": [
{
"title": "OK",
"style": "large"
}
]
}
}
}
},
"show_notice_alert": {
"actionType": "alert",
"actionData": {
"title": "A simple notice alert",
"message": "Title, message, okay button. You get the idea!"
}
},
"show_cancelable_alert": {
"actionType": "alert",
"actionData": {
"title": "A cancelable alert",
"message": "An alert with a cancel button... not exactly rocket science.\n\nTry both buttons to see what they do.",
"showCancelButton": true,
"okButtonActionName": "nested_alert"
}
},
"custom_button_alert_large": {
"actionType": "alert",
"actionData": {
"title": "Action sheet deep dive",
"message": "This is an action sheet with several options.\n\nEach can launch a custom action!",
"showOkButton": false,
"showCancelButton": true,
"style": "large",
"customButtons": [
{
"label": "Option 1",
"actionName": "nested_alert"
},
{
"label": "Option 2",
"actionName": "nested_alert"
},
{
"label": "Option 3",
"actionName": "nested_alert"
},
{
"label": "Option 4",
"actionName": "nested_alert"
},
{
"label": "Scary option",
"actionName": "nested_alert",
"style": "destructive"
}
]
}
},
"custom_button_alert_dialog": {
"actionType": "alert",
"actionData": {
"title": "Lots of options",
"message": "This is an alert with several buttons of different styles.",
"showOkButton": false,
"showCancelButton": true,
"customButtons": [
{
"label": "Normal button",
"actionName": "nested_alert"
},
{
"label": "Primary button",
"actionName": "nested_alert",
"style": "primary"
},
{
"label": "Scary button",
"actionName": "nested_alert",
"style": "destructive"
}
]
}
},
"web_link_action": {
"actionType": "link",
"actionData": {
"url": "https://criticalmoments.io"
}
},
"web_link_embedded_action": {
"actionType": "link",
"actionData": {
"url": "https://criticalmoments.io",
"useEmbeddedBrowser": true
}
},
"settings_link_action": {
"actionType": "link",
"actionData": {
"url": "app-settings:"
}
},
"main_screen_deeplink_action": {
"actionType": "link",
"actionData": {
"url": "critical-moments-sampleapp:main"
}
},
"deeplink_music_action": {
"actionType": "link",
"actionData": {
"url": "music://music.apple.com/library"
}
},
"nested_alert": {
"actionType": "alert",
"actionData": {
"title": "Nested Action",
"message": "Your last action/tap was linked to this alert action entirely through config. Pretty cool!\n\nYou could link many other actions here instead of an alert including showing a infomation sheet, deeplinking into part of your app, launching Safari with a link or nothing at all!"
}
},
"app_review_template": {
"actionType": "conditional_action",
"actionData": {
"condition": "/* Device condition checks we suggest for almost all apps */ device_battery_level > 0.2 && !device_low_power_mode && has_active_network && !low_data_mode && device_orientation != 'face_up' && device_orientation != 'face_down' && foreground && /* Optional device checks. You decide if these make sense for your app */ !other_audio_playing && !on_call && !has_car_audio && /* Check last prompt time was not in last 21 days. Note: this uses the 'ask_for_review' action we fire below. */ ( eventCount('ask_for_review') == 0 || latestEventTime('ask_for_review') < now() - duration('504h') ) && /* Check the app wasn't installed in last week */ app_install_date < now() - duration('168h') && /* Check their app version isn't too old. Comment out until you have old clients you no longer want to request reviews on */ /* versionGreaterThan(app_version, '2.4.0') && */ /* Check the app version isn't in the 'known buggy versions' list. Commented out until you have versions you wish to add. */ /* app_version not in ['buggy_version_1', 'buggy_version_2'] && */ /* Out of date OS check */ !versionLessThan(os_version, '16.0') && /* only prompt users who's native language is supported in your UI. Uncomment once you set the correct values in the list. */ /* locale_language_code IN ['en', 'es', 'de'] && */ /* Trailing true to make editing this template easier, as lines above end in '&&' */ true",
"passedActionName": "conditional_true_alert",
"failedActionName": "conditional_false_alert"
}
},
"conditional_true_alert": {
"actionType": "alert",
"actionData": {
"title": "Condition True",
"message": "The condition was evaluated, and was true.\n\nTry changing your device's state to make it false, then tap again."
}
},
"conditional_false_alert": {
"actionType": "alert",
"actionData": {
"title": "Condition False",
"message": "The condition was evaluated, and was false.\n\nTry changing your device's state to make it true, then tap again."
}
},
"conditional_landscape": {
"actionType": "conditional_action",
"actionData": {
"condition": "(interface_orientation == 'landscape')",
"passedActionName": "conditional_true_alert",
"failedActionName": "conditional_false_alert"
}
},
"conditional_dark_mode": {
"actionType": "conditional_action",
"actionData": {
"condition": "dark_mode",
"passedActionName": "conditional_true_alert",
"failedActionName": "conditional_false_alert"
}
},
"conditional_ipad": {
"actionType": "conditional_action",
"actionData": {
"condition": "(device_model_class == 'iPad')",
"passedActionName": "conditional_true_alert",
"failedActionName": "conditional_false_alert"
}
},
"conditional_warm": {
"actionType": "conditional_action",
"actionData": {
"condition": "(weather_approx_location_temperature > 20)",
"passedActionName": "conditional_true_alert",
"failedActionName": "conditional_false_alert"
}
},
"conditional_cloudy": {
"actionType": "conditional_action",
"actionData": {
"condition": "(weather_approx_location_cloud_cover > 0.5)",
"passedActionName": "conditional_true_alert",
"failedActionName": "conditional_false_alert"
}
},
"conditional_installed_recently": {
"actionType": "conditional_action",
"actionData": {
"condition": "app_install_date > now() - duration('1h')",
"passedActionName": "conditional_true_alert",
"failedActionName": "conditional_false_alert"
}
},
"conditional_flat": {
"actionType": "conditional_action",
"actionData": {
"condition": "(device_orientation == 'face_up' || device_orientation == 'face_down')",
"passedActionName": "conditional_true_alert",
"failedActionName": "conditional_false_alert"
}
},
"conditional_canada": {
"actionType": "conditional_action",
"actionData": {
"condition": "(location_approx_country == 'CA')",
"passedActionName": "conditional_true_alert",
"failedActionName": "conditional_false_alert"
}
},
"conditional_wifi": {
"actionType": "conditional_action",
"actionData": {
"condition": "(network_connection_type == 'wifi')",
"passedActionName": "conditional_true_alert",
"failedActionName": "conditional_false_alert"
}
},
"conditional_charging": {
"actionType": "conditional_action",
"actionData": {
"condition": "(device_battery_state == 'charging' || device_battery_state == 'full')",
"passedActionName": "conditional_true_alert",
"failedActionName": "conditional_false_alert"
}
},
"conditional_os_version": {
"actionType": "conditional_action",
"actionData": {
"condition": "(versionNumberComponent(os_version,0) >= 16)",
"passedActionName": "conditional_true_alert",
"failedActionName": "conditional_false_alert"
}
},
"conditional_compound": {
"actionType": "conditional_action",
"actionData": {
"condition": "(interface_orientation == 'landscape') && (network_connection_type == 'wifi')",
"passedActionName": "conditional_true_alert",
"failedActionName": "conditional_false_alert"
}
},
"conditional_complex": {
"actionType": "conditional_action",
"actionData": {
"condition": "(interface_orientation == 'landscape' ? 1 : 0) + (network_connection_type == 'wifi' ? 1 : 0) + ((device_battery_state == 'charging' || device_battery_state == 'full') ? 1 : 0) >= 2",
"passedActionName": "conditional_true_alert",
"failedActionName": "conditional_false_alert"
}
},
"reviewAction": {
"actionType": "review_prompt",
"actionData": {}
},
"imageStylesModal": {
"actionType": "modal",
"actionData": {
"content": {
"pageType": "stack",
"pageData": {
"sections": [
{
"pageSectionType": "title",
"topSpacingScale": 0,
"pageSectionData": {
"title": "Image Samples"
}
},
{
"pageSectionType": "title",
"topSpacingScale": 5,
"pageSectionData": {
"title": "SF Symbols",
"scaleFactor": 0.75
}
},
{
"pageSectionType": "image",
"topSpacingScale": 2,
"pageSectionData": {
"imageType": "sf_symbol",
"height": 40.0,
"imageData": {
"symbolName": "flag.fill",
"weight": "regular",
"mode": "mono",
"primaryColor": "#e62e00"
}
}
},
{
"pageSectionType": "image",
"topSpacingScale": 2,
"pageSectionData": {
"imageType": "sf_symbol",
"height": 65.0,
"imageData": {
"symbolName": "homekit",
"weight": "regular",
"mode": "hierarchical",
"primaryColor": "#ff9900"
}
}
},
{
"pageSectionType": "image",
"topSpacingScale": 2,
"pageSectionData": {
"imageType": "sf_symbol",
"height": 80.0,
"imageData": {
"symbolName": "cloud.moon.bolt",
"weight": "light",
"mode": "palette",
"primaryColor": "#3366ff",
"secondaryColor": "#ffcc00"
}
}
},
{
"pageSectionType": "title",
"topSpacingScale": 5,
"pageSectionData": {
"title": "Local Image",
"scaleFactor": 0.75
}
},
{
"pageSectionType": "image",
"topSpacingScale": 2,
"pageSectionData": {
"imageType": "local",
"height": 140.0,
"imageData": {
"path": "does-not-exist-so-use-fallback.png"
},
"fallback": {
"imageType": "local",
"height": 140.0,
"imageData": {
"path": "beats.png"
}
}
}
}
]
}
}
}
},
"themeModalExample": {
"actionType": "modal",
"actionData": {
"themeName": "modalSampleTheme",
"showCloseButton": false,
"content": {
"pageType": "stack",
"pageData": {
"sections": [
{
"pageSectionType": "image",
"topSpacingScale": 3,
"pageSectionData": {
"imageType": "sf_symbol",
"height": 80.0,
"imageData": {
"symbolName": "popcorn.circle",
"mode": "hierarchical"
}
}
},
{
"pageSectionType": "title",
"topSpacingScale": 2,
"pageSectionData": {
"title": "New Episodes!"
}
},
{
"pageSectionType": "body",
"topSpacingScale": 3,
"pageSectionData": {
"bodyText": "Three new episodes of Star Trek Lower Decks are available!",
"scaleFactor": 1.3
}
}
],
"buttons": [
{
"title": "Take me there",
"style": "large",
"actionName": "nested_alert"
},
{
"title": "Not Now",
"style": "info"
}
]
}
}
}
},
"headphoneModalExample": {
"actionType": "modal",
"actionData": {
"showCloseButton": false,
"content": {
"pageType": "stack",
"pageData": {
"sections": [
{
"pageSectionType": "title",
"topSpacingScale": 0,
"pageSectionData": {
"title": "Headphone Suggested"
}
},
{
"pageSectionType": "image",
"topSpacingScale": 2,
"pageSectionData": {
"imageType": "local",
"height": 200.0,
"imageData": {
"path": "beats.png"
}
}
},
{
"pageSectionType": "title",
"topSpacingScale": 3,
"pageSectionData": {
"title": "For the best gaming experience, we suggest headphones.",
"scaleFactor": 0.6,
"bold": false
}
}
],
"buttons": [
{
"title": "Got it!",
"style": "large"
}
]
}
}
}
},
"buttonsModalExample": {
"actionType": "modal",
"actionData": {
"content": {
"pageType": "stack",
"pageData": {
"sections": [
{
"pageSectionType": "title",
"topSpacingScale": 0,
"pageSectionData": {
"title": "Button Styles"
}
}
],
"buttons": [
{
"title": "Large Button",
"style": "large"
},
{
"title": "Normal Button",
"style": "normal"
},
{
"title": "Secondary Button",
"style": "secondary"
},
{
"title": "Tertiary Button",
"style": "tertiary"
},
{
"title": "Info Button",
"style": "info"
},
{
"title": "Small Info Button",
"style": "info-small"
}
]
}
}
}
},
"typographyModalExample": {
"actionType": "modal",
"actionData": {
"content": {
"pageType": "stack",
"pageData": {
"sections": [
{
"pageSectionType": "title",
"topSpacingScale": 2,
"pageSectionData": {
"title": "Title"
}
},