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

Ionic back button bug only working after I slide the pointer on It

$
0
0

So basically, I have this simple code that should be working fine but for some reason I’m getting a rare bug.

I have a page called “home” and a sidemenu which I use to navigate to the page “mysports”. When It first loads the page “mysports”, it displays the ion-back-button, but whenever I try to click it, it doesn’t work. But, when I click the ion-back-button and slide it to the left, the HTML refreshes and the ion-back-button works perfectly fine.

On my html I have this code:

<ion-header>
  <ion-toolbar>
    <ion-buttons>
      <ion-back-button text="Back"></ion-back-button>
      <ion-label>
        <ion-title class="ion-text-center">spoRts</ion-title>
      </ion-label>
    </ion-buttons>
  </ion-toolbar>
</ion-header>

<ion-content>

</ion-content>

1 post - 1 participant

Read full topic


AppFlow Release Blocked by changesNotSentForReview

$
0
0

Hi, we’re having some issues deploying out through AppFlow after updating fixing some app content/review requests.

After adding an InApp disclosure for location data a rebuild and deployment of the application is prevented by this error:

Google Api Error: badRequest: Changes cannot be sent for review automatically. Please set the query parameter changesNotSentForReview to true. Once committed, the changes in this edit can be sent for review from the Google Play Console UI. - Changes cannot be sent for review automatically. Please set the query parameter changesNotSentForReview to true. Once committed, the changes in this edit can be sent for review from the Google Play Console UI.

We can’t figure out how to redeploy it out to the Google Play Store. There’s no input for adding a changeNotSentForReview query param.

1 post - 1 participant

Read full topic

Ionic 5: Error: The old format of this exec call has been removed (deprecated since 2.1)

$
0
0

I am working with Ionic 5, using capacitor and I tried to use the PreviewAnyFile plugin. after installing the plugging as directed by (this)[PreviewAnyFile - Ionic Documentation]. I passed it to my constructor and called it by

    this.documentViewer
        .previewBase64(file, { name: filename, mimeType: fileMimeType })
        .then((res: any) => console.log(res))
        .catch((error: any) => console.error(error));
    });

and I get :
Error: The old format of this exec call has been removed (deprecated since 2.1). Change to: cordova.exec(null, null, ‘Service’, ‘action’, [ arg1, arg2 ]);
at capacitorExec (capacitor-runtime.js:1978)
at execProxy (capacitor-runtime.js:2114)
at PreviewAnyFile.previewBase64 (capacitor-runtime.js:3088)
at callCordovaPlugin (/vendor-es2015.js:137148)
at /vendor-es2015.js:136961
at /vendor-es2015.js:136921
at new ZoneAwarePromise (/polyfills-es2015.js:3587)
at tryNativePromise (/vendor-es2015.js:136920)
at getPromise (/vendor-es2015.js:136939)
at wrapPromise (/vendor-es2015.js:136944)

Please any way out of this? I use other plugins in the app, like launch navigator and call number and they worked fine.

1 post - 1 participant

Read full topic

How can i use vuex actions in a composable file with capacitor camera

$
0
0

Hi guys, I have a problem about how to use vuex within a composable file on the use of the capacitor camera plugin, I need once the photo is taken to send it immediately to the backend since if I send a batch of images they are too heavy and the app may is used in places with bad coverage, I am using vuex with split modules, but there is no way to use vuex dispatches in the .ts file.

And another important point is that I wanted to know what is the best way to send an image to the backend, as a blob in a formData or in a normal request but using the image as base64, which is more appropriate in terms of good practices, any help will be very well received and grateful

1 post - 1 participant

Read full topic

Smart way to auto scale the ion-labels

$
0
0

I have an Application which runs of , phone and Ipad, but then i observed & seen the ion-labels are relatively small in bigger devices like iPads , I found two solutions do scale those ion-labels on Phone and iPads using media query , is there any better & fast standard approach to achieve the objectives

1 post - 1 participant

Read full topic

IonModal Dynamic Height

$
0
0

(topic withdrawn by author, will be automatically deleted in 24 hours unless flagged)

1 post - 1 participant

Read full topic

IonModal With Dynamic Height

$
0
0

Is there way for IonModal to dynamically adjust its height according to its content?

For example, min height could be 200px and max height 90%, but everything in between adjusts accordingly so the user doesn’t have excess whitespace at bottom or need to scroll to see lower content?

5 posts - 3 participants

Read full topic

Ion-searchbar background colour change on focus

$
0
0

Hi all, I am trying to change the ion-searchbar background on focus but I am do that could please anyone help me in that

1 post - 1 participant

Read full topic


Announcing Ionic Portals

