MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / alert

Function alert

packages/core/ui/dialogs/index.ios.ts:86–107  ·  view source on GitHub ↗
(arg: any)

Source from the content-addressed store, hash-verified

84}
85
86export function alert(arg: any): Promise<void> {
87 return new Promise<void>((resolve, reject) => {
88 try {
89 const options = !isDialogOptions(arg)
90 ? {
91 title: DialogStrings.ALERT,
92 okButtonText: DialogStrings.OK,
93 message: arg + '',
94 }
95 : arg;
96 const alertController = UIAlertController.alertControllerWithTitleMessagePreferredStyle(options.title, options.message, UIAlertControllerStyle.Alert);
97
98 addButtonsToAlertController(alertController, options, () => {
99 resolve();
100 });
101
102 showUIAlertController(alertController);
103 } catch (ex) {
104 reject(ex);
105 }
106 });
107}
108
109export function confirm(arg: any): Promise<boolean> {
110 return new Promise<boolean>((resolve, reject) => {

Callers 7

createFileInDownloadsFunction · 0.90
createFileInGalleryFunction · 0.90
createFileInMusicFunction · 0.90
navigateToExampleMethod · 0.90
onTapFunction · 0.90
testFunction · 0.50
createPageFunction · 0.50

Calls 4

isDialogOptionsFunction · 0.90
showUIAlertControllerFunction · 0.85
resolveFunction · 0.50

Tested by 1

testFunction · 0.40