Closed alonstar closed 4 years ago
Look for syncStatus
here.
And to show a dialog you may need to wrap that logic in an ngZone
(Google it if it doesn't ring a bell).
hi, ~ Thanks for your help. My original code is: (this.installed is a function shows modal)
case SyncStatus.UPDATE_INSTALLED:
this.installed()
break;
It's work in android, but not ios. And I have already tried using ngZone.run like:
setTimeout(() => this.zone.run(() => this.installed()), 3000);
OR
this.zone.run(() => setTimeout(() => this.installed(), 3000));
OR
this.zone.run(AppSync.sync());
All are not work. T_T
If you console.log it, does it show up in the log?
Yes. Log is work, and I tried "confirm" it is work, too. I don't know why modal service is not work. T_T
And there is no any error.
No idea either, but if the log works then I guess at least the plugin works correctly.
Oh, If I run on debug mode and set breakpoint on SuccessCallback, then run it step by step , it is work.
Amazing!
I want to display dialog when sync is finished, but when I added show modal function (Nativesciprt +Angular) in SuccessCallback using ModalDialogService, ios is not working.
I tried to set timeout for showing dialog (I tried 300, 500, 1000, even 3000), but it's not work. And I moved show modal out SuccessCallback it's ok.
But I can't try add it after App.Sync...because it's a void.
How could I do for this issue?