How to change dynamically app.theme (App.theme=auto in macOS Big Sur 11.1 is like md)

I am using app.theme = auto to use the same code in desktop and mobile.
By default, the desktop in macOS Big Sur 11.1 appear as md, not as aurora or iOS.
I am not using electron.

Which is the west way to change app.theme from auto to iOS before or after app initialization?
If I use

app.on('init', ()=>{
    if (app.device.os==='macos') app.theme = 'ios';
});

the icons doesn’t appear.

Any suggestion?

Thank you very much for your incredible work!!!

Best regards
Carlos

Instead of auto you should set something like device.desktop ? 'aurora' : 'auto'

Vladimir, thank you very much for answer me.

I use

var app = new Framework7({
	id: 'appid',
	name: 'app name',
	theme: device.desktop ? 'aurora':'auto', 
        ...

to initializate and at this point device is not defined.

how can I access to device before app initialisation?

Is there any way to change app.theme after initialisation?

Best regards
Carlos

It works perfectly

Thank you very much. You are the best!!!

Best regards
Carlos