Ionic: refresher not working on iOS home screen app, working in browser

Viewed 787

I'm building a PWA with Ionic and I have a ion-refresher in my app:

<ion-content>
  <ion-refresher slot="fixed" (ionRefresh)="refresh()">
    <ion-refresher-content pullingIcon="lines"></ion-refresher-content>
  </ion-refresher>
...
</ion-content>

On my iPhone, in the browser the refresher is working fine (I can pull down on the screen and it will reload the page). When I add the app to my home screen however, it stops working.

Any ideas? Here are the packages I use:

  "dependencies": {
    "@angular/animations": "^9.0.0",
    "@angular/cdk": "^9.2.0",
    "@angular/common": "~9.1.0",
    "@angular/core": "~9.1.0",
    "@angular/fire": "^6.0.0",
    "@angular/forms": "~9.1.0",
    "@angular/platform-browser": "~9.1.0",
    "@angular/platform-browser-dynamic": "~9.1.0",
    "@angular/router": "~9.1.0",
    "@angular/service-worker": "~9.1.0",
    "@capacitor/core": "^2.0.2",
    "@ionic-native/core": "^5.0.7",
    "@ionic-native/splash-screen": "^5.0.0",
    "@ionic-native/status-bar": "^5.0.0",
    "@ionic/angular": "^5.0.0",
    "@types/gapi": "0.0.39",
    "@types/gapi.auth2": "0.0.51",
    "@types/gapi.client.drive": "^3.0.4",
    "@types/node": "^13.11.1",
    "bootstrap": "^4.4.1",
    "chart.js": "^2.9.3",
    "chartjs-plugin-datalabels": "^0.7.0",
    "cordova-ios": "5.1.1",
    "core-js": "^2.5.4",
    "decimal.js-light": "^2.5.0",
    "firebase": "^7.13.2",
    "ng2-charts": "^2.3.0",
    "rxjs": "~6.5.1",
    "tslib": "^1.10.0",
    "zone.js": "~0.10.2"
  },
2 Answers

I had the same issue, for me what did the trick is that I was missing

viewport-fit=cover

from the "viewport" meta

<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover"/>

Try to use the attribute force-overscroll in the ion content

<ion-content force-overscroll="true"> 
.
.
.
</ion-content>
Related