$
0
0

Originally published at: Announcing Ionic Portals - Ionic Blog

Today, we are excited to announce the alpha of a new product from the Ionic team: Ionic Portals. Ionic Portals is our first product aimed at native mobile app developers and provides a supercharged Web View native control to enable native and web teams to better collaborate and bring new and existing web experiences to…

1 post - 1 participant

Read full topic

Build error ld: framework not found Pods

$
0
0

Hi guys,
I rebuilt my app after few months and now I receive this error:

ld: framework not found Pods_<project_name>

I tried to clean all, removed platform and rebuit for ios

I am very worried because I cannot find a solution.

Please support me

L

1 post - 1 participant

Read full topic

Angular + Ionic - Using ionic components returns 'not a known element'

$
0
0

I followed the official Ionic guide to create my first app, and it installed Ionic version 5.4.16 Angular version 11.2.13.
The issue is that anytime that I try to use a Ionic component (ie. ion-button, ion-label, etc), I get this message

This is my LoginPage html

<ion-header>
  <ion-toolbar>
    <ion-title>OSCheckin</ion-title>
  </ion-toolbar>
</ion-header>
<div>
  <div class="d-flex h-100">
    <div class="m-auto w-75">
      <IonItem>
          <IonLabel>Email</IonLabel>
          <IonInput value="" placeholder="Ex.: joao.silva@prefeitura.org.br" type="email"></IonInput>
      </IonItem>
      <IonItem>
          <IonLabel>Senha</IonLabel>
          <IonInput value="" placeholder="*********"></IonInput>
      </IonItem>
      <IonButton onClick="" expand="block">Entrar</IonButton>
    </div>
  </div>
</div>

this is my login module:

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';

import { IonicModule } from '@ionic/angular';

import { LoginPageRoutingModule } from './login-routing.module';

import { LoginPage } from './login.page';

@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    IonicModule,
    LoginPageRoutingModule
  ],
  declarations: [LoginPage]
})
export class LoginPageModule {}

And this is my AppModule:

import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { RouteReuseStrategy } from '@angular/router';
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [AppComponent],
  entryComponents: [],
  imports: [
    BrowserModule, 
    IonicModule.forRoot(), 
    AppRoutingModule,
    FormsModule
  ],
  providers: [{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }],
  bootstrap: [AppComponent]
})
export class AppModule {}

btw, if I install Angular 9, it works perfectly.

2 posts - 2 participants

Read full topic

Why is a component not executed after a guard?

$
0
0

I am implementing guards in my application, it works in a general way as follows:

  • Login page (username and password)
  • Token is created and stored
  • Tab1 is shown with a list of events. Clicking on any event opens a modal window that is a component with the specific information of that event.

These steps mentioned are the ideal scenario, but it happens that not, when clicking on a specific event it shows me the following error:

Can’t bind to ‘ngIf’ since it isn’t a known property of ‘ion-content’.

Looking for the error, it is solved by adding CommonModule in components.module.ts, and of course it is added, otherwise the application would never have worked before implementing the guard.

Testing, I have to go to tab2 (events by category), go back to tab1, click on any event and it already shows as it should be…

What loads when I move to tab2?

Here some code:

app-routing.module.ts:

{
     path: 'main',
     loadChildren: () => import('./pages/tabs/tabs.module').then(m => m.TabsPageModule),
     canLoad:[UsuarioGuard]
}

usuario.guard.ts:

constructor(private usuarioService:UsuarioService){}
    
      canLoad(): Observable<boolean> | Promise<boolean> | boolean {
    
        return this.usuarioService.validaToken();
      }

usuario.service.ts:

async cargarToken(){
        this.token = await this.storage.get('token') || null;
      }
    
      async validaToken():Promise<boolean>{
    
        await this.cargarToken();
    
        if(!this.token){
          this.navCtrl.navigateRoot('/login');
          return Promise.resolve(false);
        }
    
        return new Promise<boolean>(resolve => {
    
          const headers = new HttpHeaders({
            'Content-Type':'application/json',
            'Authorization': 'Bearer ' + this.token
          });
    
          this.http.get(`${URL}/API_3/userTkn`, { headers })
          .subscribe(resp => {
            if(resp['ok']){
              this.usuario = resp['usuario'];
              resolve(true);
            }
            else{
              this.navCtrl.navigateRoot('/login');
              resolve(false);
            }
          });
        });
      }

Any idea?

1 post - 1 participant

Read full topic

Cant change icon/Splash Screen

$
0
0

I put my icon.png(1024x1024) and splash.png(2732x2732) to resources folder and change with default splash and icon. Then i run ionic cordova resources. Everything is okay i can see my icon and splash inside of visual studio code like :

