cordova-plugin-3dtouch
cordova-plugin-3dtouch copied to clipboard
Action not triggered on cold start
Environment
- ionic 4
- angular 8
- iOS 13 sdk
- Plugin version is 1.3.7
Description
- Actions are not triggered if the app is opened from a cold start (works great otherwise). I remember that this is working previously on our app but couldn't tell which exact environment update might have caused this issue, we did a a major update from ionic 3 to 4. As far as i could tell there are no errors being thrown but not a 100% sure as it's a bit tricky to debug the app fromcold start, even tried this but the logs are now showing. Any ideas on what the issue is or suggestions to debug?
@EddyVerbruggen just nudging the above message from Adrian, great if you have any suggestions or thoughts on this. Thanks a lot
Had the same issue with Version 1.3.8. I accidentally moved the onHomeIconPressed into another function/promise, that caused my Problem with Cold Start, because the subscribe was to late. Just put the Code directly after platform ready call. Below Code is from my app.component.ts and now working
this.platform.ready().then(() => {
this.statusBar.overlaysWebView(false);
this.statusBar.backgroundColorByHexString('#010b3b');
this.statusBar.styleLightContent();
this.threeDeeTouch.onHomeIconPressed().subscribe(
(payload) => {
this.payload = payload;
}
);
// more Code below where you can work with the payload variable after cold Start,
// if you want to check for some other data, like i did
});