better way to check app.platform