Super weird. ionic search

Hey, guys. I’ve been implementing search function and it works perfectly on a web browser, but once I’ve built it on iOS it shows a black screen. Data is getting from API.


<ion-searchbar (ionInput)="getItems($event)"  [showCancelButton]="true"  (ionCancel)="closeSelf()"> </ion-searchbar>
<h3 left class='results'>Results</h3>

<div class="suggested-campaigns2">
  <ion-list *ngIf="showResults">
    <ion-item *ngFor="let item of campaigns" (click)=goToCampaign(;>

        {{ item.camp_title}}


constructor(public navCtrl: NavController, 
                private campaignsService: CampaignsService, 
                private toolbar: Toolbar) {

// get search results
      this.campaigns = JSON.parse(localStorage.getItem('campaigns_data'))

    getItems(ev: any) {
      let val =;
      if (val && val.trim() != '') {
        this.campaigns = this.campaigns.filter((item) => {
          return (item.camp_title.toLowerCase().indexOf(val.toLowerCase()) > -1);
        this.showResults = true;
      if (!val || val.trim() == ''){
        this.showResults = true;

Any Ideas what could be the problem?
Thanks !

It’s up to you but if you provide the repo I’m happy to have a look.