But when i use ionic build then npx cap sync android and deploy it from android studio my splash and icon didnt changed. How can i fix that ? Whats wrong i doing ? Thanks for your answers and sorry for my bad english :slight_smile:

1 post - 1 participant

Read full topic

How to use ion-tabs auto active specific page without click

$
0
0

Hello Guys, I have a question how am I using the tabs function when I router the specific page when that have ion-tabs with auto active the first page of the tab. Like the Tab of bootstrap.

for example, I clicked the news page ( not the home default page ), inside news page have ion-tabs, and have 3 tabs of ion-tab-button.
but when I was in news, the first tab button of the page I wanna active in news, unnecessary clicked again the first tab button. Like this…

Hope My question makes some ionic teacher understand and get help. Thank You so much.

2 posts - 1 participant

Read full topic

IonChange event triggers on wrong component due to caching

$
0
0

I have multiple Vue component which are all different pages of my app. Each page has a ion-searchbar component in it. Each ion-searchbar has a @ionChange event that filters a list on the page.

The strange thing is now, that when I type something in a searchbar in page A, the ionChange event of page B triggers. I think it is due to Ionic or Vue caching the ion-searchbar component as I find this in the stack trace: Object.onIonChange._cache.<computed>._cache.<computed>

That trace is executed once for the current page and another time for the wrong page. Is there a fix to turn off this caching or what could be the issue here?

1 post - 1 participant

Read full topic


How to access files from customer's network path by ionic?

$
0
0

I need to access files in customer’s network path.I have only their network path like \10.1.1.1{FolderName}{SubFolder}{file}. I can connect this path in my run command by connected vpn of them.I am working in ionic framework. I tried some ajax call and http call with that path. Can anyone please tell me how to access the path and what should i do in mobile app…

1 post - 1 participant

Read full topic

Consent Management Platform Integration

$
0
0

Hi, I’m curious if anyone has tried to integrate a consent management platform (CMP) into their Ionic App?

Our app is built with Ionic/Angular/Cordova and we’re currently working with Sourcepoint, but we have problems integrating their web-SDK.
Android/iOS SDKs are available too, but unfortunately no Cordova plugin…

Any advice would be appreciated much :slight_smile:

thx

1 post - 1 participant

Read full topic

How can i do a with color="primary" on IOS

How to implement Firebase Push Notification using Ionic React

$
0
0

Hi,

Do you know any tutorial on how to implement Firebase Push Notifications or FCM using Ionic React? I found a bunch of Angular tutorials but it does not help me.

Thanks!

5 posts - 2 participants

Read full topic

Two Tab Bars Appearing in One Page

$
0
0

In my Ionic React App, there are 3 Tabs.

Different pages have different internal tabs.

When I’m navigating through diff pages, some times these tabs repeats. The earlier page tab remains stuck.

Navigation video could be seen at this link

MobileAppIssue - YouTube

Any help to solve this issue is highly appreciated.

Explanation
I’ve 3 Tab Pages DashboardTabs, TimesheetTabs and ExpenseTabs

  1. DashboardTabs
    It has Tab Buttons for Timesheet and Expense

  2. TimesheetTabs
    It has Tabs for Dashboard, and Few Other Tabs related to this module

  3. ExpenseTabs
    It has Tabs for Dashboard, and Few Other Tabs related to this module

When the issue occurs (steps)?

  • From Dashboard click to go to ‘TimesheetTabs’
  • On TimehseetTabs again click to go to DashboardTabs
  • On DashboardTabs click on ‘ExpenseTabs’
  • On ExpenseTabs click to go to ‘DashboardTabs’

My App.tsx looks as below:

const App: React.FC = () => (
<IonApp>
<IonReactRouter>
<IonSplitPane contentId="main">
 <Menu />
<IonRouterOutlet id="main">
<Route path="/login" component={Login} exact />
<Route path="/demo" component={Demo} exact />
<Route path="/dashboard" component={DashboardTabs}  exact={true} />            
<Route path="/dashboard/view" component={Dashboard}  />
<Route path="/timesheet" component={TimesheetTabs}  />
<Route path="/timesheet/calendar/:date" component={TimesheetTabs}  exact={true}  />            <Route path="/timesheet/create/:date" component={TimeEntryForm}  exact={true} />    <Route path="/timesheet/update/:trackingId" component={TimeEntryForm}  exact={true} />    <Route path="/timesheet/view/:trackingId" component={ViewTime}  exact={true} />
<Route path="/my-profile" component={MyProfile}  />
<Route path="/lead" component={LeadTabs}  />
<Route path="/expense" component={ExpenseTabs}  />
<Route path="/expense/create" component={ExpenseForm}  /> 
<Route path="/expense/update/:expenseId" component={ExpenseForm}  exact={true} />    <Route path="/register" component={Register} exact />
<Route path="/home" component={Home} exact />
<Route path="/documents" component={DocumentList} exact />
<Route path="/leave-application" component={LeaveApplication} exact />
<Route path="/document/upload-document" component={UploadDocument} exact />
<Route exact path="/" render={() => <Redirect to="/login" />} />
</IonRouterOutlet>
</IonSplitPane>
</IonReactRouter></IonApp>
);

