Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all 49239 articles
Browse latest View live

Ionic App Errors only in Apple review process

$
0
0

@madmandrew wrote:

I’m on my 8th submission for this app, and it’s getting rejected because the content fails to load. My app works by loading content from a remote server on startup. It looks like all requests are failing.

The worst part is I have no way of replicating the issue that’s happening only in the review process. I’ve tested on every available emulator, including different versions of iOS, 13.1, 12.4, 11.1. I’ve also tested on iPhone 10. In EVERY SINGLE test the app works as intended.

I’ve added remote logging (which fails to send to server as well). I’ve resorted to logging my errors to the screen so that when Apple inevitably sends me a screenshot of the error message I can get some glimpse of whats happening.

I’ve been able to narrow down the exact request that is failing first (even though all http requests are failing) and in my next submission I will try and log better why it’s failing.

Also to note I’m using the Cordova Network Plugin, and it’s reporting that there is no internet access, but the reviewer claims they are connected.

I’m very much at a loss what to do other then just try more detailed logs… Apple is really driving me crazy with their stupid review process.

OH the kicker is I have EXACTLY the same app deployed in the app store right now!! just with a different white label and it’s functioning fine.

Posts: 1

Participants: 1

Read full topic


Search icon in keyboard

$
0
0

@VigneshBalakrishnan wrote:

Hi all,
I want to show user search icon in keyboard when search field is focused. I know it’s a silly question but i couldn’t fix it. Please help me, Thanks in advance.

Here is my html

<ion-searchbar #autofocus (ionInput)=“inputSearch($event)” (ionCancel)=“cancelSearch()” debounce=“500”
(keyup.enter)=“startSearching()” placeholder="">

Posts: 1

Participants: 1

Read full topic

Center and enlarge ion-icon in ion-col

$
0
0

@poplan wrote:

I get it like this
Screenshot_2
but I want it to be something like this
Screenshot_1

<ion-card (click)="onReports()">
    <ion-item detail class="ion-no-padding" lines="none">

      <ion-grid fixed>
        <ion-row>
          <ion-col size="5">
            <ion-icon
              name="image-outline"></ion-icon>
          </ion-col>
          <ion-col>
            <ion-card-header>
              <ion-card-title style="color: #6F449B;">
                Отчет 1
              </ion-card-title>
              <ion-card-subtitle>Контроль: н/д</ion-card-subtitle>
            </ion-card-header>
          </ion-col>
        </ion-row>
      </ion-grid>
    </ion-item>
  </ion-card>

Posts: 1

Participants: 1

Read full topic

Ionic 4 - Media player

$
0
0

@mirzam wrote:

Hi, I’m using this example

Now my problem is that i have a page with two paragraphs of text. For each of these I need a play/pause button with a progress bar :slight_smile:

all the mp3 files are stored in /assets/sounds/file1.mp3 and /assets/sounds/file2.mp3

But how do I load these in the .ts file and make them play individually ?

Posts: 1

Participants: 1

Read full topic

Using Ionic controllers with React

$
0
0

@fewl wrote:

Hi,

Bit of a newbie but couldn’t find any proper example on how to properly use controller (actionsheet, modal, etc) with React.

Here is just a boilerplate but I would like to :

  • programmaticaly create a modal on elent click
  • pass any parameters so I can load the right data in the modal

Many thanks

import React from 'react';
import {IonContent,  IonPage} from '@ionic/react';

import {actionSheetController, modalController} from '@ionic/core';

class Testmodal extends React.Component<{},State> {
  constructor(props:any) {  
    super(props);
  }

  openModal(id: number){
      //Create modal with parameters 
      /* //Not working code...
       modalController.create({

      })*/
  }

  render(){  
    return ( 
        <IonPage>      
            <IonContent>  
                  <div key="1" onClick={() => this.openModal(1)}></div>
                  <div key="1" onClick={() => this.openModal(1)}></div>
                  {/* etc... */}
            </IonContent>  
        </IonPage>
    );
  }
};

export default Testmodal;

Posts: 1

Participants: 1

Read full topic

How to fix member event from ionic angular error in ionic 5

$
0
0

@jvilas10 wrote:

Check Below Link - it work for me.

As it’s mentioned in the breaking changes, you should use Observables .

For example, you can create the following service:

import {Injectable} from '@angular/core';
import {Subject} from 'rxjs';

@Injectable({
    providedIn: 'root'
})
export class GlobalFooService {

    private fooSubject = new Subject<any>();

