with the same results. It works in a debug build but not prod.
I’ve opened an issue in the ionic native github, where some other developers have indicated that they’ve run into the same issue but there hasn’t been any response so far. https://github.com/ionic-team/ionic-native/issues/2307
I don’t know enough about cordova plugin development or the Ionic build process to even know where to start debugging/troubleshooting.
Can anyone provide some insight as to why the --prod build would break a plugin or look into this?
I just tried this with a blank starter, but was not able to replicate the issue
ionic start tmp blank
cd tmp
And modified app.component.ts
import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { HomePage } from '../pages/home/home';
@Component({
templateUrl: 'app.html'
})
export class MyApp {
rootPage:any = HomePage;
constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
// statusBar.styleDefault();
statusBar.backgroundColorByHexString("#ff1000");
splashScreen.hide();
});
}
}
This appears to be broken again. It was working last week in a build I did, but when I cracked open my project today and prepared my iOS build, the status bar is now translucent no matter what I do. I tried doing as mharington suggested and starting with a blank project, but the problem persists there as well. Any idea on how to fix?