export default App;

DashboardTabs is a Tab Page that looks as below:

const DashboardTabs: React.FC = () => {

return (
<IonTabs>
      <IonRouterOutlet>
        <Route exact  path="/dashboard" component={Dashboard}  />
        <Route path="/timesheet" component={TimesheetTabs} exact={true} />      
        <Route path="/expense" component={ExpenseTabs} exact={true} />      
      </IonRouterOutlet>

      <IonTabBar slot="bottom">
        <IonTabButton tab="calendar"   href="/timesheet">
          <IonIcon icon={calendar} />
          <IonLabel>Timesheet</IonLabel>
        </IonTabButton>
        <IonTabButton tab="expense" href="/expense">
          <IonIcon icon={cardOutline} />
          <IonLabel>Expenses</IonLabel>
        </IonTabButton>
        <IonTabButton href="javascript:void(0)"  >
          <IonIcon onClick={() => setShowActionSheet(true)} icon={ellipsisVerticalOutline} />
          <IonLabel>Others</IonLabel>
        </IonTabButton>
      </IonTabBar>
    </IonTabs>
  );
};

export default DashboardTabs;

TimesheetTabs is a Tab Page which looks as below:

const TimesheetTabs: React.FC = () => {
return (
    <IonTabs>
      <IonRouterOutlet>
      <Route path="/timesheet/calendar" component={TimesheetCalendar} exact={true} />
        <Route path="/timesheet/calendar/:date" component={TimesheetCalendar} exact={true} />
        <Route path="/timesheet/analysis" component={TimeAnalysis} exact={true} />
        <Route path="/timesheet/timer" component={Timer}  exact={true}/>          
        <Route exact path="/timesheet" render={() => <Redirect to="/timesheet/calendar" />} />
      </IonRouterOutlet>

      <IonTabBar slot="bottom">
        <IonTabButton tab="home"   href="/dashboard">
          <IonIcon icon={homeOutline} color="warning" />
          <IonLabel>Dashboard</IonLabel>
        </IonTabButton>

        <IonTabButton tab="calendar"   href="/timesheet/calendar">
          <IonIcon icon={calendar} />
          <IonLabel>Timesheet</IonLabel>
        </IonTabButton>

       <IonTabButton tab="timer" href="/timesheet/timer">
          <IonIcon icon={stopwatchOutline} />
          <IonLabel>Timer</IonLabel>
        </IonTabButton>

        <IonTabButton tab="analysis" href="/timesheet/analysis">
          <IonIcon icon={barChart} />
          <IonLabel>Analyze</IonLabel>
        </IonTabButton>

      </IonTabBar>
    </IonTabs>
  );
};
export default TimesheetTabs;

ExpenseTabs is a Tab Page that looks as below:

const ExpenseTabs: React.FC = () => {
return (
    <IonTabs>
      <IonRouterOutlet>
        
        <Route path="/expense/list" component={ExpenseList} exact={true} />
        <Route path="/expense/analysis" component={ExpenseAnalysis} exact={true} />
        <Route path="/expense/new-expense" component={ExpenseForm} exact={true} />
        <Route path="/expense" render={() => <Redirect to="/expense/list" />} exact={true} />
      </IonRouterOutlet>

      <IonTabBar slot="bottom">
        <IonTabButton tab="home"  href="/dashboard" >
          <IonIcon icon={homeOutline} color="warning" />
          <IonLabel>Dashboard</IonLabel>
        </IonTabButton>

        <IonTabButton tab="calendar"   href="/expense/list">
          <IonIcon icon={calendar} />
          <IonLabel>My Expenses</IonLabel>
        </IonTabButton>

        <IonTabButton tab="analysis" href="/expense/analysis">
          <IonIcon icon={barChart} />
          <IonLabel>Analyze</IonLabel>
        </IonTabButton>

      </IonTabBar>
    </IonTabs>
  );
};

export default ExpenseTabs;

Sincerely,
Ashish Tripathi

4 posts - 2 participants

Read full topic

Viewing all 49366 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>