Ionic 3 running in the browser: application navigates to root when switch back to Safari - ionic-framework

I have built an Ionic 3 app which will be served in the browser (as a PWA).
I build it using ionic cordova build browser --prod, everything works as expected, but in iOS's Safari there is a strange behaviour: the app navigates between pages using the NavController's push method and the url changes, using a hash strategy, and when the user go to another app and then returns to iOS, the location from my Ionic app "reset" and the user is sent to to root.
Anyone has any idea of why this can be happening? This does not happen in Android's Chrome.

What you are experience is a known 'bug'
Maximiliano Flirtman expose that behavior for ios PWA with:
Your PWA won’t keep state between sessions, if the user gets out of a PWA, it will be restarted when coming back, so if you need the user to validate an email, SMS or do a two-factor authentication, have that in mind to offer a proper solution.
See all Maximiliano Flirtman post.

Related

How to support WebAuthn in WKWebViews or on PWA based IOS app

I am using webauthn for biometric authentication like fingerprint scan in my pwa.
Now to publish it on IOS as an app I have used pwabuilder.com to get an ios package, which packages pwa to load it in wkwebview so that it can run on ios as native app. Now when I am running this pwa ios package using xcode everything is working fine except biometric login.
I checked online and it seems wkwebviews don't support webauthn. Is there any work around for this?
We tried using SFSafariViewerController and with this, webauthn works fine but once user presses done on safariviewercontroller UI it reaches back to login page so we will need to send some authentication information to WKWebView which initiated that SFSafariViewerController in order to authenticate user. Can anyone tell us how can we share the data between SFSafariViewerController and WKWebView?

When we add pwa app to homescreen. Do we get two service workers then for the same site one with browser and one with native app?

So Suppose we have a pwa app say X. When we install that app on homescreen, do we get two service workers one on browser say chrome and one in the native app? How push notifications will work in such cases, do we have to get subscription for native app separately for sending push notification to service worker of native app. And will these notifications appear in app or on chrome browser?
P.S By native app I mean pwa app installed on homescreen
Add to home screen does not add a native app to your device or desktop. It's still using browser resources. There's one service worker and one push notifications flow.

Ionic facebook login: getting this app is still in development mode While I set it in live mode

I am developing an ionic app. Used facebook login, I set my facebook app into live mode, my app is running as a charm on website, but on my android device it is giving the well known error (this app is still in development mode ...). I have no facebook data access except the default public data and email, which, as I know, do not need app review.
I have double checked app id, app secret from firebase. But I am wondering if it could be because of an error in the key hash.
I have 24 or more tabs opened on my chrome searchin for the same error, all of such cases have not set the app into live mode.
Any help is appreciated
The app is live.
I have checked every thing, and everything was correct, facebook app id in packages.json is the same as in the facebook console. (It was different and I have corrected it earlier).
I found the old facebook-app-id in the files platforms\android\android.json and platforms\android\app\src\main\res\values\facebookconnect.xml.
Changed it to the actual facebook app id.

Ionic Facebook plugin work only on one phone

I'm building an Ionic app with Facebook Login support.
I'm setting all as required in the developer.facebook.com settings and on config.xml on ionic config.
The login works fine for only my phone.
On every other phone the method facebook.login(['email']) reject Promise and pass an empty error.
How is it possible, counting that every configuration is compiler-related and not phone-related? There isn't config that uses device information.
Is really strange because I'm expecting does or doesn't work everywhere.
On every phone I've tried, Facebook app is installed and logged. No Facebook Lite installed.
Find the problem.
Facebook dev app was is develop mode so only me can access.
Possible solutions are:
Make in prod mode the app
Add other users facebook account to tester list

Face book latest IOS SDK problems in iPhone?

I am working in face book functionality in my apps. I have integrated the latest Face book-IOS-SDK. When runs the application, the application is started and runs in the safari browser. Now I want to load the application in the user view(FB web view) instead of Safari. How can I achieve this?
Facebook doesn't want you to. Facebook's new SDK wants the user to login into Facebook once, and than that Facebook login be used in every app on the device that uses Facebook. Because of the way the iPhone works, the way they had to do that was through safari so that each app could get that info. You can go back to the original way (which so far I personally prefer), but I'm not entirely sure how.
However, if you use the new way, it will automatically redirect the user back to your app once they finish authenticating it. Also in the Safari page they can give your app permissions, ie. post status updates.