Calendar preventing tab from opening (iOS)

Hi there, I’m having a weird bug using Angular/Ionic. I have a mbsc-calendar housed in a page that the user gets to by selecting a tab. When I build the app in debug mode, everything is great and works flawlessly. However, when I build the app and pass in the --production and --release flags, the tab containing the calendar will no longer open. I get no error messages or anything, it just doesn’t work.

I can provide more information if needed. I haven’t seen this bug anywhere else and I’ve searched high and low so any help will be greatly appreciated. Thank you!

Hi @Matt_Wheeler :wave:

Sorry about the trouble!

Yes, it would be great if you could provide more information about this case :wink:
Also if you can share a working example from which we could reproduce this, that would help a lot.

A few more questions:

  1. What kind of tabs are you using? Ionic tabs or Mobiscroll Navigation?
  2. If you remove the Calendar, does the page render?

I can’t post the code that’s currently failing because it’s enterprise code, but I’ll see if I can start a project from scratch and get it to fail.

I’m using Ionic tabs. When I remove the calendar, the page renders fine. I also tried adding the calendar to other tabs, using the most basic configurations, and those other tabs then would not load. I’m using Mobiscroll 4.10.3, and Ionic 4.11.1.

Totally understand :grinning:

We know a bug with angular’s build optimizer, which, in production mode, removes unused code from the final bundle. Unfortunately, it also removes code from Mobiscroll which is actually needed.
I did not know in which exact version was it fixed, but updating the @angular-devkit/build-angular package to 0.803.22 fixed the issue for me:
@angular-devkit/build-angular”: “~0.803.22”

Please let me know if this solves it in your case as well.

I think this is the issue. In a blank project with that version of the build optimizer the tab loads fine. However, in my project I’m using Angular 7 and that version of the build optimizer requires Angular 8. I’m attempting to update and running into other problems so I can’t let you know for sure if this is the fix, but I think it’s pointed me in the right direction at least so thank you!