    publishSomeData(data: any) {
        this.fooSubject.next(data);
    }

    getObservable(): Subject<any> {
        return this.fooSubject;
    }
}

Now, you can subscribe in any component like app.component.ts :

@Component({
    selector: 'app-root',
    templateUrl: 'app.component.html',
    styleUrls: ['app.component.scss']
})
export class AppComponent {

    constructor(private globalFooService: GlobalFooService) {
        this.initializeApp();
    }

    initializeApp() {
        // other code

        this.globalFooService.getObservable().subscribe((data) => {
            console.log('Data received', data);
        });
    }
}

Now, you just have to emit the event from some other component:

@Component({
    selector: 'app-home',
    templateUrl: 'home.page.html',
    styleUrls: ['home.page.scss']
})
export class HomePage {

    constructor(private globalFooService: GlobalFooService) {
    }

    onSomeButtonClick() {
        this.globalFooService.publishSomeData({
            foo: 'bar'
        });
    }
}

Posts: 1

Participants: 1

Read full topic

Native app for ios doesn't work properly on TestFlight

$
0
0

@inside wrote:

I’ve build ios native package my app on AppFlow and uploaded to testFlight.
Now, at the first time that I run the app on the device (installed from testFlight):
app dosen’t send in http request headers Cookie: JSESSIONID (which user get after sign in).
If I close the app and open it again, then work correctly. When I run my app directly by USB it works allways correctly too.
I’ve tried: - Download the app (TestFlight) -> open it (wrong) -> close it -> open it again (correctly)
The same version of this app works correctly on android native.

Posts: 1

Participants: 1

Read full topic

Ionic v4 searchbar

$
0
0

@zawadhh wrote:

I am trying to add a search-bar to my list but I failed each time

my .html file

<ion-header>
  <ion-toolbar class="new-background-color">
    <ion-title>    
      <ion-text color="light">
        <h4> my app</h4>
      </ion-text>   

  </ion-title>
  <ion-buttons slot="start">
    <ion-menu-button autoHide="false" style="
    color: white;
"></ion-menu-button>
  </ion-buttons>
  
  </ion-toolbar>
</ion-header>

<ion-content>
    <ion-refresher slot="fixed" 
    (ionRefresh)="ionRefresh($event)" 
    (ionPull)="ionPull($event)" 
    (ionStart)="ionStart($event)">
      <ion-refresher-content
        pullingIcon="arrow-dropdown"
        pullingText="refresh"
        refreshingSpinner="circles"
        refreshingText=" ،،،Refreshin>
      </ion-refresher-content>
    </ion-refresher>
    <div style="
    align-content: center;
    justify-content: center;
    align-items: center;
    height: 50px;
    background-color: #3357a7;
    font-size: large;
    font-weight: bold;
    color: #ffc95b;
    margin-bottom: 10px;
    margin-top: 10px;
    text-align: center;
  ">
  
      <ion-label style="
      margin: auto;
      position: absolute;
      top: 30px; left: 0; bottom: 0; right: 0;
      
      ">  
        all content
        </ion-label>
        
    </div>
    <div style="
    align-content: center;
    justify-content: center;
    align-items: center;
    font-size: large;
    font-weight: bold;
    margin-bottom: 10px;
    margin-top: 10px;
    text-align: center;
  ">

        
    </div>
    
  


    <ion-grid class="mygrid">
      <ion-row class="my-item" *ngFor="let item of dataArray;let i=index" (click)="gotoNext(i)">
        <ion-col size="4">
            <ion-thumbnail>
                <img src="https://qateef-ads.co/uploads/{{ item.document }}" alt="your image">
            </ion-thumbnail>
        </ion-col>
        <ion-col size="6">
            <ion-row class="myitems">
              <p><strong> {{ item.title }} </strong>  </p>
              </ion-row>
              <ion-row size="6" class="myitemsc">
              <p> {{ item.city }} </p>
              <p  class="myitemstime"> {{ checktime(item.time) }} </p>
              </ion-row>
        </ion-col>
      </ion-row>
    </ion-grid>


  </ion-content>



my .ts file

import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Router,NavigationExtras } from '@angular/router';
import { LoadingController } from '@ionic/angular';
import  * as moment from 'moment';

@Component({
  selector: 'app-tab2',
  templateUrl: './tab2.page.html',
  styleUrls: ['./tab2.page.scss'],
})
export class Tab2Page implements OnInit {
  dataArray;

