Cordova Slack Digest

Tue, 20 Apr 2021 08:23:06 GMT

User count: 4451

Join the conversation at slack.cordova.io

Channel #random (1 messages)


Mon, 19 Apr 2021 12:19:29 GMT

@brianmingus says

https://github.com/chalice-dev/awesome-chalice

Channel #cordova-ios (3 messages)


Mon, 19 Apr 2021 14:30:20 GMT

@duaneqhodges says

My issue is I keep getting rejected by the Apple store for having UIWeb in my plugins. So I‘ve upgraded all of my plugins but my issue is Google Plus won’t install with cordova-ios 6.x. I can only get Google Plus installed with cordova-ios 5.1.1. The conflict is that cordova inapp browser won‘t install on 5.1.1, it needs 6.x or greater. I’m not sure how to resolve this issue with two different cordova plugins requiring different cordova-ios versions. Is there an alternative to inapp browser? Is there a way to open browser links from ionic without inapp browser?

Mon, 19 Apr 2021 15:08:09 GMT

@norman137 says

perhaps https://www.npmjs.com/package/cordova-plugin-safariviewcontroller ?

or maybe you can just fork the plugin that restricts cordova-ios@6 and remove that restriction and pray it works. There shouldn‘t really be any reason why it wouldn’t work on cordova-ios@6, unless if it uses UIWebView, in which case your app will still get rejected.

Mon, 19 Apr 2021 19:52:00 GMT

@tvanzanten says

Channel #cordova-android (14 messages)


Mon, 19 Apr 2021 18:59:27 GMT

@mattwenner1 says

Just ran into an interesting situation that I believe is happening after updating webpack and was wondering if anyone ran into something similar before? The issue is only occurring on android, but not ios when building my production bundles for my React: webpack --mode=production --progress. The error I get is Uncaught SyntaxError: Invalid or unexpected token, the problem is just references to line 2, which is basically the whole bundle when I inspect with <chrome://inspect/#devices>

However if I run in development mode: webpack --mode=development --progress --watch everything works fine on android

So it seems that there is some optimization issue occurring only on android?

Mon, 19 Apr 2021 19:08:51 GMT

@norman137 says

I would try adding source map dev tool, at least temporarily so that you can get a problematic line number that makes more sense (hopefully)

Mon, 19 Apr 2021 19:14:29 GMT

@mattwenner1 says

I do have devtool: 'source-map', in my config. And it parses everything nicely so that I can explore the code in ios and the web.

Or were you talking like a chrome tool?

Mon, 19 Apr 2021 19:21:22 GMT

@norman137 says

It‘s my understanding that you’re using webpack and when in production mode, the build output it produces runs into a syntax error when ran on android

Mon, 19 Apr 2021 19:21:39 GMT

@norman137 says

and the referenced line is line 2, which is basically the minified/bundled file on a single line

Mon, 19 Apr 2021 19:29:49 GMT

@mattwenner1 says

Oh yes, that is exact scenario

Mon, 19 Apr 2021 19:34:58 GMT

@norman137 says

I guess devtool isn‘t working for you since it can’t parse the file... are you using any minification plugins like UglifyJS (including web pack‘s built in stuff?) Maybe on your prod built disable those and see if the issue persists, and if so hopefully it exists on a non-minified build so that it’s easier to pinpoint what exactly is causing the syntax error.

Mon, 19 Apr 2021 20:39:44 GMT

@jcesarmobile says

Is it a real device or emulator? Android version? Webview/chrome version?

Mon, 19 Apr 2021 20:43:20 GMT

@mattwenner1 says

This makes sense, so I added the following, and now it all works fine. So it seems like something in the minification process. I’m not using anything else besides the default settings

    minimize: false,
  };```

Mon, 19 Apr 2021 20:45:05 GMT

@mattwenner1 says

This is occurring on 2 physical devices, that are running Android 11. I’m testing with android studio, running a pixel 2 with Android 10, API 29

Mon, 19 Apr 2021 20:48:43 GMT

@mattwenner1 says

Looking at the user agent I see: Version/4.0 Chrome/74.0.3729.185

 android 8.1.0
 ios 6.1.0```


Mon, 19 Apr 2021 22:28:53 GMT

@jcesarmobile says

Looks recent enough, the invalid token are usually caused by unsupported js features like using const, arrow functions, etc.

Tue, 20 Apr 2021 01:55:56 GMT

@norman137 says

Could also try using the pretty-print feature in chrome dev tools

Tue, 20 Apr 2021 01:56:48 GMT

@norman137 says

the { } button, which you might be able to use in conjunction of break on all exceptions toggle @mattwenner1

Channel #plugins (1 messages)


Mon, 19 Apr 2021 19:51:54 GMT

@tvanzanten says

Has anyone been able to successfully change the status bar color on iOS with the cordova-plugin-statusbar? I'm using cordova-ios 6.2.0, cordova-plugin-statusbar 2.4.3, an iPhone 11 running iOS 14.4.2, and a vanilla Cordova application.

As you can see in the screenshot, the status bar for my application is a light grey (I think this is because the content at the top of my app is white), and the text in my status bar is white, making it practically illegible.

I‘ve tried setting this in my app’s config.xml:

&lt;preference name="StatusBarBackgroundColor" value="#000000" /&gt; And adding the following inside a function that gets called when the deviceready event triggers:

StatusBar.backgroundColorByHexString('#0854a0');```
But neither of those solutions worked. Any help would be much appreciated!

Channel #ionic (1 messages)


Mon, 19 Apr 2021 14:31:05 GMT

@duaneqhodges says

My issue is I keep getting rejected by the Apple store for having UIWeb in my plugins. So I‘ve upgraded all of my plugins but my issue is Google Plus won’t install with cordova-ios 6.x. I can only get Google Plus installed with cordova-ios 5.1.1. The conflict is that cordova inapp browser won‘t install on 5.1.1, it needs 6.x or greater. I’m not sure how to resolve this issue with two different cordova plugins requiring different cordova-ios versions. Is there an alternative to inapp browser? Is there a way to open browser links from ionic without inapp browser?