Back to Cordova

2020 08 28

slack-digest/2020-08-28.md

latest9.5 KB
Original Source

Cordova Slack Digest

Fri, 28 Aug 2020 08:23:52 GMT

User count: 4087

Join the conversation at slack.cordova.io

Channel #random (1 messages)


Thu, 27 Aug 2020 15:49:05 GMT

@campbelg says

@campbelg has left the channel

Channel #general (4 messages)


Thu, 27 Aug 2020 09:31:37 GMT

@wongpiwat says

Hello everyone, I have a question to ask you guys. I can’t hide the url bar in in-app browser on iOS. I used hideurlbar set to yes that works fine only on Android, but on iOS still show the url bar. How to hide the url bar on iOS?

Thu, 27 Aug 2020 10:59:23 GMT

@abul.asar22 says

Hello everyone, I am getting this error.

diff:
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.```
This error is possibly causing because of `cordova-facebook4` has anyone encountered this error before ?

Thu, 27 Aug 2020 15:04:57 GMT

@purplecabbage says

Jesse M is inviting you to a scheduled Zoom meeting. Topic: Apache Cordova Hangout

Join Zoom Meeting https://zoom.us/j/6592440762?pwd=RTMwaXNxdFJHQWNCb2RGRE5Ba1Jqdz09

Meeting ID: <tel:6592440762|659 244 0762> Passcode: ebP0t4

Thu, 27 Aug 2020 16:42:47 GMT

@purplecabbage says

Open Question (thread): Where should we archive public slack channels to? I previously was sending a digest email to the dev list, but there were some complaints that it was spammy … Ideally we want a searchable site that lists all the conversations so we can keep them past the 10k message limit that our free-tier version of slack supports.

Channel #cordova-ios (46 messages)


Thu, 27 Aug 2020 15:49:18 GMT

@campbelg says

@campbelg has left the channel

Thu, 27 Aug 2020 16:29:58 GMT

@dharmon says

Does anyone have experience with cordova-plugin-ionic-webview? I am having an issue where a callback url is not woking in ios but is working in android just fine. Basically, go to do a login, (which redirects to Auth0 login page), after a successful login, this page redirects back to localhost which works fine for Android, but on ios this brings me back to the first screen before login.

Thu, 27 Aug 2020 16:30:15 GMT

@dharmon says

Anyone have any thoughts on what might be happening?

Thu, 27 Aug 2020 16:33:19 GMT

@norman137 says

Perhaps it has something to do with the fact that Android uses a http scheme, while ios uses some other scheme (ionic://) by default? One of my apps uses the ionic webview, but we don't have an auth0 login page flow, so I'm not really sure.

Thu, 27 Aug 2020 16:34:15 GMT

@dharmon says

Hm, yea, that was one of my thoughts, but I can't set the ios value to http unfortunately since it is not allowed by the plugin.

Thu, 27 Aug 2020 16:35:19 GMT

@norman137 says

Yah, that limitation comes from iOS itself.

Thu, 27 Aug 2020 16:36:35 GMT

@norman137 says

Are you sure the url is whitelisted? https://auth0.com/docs/users/redirect-users-after-login#redirect-users-to-whitelisted-callback-urls

Thu, 27 Aug 2020 16:37:04 GMT

@dharmon says

I replaced cordova-plugin-crosswalk-webview with cordova-plugin-ionic-webview so not sure what they do differently.

Thu, 27 Aug 2020 16:37:23 GMT

@norman137 says

For iOS, nothing.

Thu, 27 Aug 2020 16:37:31 GMT

@norman137 says

crosswalk only applied to android

Thu, 27 Aug 2020 16:38:05 GMT

@dharmon says

hm, what the heck then. lol

Thu, 27 Aug 2020 16:38:36 GMT

@norman137 says

ionic webview will however make the ios webview use wkwebview, and I think by default it uses schemes.

Thu, 27 Aug 2020 16:38:41 GMT

@norman137 says

ie the ionic:// url paths

Thu, 27 Aug 2020 16:39:00 GMT

@daviesd says

we use https://www.npmjs.com/package/cordova-plugin-customurlscheme for our oauth2 flow

Thu, 27 Aug 2020 16:39:04 GMT

@norman137 says

the default cordova webview uses file:// filesystem paths

Thu, 27 Aug 2020 16:39:49 GMT

@daviesd says

allows us to use our appname as the redirect url (digby://)

Thu, 27 Aug 2020 16:39:53 GMT

@dharmon says

@daviesd I also use that plugin in my app

Thu, 27 Aug 2020 16:40:28 GMT

@daviesd says

So you are just talking about while you are developing on the desktop, that you are having issues. not on the device?

Thu, 27 Aug 2020 16:40:48 GMT

@dharmon says

No, it is only ios that is having the URI redirect issue

Thu, 27 Aug 2020 16:40:56 GMT

@dharmon says

web & android work fine

Thu, 27 Aug 2020 16:41:43 GMT

@dharmon says

This is how I have the customurlscheme plugin configured:

<plugin
    &lt;variable name="URL_SCHEME" value="com.peoplenetonline.driveui" /&gt;
    &lt;variable name="ANDROID_SCHEME" value=" " /&gt;
    &lt;variable name="ANDROID_HOST" value=" " /&gt;
    &lt;variable name="ANDROID_PATHPREFIX" value="/" /&gt;
&lt;/plugin&gt;```