  constructor(private http: HttpClient,private router: Router,public loadingController: LoadingController) {
   
}

      async ngOnInit() {
	   const loading = await this.loadingController.create({
      message: 'working....'
    });
    await loading.present();
        this.http.get('https://mysite.co/apis/all.php').subscribe(async (response: any) => {
		  await loading.dismiss();
          console.log(response);
          this.dataArray = response;
		 
      });
  }

 
  async ionRefresh(event) {
   const loading = await this.loadingController.create({
      message: 'working....'
    });
    await loading.present();
    console.log('Pull Event Triggered!');
    this.http.get('https://mysite.co/apis/all.php').subscribe(async (response: any) => {
	 await loading.dismiss();
      console.log(response);
      this.dataArray = response;
      event.target.complete();
  });
}

gotoNext(index) {
  localStorage.setItem('detail', JSON.stringify(this.dataArray[index]));
  this.router.navigate(['/details']);
}

ionPull(event) {
  console.log('ionPull Event Triggered!');
}

ionStart(event) {
  console.log('ionStart Event Triggered!');
}
checktime(dttime)
{

return moment(dttime).fromNow().toString();
}

}




Posts: 1

Participants: 1

Read full topic


Ionic 4 Hide/Show Header Directive Animation LAGS while scrolling

$
0
0

@mhoxha wrote:

Hello everyone, I hope you all doing well :smiley: ,

I have been looking and searching for a good way to hide and show header on ionic 4 project while scrolling.
I have achieved that by the help of others on form and by doing some search, but what I am having issue now is that it is so laggy, like it flickrs and something like that when it hides/shows.

For this i have used a directive.
Here is my ionic info:

Ionic:

   Ionic CLI                     : 5.4.9 (C:\Users\Milot\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.9.1
   @angular-devkit/build-angular : 0.803.23
   @angular-devkit/schematics    : 8.1.3
   @angular/cli                  : 8.1.3
   @ionic/angular-toolkit        : 2.0.0

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.1.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 10 other plugins)

Utility:

   cordova-res : 0.8.1 (update available: 0.9.0)
   native-run  : 0.2.9 (update available: 0.3.0)

System:

   Android SDK Tools : 26.1.1 (C:\Users\Milot\AppData\Local\Android\Sdk)
   NodeJS            : v13.2.0 (C:\Program Files\nodejs\node.exe)
   npm               : 6.13.1
   OS                : Windows 10

And this is how i have used the directive:

import { Directive, Input, ElementRef, Renderer2, OnInit } from "@angular/core";
import { DomController } from "@ionic/angular";
​
@Directive({
  selector: "[myScrollVanish]"
})
export class ScrollVanishDirective implements OnInit {
  @Input("myScrollVanish") scrollArea;
​
  private hidden: boolean = false;
  private triggerDistance: number = 1;
​
  constructor(
    private element: ElementRef,
    private renderer: Renderer2,
    private domCtrl: DomController
  ) {}
​
  ngOnInit() {
    this.initStyles();
​
    this.scrollArea.ionScroll.subscribe(scrollEvent => {
      let delta = scrollEvent.detail.deltaY;
​
      if (scrollEvent.detail.currentY === 0 && this.hidden) {
        this.show();
      } else if (!this.hidden && delta > this.triggerDistance) {
        this.hide();
      } else if (this.hidden && delta < -this.triggerDistance) {
        this.show();
      }
    });
  }
​
  initStyles() {
    this.domCtrl.write(() => {
      this.renderer.setStyle(
        this.element.nativeElement,
        "transition",
        "0.1s linear"
      );
      this.renderer.setStyle(this.element.nativeElement, "height", "52px");
    });
  }
​
  hide() {
    this.domCtrl.write(() => {
    //   this.renderer.setStyle(this.element.nativeElement, "min-height", "0px");
      this.renderer.setStyle(this.element.nativeElement, "height", "0px");
    //   this.renderer.setStyle(this.element.nativeElement, "opacity", "0");
    //   this.renderer.setStyle(this.element.nativeElement, "padding", "0");
    });
​
    this.hidden = true;
  }
​
  show() {
    this.domCtrl.write(() => {
      this.renderer.setStyle(this.element.nativeElement, "height", "52px");
    //   this.renderer.removeStyle(this.element.nativeElement, "opacity");
    //   this.renderer.removeStyle(this.element.nativeElement, "min-height");
    //   this.renderer.removeStyle(this.element.nativeElement, "padding");
    });
​
    this.hidden = false;
  }
}

html file:

<ion-header>
  <ion-toolbar [myScrollVanish]="scrollArea">
  </ion-toolbar >
</ion-header>
<ion-content #scrollArea scrollEvents="true"> ... </ion-content>

and here is a video of it, first time its with 0.1s linear and second time is with 0.5s linear:
Click here for Stramable Video

i have tried these but with same results:
Link 1
Link 2
Link 3

thank you very much,

All the best,

Milot.

Posts: 1

Participants: 1

Read full topic

Ionic4 - Cannot find module - $_lazy_route_resource lazy namespace

xCode 7.3 and IONIC

$
0
0

@marcinni2 wrote:

Hello,

I am not used to Apple Products, I am trying to develop IOS app from my IONIC project (I managed to do it succesfully on Android) - using my friend’s MAC. It is not the latest version, that’s why I installed xCode 7.3.

I saw the info in the documentation that I need xCode 10. Does it mean that I have no chance to open projext in xCode? I did everything:

  • ng build --prod
  • ionic sync ios

So I have my IOS folder, I am trying to open my project in xCode, but I have the information: “File could not be opened”.

Anyone knows if there is some way to do it with not the latest version of MAC? I thought that developing on IOS is easier - I’ve never been Apple product user and it doesn’t convince me :grin: - thanks for any help!

Cheers!

Posts: 1

Participants: 1

Read full topic

ngClass not working on Ionic 4

$
0
0

@adrosutal wrote:

Hi, I’m testing ngClass in a project, so that an ion-item changes color based on a numeric value, this is the HTML code

<ng-container *ngFor="let player of team1">
  <ion-item [ngClass]="{'rBG': player.Susp > 0}">
    <ion-label slot="start" (click)="presentAlert()">{{player.Name}} {{player.Surn1}} {{player.Surn2}} {{player.Num}}</ion-label>
    <ion-checkbox slot="end"></ion-checkbox>
  </ion-item>
</ng-container>

Here is my SCSS code:

.rGB{
    color: red;
 }

player.Susp holds a numeric value obtained from a database

Posts: 5

Participants: 2

Read full topic

Trying to update to iOS 5, get errors in build

$
0
0

@helpmelearn wrote:

Was trying to build my old way and got error.

(node:1923) UnhandledPromiseRejectionWarning: TypeError: Cannot read property ‘toLowerCase’ of undefined

I need to updated my iOS to 5 or 5.1. As I’m adding this platform ionic tries to install all my plugins. Getting these errors.

Installing “cordova-plugin-device” for ios
Failed to install ‘cordova-plugin-device’: Error: Cannot find module ‘glob’

Installing “cordova-plugin-whitelist” for ios
Failed to install ‘cordova-plugin-whitelist’: Error: Cannot find module ‘./src/superspawn’

Tried ionic cordova prepare ios similar errors installing plugins.

I think I need to upgrade some other items. I’m still kind of stuck on Ionic 3. Here is my ionic info.
Again I have just tried to add iOS 5.1 has build problems was on ionic iOS 4.5.5.

What should I try next?