Thu, 27 Aug 2020 16:43:35 GMT

@daviesd says

so your redirect_uri looks like "com.peoplenetonline.driveui://"?

Thu, 27 Aug 2020 16:44:35 GMT

@dharmon says

This is the Auth0 url: redirect_uri=http%3A%2F%2Flocalhost&amp;nonce=9R-HujfAZuetGVOZ-CeaypHcwDYz83Ky&amp;auth0Client=eyJuYW1lIjoiYXV0aDAuanMiLCJ2ZXJzaW9uIjoiOC4yLjAifQ%3D%3D

Thu, 27 Aug 2020 16:44:48 GMT

@dharmon says

looks like it is pointing at localhost?

Thu, 27 Aug 2020 16:45:03 GMT

@daviesd says

oh, that won't work... on desktop it will... but your redirect_uri on ios device needs to be your URL_SCHEME above

Thu, 27 Aug 2020 16:45:26 GMT

@dharmon says

I wonder why it worked before adding the ionic-webview

Thu, 27 Aug 2020 16:45:51 GMT

@dharmon says

I know we were using the old UIwebview on ios before, that might be the reason?

Thu, 27 Aug 2020 16:45:56 GMT

@daviesd says

most oauth2 implementations allow you to put multiple url patterns to match.... ios isn't running a localhost server I don't think... maybe the old webview implementation did?

Thu, 27 Aug 2020 16:46:24 GMT

@dharmon says

That is the only thing I can think of.

Thu, 27 Aug 2020 16:46:42 GMT

@dharmon says

Do you know what the multiple url pattern match looks like or where the docs are for that?

Thu, 27 Aug 2020 16:47:15 GMT

@daviesd says

depends on what oauth2 implementation you are using... ours is homebrewed, but we follow the spec... let me find that

Thu, 27 Aug 2020 16:50:11 GMT

@dharmon says

That I don't know much about or even how to figure that out. I do know we are using Auth0 lock for the UI login part of things.

Thu, 27 Aug 2020 16:52:12 GMT

@dharmon says

So the default from ios for the ionic-webview should be: <ionic://localhost>?

Thu, 27 Aug 2020 16:53:05 GMT

@daviesd says

Looks like you want to look at the "Allowed Callback URLs" https://auth0.com/docs/users/redirect-users-after-login For iOS you want to redirect back to your URL_SCHEME you've defined (if you are using the custom url scheme plugin) Sounds like Ionic is also providing a mechanism to tap into? I haven't used it.

Thu, 27 Aug 2020 16:54:30 GMT

@dharmon says

so it looks like I have a section for adding those allowed callback URLs in the auth0 dashboard. Looks like I can add multiples there.

Thu, 27 Aug 2020 16:54:39 GMT

@norman137 says

Yah, I believe if the redirect_uri looks something like ionic%3A%2F%2Flocalhost ... then it should work for iOS, but obviously break for android/web. You'd have to figure out how you can programmatically choose the callback url, depending on the environment you're running in.

Thu, 27 Aug 2020 16:55:31 GMT

@norman137 says

And yes, you'd also have to make sure the url for the callback is in the allowed list

Thu, 27 Aug 2020 16:55:37 GMT

@daviesd says

We set these at runtime

config.REDIRECT_URI
if (inBrowser) {
    config.REDIRECT_URI = "<http://localhost:8000/redirect.html>"
}```

Thu, 27 Aug 2020 16:56:05 GMT

@daviesd says

then we have localhost and digby:// in the allowed redirect uris list

Thu, 27 Aug 2020 16:56:48 GMT

@dharmon says

so you need to allow them, but also programmatically handle them based on the environment?

Thu, 27 Aug 2020 16:56:55 GMT

@daviesd says

yes

Thu, 27 Aug 2020 16:57:13 GMT

@daviesd says

and i'm not sure you need the custom url scheme plugin if ionic is already handling this

Thu, 27 Aug 2020 16:57:20 GMT

@daviesd says

unless you were using it for something else

Thu, 27 Aug 2020 16:58:23 GMT

@dharmon says

That is a good question. It is an old app and I did not add that plugin, so it could easily be a case where it was useful before, but really isn't needed anymore.

Thu, 27 Aug 2020 16:59:10 GMT

@daviesd says

oauth2 is the most complex part of our app. lol.

Thu, 27 Aug 2020 17:15:51 GMT

@norman137 says

Does anybody know if this requires immediate attention, or can I just generate new certificates when I'm ready to work on my ios apps? Like is there any severe consequences if I don't deal with this before the certs expire?

Channel #plugins (1 messages)


Thu, 27 Aug 2020 15:49:09 GMT

@campbelg says

@campbelg has left the channel