cli packages: (/Users/dev/.npm-packages/lib/node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0 

local packages:

@ionic/app-scripts : 3.2.4
Cordova Platforms  : ios 5.1.1
Ionic Framework    : ionic-angular 3.9.2

System:

ios-deploy : 1.9.2 
Node       : v8.10.0
npm        : 5.8.0 
OS         : macOS
Xcode      : Xcode 11.3.1 Build version 11C504 

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : pro

Posts: 2

Participants: 1

Read full topic

Login Integration with ForgeRock for Mobile App

$
0
0

@thirugnanam wrote:

We are trying to integrate ionic 4 with ForgeRock for login authentication. We are trying to use ForgeRock Javascript SDK. I would like to know if there are any any existing challenges before start using them. Appreciate your response.

Posts: 1

Participants: 1

Read full topic

It's a nightmare to maintain an ionic app

$
0
0

@torger wrote:

Why is backwards compatibility broken ALL THE TIME? I’m maintaining an app that was built with ionic-v1. Lots and lots of things have broken and been deprecated in just a few years. Strong recommendation to move to capacitor for unclear reason other than breaking compatibility. Surprise, capacitor requires typescript which is not supported in ionic-v1.

It’s pretty obvious to me that those that develop Ionic has NO INTEREST whatsoever in making an app easy to maintain over the years. And with constant launching of new versions with compatibility breaks and new best practices it’s almost impossible to find useful docs in forums, as it’s so fragmented between the versions.

Sorry for the language, but I’m just so incredibly frustrated when I’m spending days to just get stuff to work, with NO real code change whatsoever to the app, I just want it to build with an up to date toolchain.

Making apps with web technology is supposed to be easy. And it is. If you follow the current tutorial. But if you get back three months later, that tutorial looks different, and if your app was based on the old tutorial, you’re f****d. It’s like as if this framework is made for people that make apps that take one month to develop and has a life cycle of three months before it’s thrown away.

I make apps that have life time that spans many years, and they don’t need that much functional update. Is that use case really that unique that you need to make migration a living h*ll?

Posts: 1

Participants: 1

Read full topic


Issue with ionDrag listener

$
0
0

@IrekJanek wrote:

Angular v 8.1.2 & ionic v 5.4.16

I am trying to listen for ion-item-sliding ionDrag event but the event never fires and when I go to check the listeners on my IonItemSliding the ionDrag is not listed. Any ideas?

Posts: 1

Participants: 1

Read full topic

Can not create new project in ionic 5 in windows

$
0
0

@alitalaee wrote:

Hi Team,

I’m new to Ionic and tried creating an application using the below command

C:\Windows\System32>ionic start myFirstApp --type=“angular” blank

I’ve the below erro

Capture

please Help me

Posts: 1

Participants: 1

Read full topic

Ionic 4 - New Starter Help

$
0
0

@RobHowdle wrote:

Hi everyone, I’m new to Ionic and Angular so please forgive any stupid questions.

I am attempting to learn this framework and I’m building a random app purely to see how I’m doing it in. I seem to be struggling with the most basic stuff though, watching youtube tutorials on Ionic 4 and Angular JS, everything seems right or at least the same as what the people in the tutorials have yet mine has elements that don’t work.

For example I cannot get a menu to work, I can get a split plane and display a menu on the first page but something like toggling a menu on any other page or even displaying the menu on another page doesn’t work.

I’m not sure if perhaps my layout of the html pages are incorrect, I’m at looking at this similar to a normal HTML project which could be wrong but I didn’t find anything on actually structuring the front end page. I’ve included my menu page below which ideally I’m hoping to have some tabs that link to pages, there would only be a few but even then I’m open to suggestions.

The issue with just this part for example is the title, I would expect this to resize between a desktop and a mobile device (I’m running in a browser and ionic lab to simulate ios and android) but it seems to have no form of mobile responsiveness at all?

AGain I could totally be wrong and end up doing something completely wrong and I’m hoping somebody could point me in the right direction because so far the tutorials haven’t been much help and the documentation doesn’t seem to answer my questions, or simply I just don’t get it…

<ion-buttons slot="start">

  <ion-menu-button></ion-menu-button>

</ion-buttons>

<ion-title>

  <h1 class="title">

  Mr B's Droid Checklist

  </h1>

</ion-title>
<ion-tab-bar slot="top" has-header="true">

  <ion-tab-button tab="astromechs">

    <ion-icon name="person"></ion-icon>

  </ion-tab-button>

  <ion-tab-button tab="d0">

    <ion-icon name="call"></ion-icon>

  </ion-tab-button>

  <ion-tab-button tab="bd1">

    <ion-icon name="settings"></ion-icon>

  </ion-tab-button>

  <ion-tab-button tab="bt1">

    <ion-icon name="settings"></ion-icon>

  </ion-tab-button>

</ion-tab-bar>

Any suggestions would be greatly appriciated

Thanks
Rob

Posts: 2

Participants: 2

Read full topic

No Icon is showing Up in my app

$
0
0

@Xerxix wrote:

I have an App, and when I build the app no icon is showing and I am not sure what could be the solution.
what could be the possible solution !!
Need you help guys.

Posts: 1

Participants: 1

Read full topic

Carrusel se ejecuta sólo en el home, no funciona en paginas internas

$
0
0

@tmoksilva wrote:

Hola, estoy usando un archivo en javascript para integrar un carrusel en mi aplicación, cuando se carga la app en el home funciona sin problema, pero si paso a otra página usando el routerLink, no carga el mismo slider.

Pareciera que como ya cargó la primera vez el archivo js en el home al pasar a la otra página ya no detecta el slider. Si yo recargo esa página en donde no se ve. Si carga el slider sin problema.

La idea es no recargar la página para ver el carrusel.

Alguna idea???

Posts: 1

Participants: 1

Read full topic

Viewing all 49239 articles
Browse latest View live