Quantcast
Channel: Ionic Forum - Latest topics
Viewing all 70435 articles
Browse latest View live

Method of payment


Error "Your app contains non-public API usage" uploading an app on iOS App Store

$
0
0

@ioclaudio wrote:

Hi,
I’m trying to submit on Apple Store a new version of an app I’ve already submitted many times.
Last time I submitted this app was last week.

Now, I’ve done some code bug-fixing, but if I try to submit the new version of the app I’ve these errors:

Upload failed

App store connect operation error
Your app contains non-public API usage. Please, review the errors, correct them, and resubmit your application.

App store connect operation error
The app references non-public selectors in Payload/AppName.app/AppName
_setAlwaysRunsAtForegroundPriority:, databasePool:didAddDatabase,
databasePool:shouldAddDatabaseToPool:, ddSetLogLevel

Have you ever had this error?
Which could be the problem?
I’ve submitted the same app next week.

thank you very much

Claudio

Posts: 1

Participants: 1

Read full topic

Ionic application is not working on iPhonex device

$
0
0

@Harikag wrote:

I am developing one application on ionic and angularJS, but my application is working fine on Android device, but it is not working on iPhonex OS version 12.3.1 (Sometimes button clicks are not working, etc…), But the same application is working on other iPhone devices with 12.3.1. So Help me out. Please.

Posts: 1

Participants: 1

Read full topic

Return callback doesn't work

$
0
0

@contrasto97 wrote:

Hi, im tryng to get the response from this http get but itgive me this error:


vendor.js:1823 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'subscribe' of undefined
TypeError: Cannot read property 'subscribe' of undefined

here’s my function code

getChatId(emailTo): any {
    var email = emailTo

    const httpOptions = {
      headers: new HttpHeaders({
        'Accept': 'application/json',
        'Content-Type': 'application/json',
        'Token': this.token_value
      })
    };

    this.httpClient.get("https://xxxx=" + email, httpOptions)
      .subscribe(data => {
        console.log(data['_body']);
        return data
      }, error => {
        console.log(error);
        return error
      });
  }

this inside my constructor

this.getChatId(this.emailTo).then((date) => {

      var docRef = firebase.firestore().collection("xxx").doc(date.response);

      docRef.onSnapshot((doc) => {
        this.document = doc.data()

        let chats_message = [];
        for (let k in this.document.messages) {
          chats_message.push(this.document.messages[k]);
        }
        chats_message.sort(function (a, b) { return a.id - b.id; })
        this.messages_chat = chats_message;
        this.content.scrollToBottom(300);//300ms animation speed

        console.log("Array", this.messages_chat);
      })
    });

Posts: 1

Participants: 1

Read full topic

Is this possible? (multiple ion-router-outlet)

$
0
0

@rosunad wrote:

I’ve got a main router-outlet in app-component and then, another router-outlet named inside one page that is loaded inside the main router. When I tried to load, from this page, another one in the secondary router I receive and error ‘cannot match any route’. I’ve tried writing the route in the app-routing and manage.module.

I think the easiest way to explain my issue is showing all the code:

app-component.html

<ion-app>
    <ion-split-pane>
        <ion-menu contentId="primary">
            <ion-header>
                <ion-toolbar color="primary">
                    <ion-title>Menú</ion-title>
                </ion-toolbar>
            </ion-header>

            <ion-content>
                <ion-list>
                    <ion-menu-toggle auto-hide="false" *ngFor="let p of pages">
                        <app-menu-item [page]="p"></app-menu-item>
                    </ion-menu-toggle>
                </ion-list>
            </ion-content>

            <ion-footer>
                <ion-toolbar color="primary">
                    <ion-title>Salir</ion-title>
                </ion-toolbar>
            </ion-footer>
        </ion-menu>
        <ion-router-outlet id="primary" main></ion-router-outlet>
    </ion-split-pane>
</ion-app>

manage.page.html

<app-header-manage></app-header-manage>

<ion-content>
    <ion-router-outlet name="manage"></ion-router-outlet>
</ion-content>

header-manage.component.html

<app-header [title]="title"></app-header>

<ion-toolbar>
    <div class="tabSliderHeader">
        <div class="tabSliderWrapper" toggleScroll="hideScroll">
            <div [routerLink]="['companies/list']" class="headerTabSelected">Clientes</div>
            <div class="headerTab">Proveedores</div>
            <div class="headerTab">Agentes</div>
            <div class="headerTab">Artículos</div>
            <div class="headerTab">Usuarios</div>
        </div>
    </div>
</ion-toolbar>

app-routing.module.ts

import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AuthGuard } from './guards/auth.guard';

const routes: Routes = [
    { path: '', redirectTo: 'dashboard', pathMatch: 'full' },
    { path: 'dashboard', loadChildren: './pages/dashboard/dashboard.module#DashboardPageModule', outlet: 'primary' },
    { path: 'login', loadChildren: './pages/login/login.module#LoginPageModule' },
    { path: 'manage', loadChildren: './pages/manage/manage.module#ManagePageModule', outlet: 'primary' },
    { path: 'tools', loadChildren: './pages/tools/tools.module#ToolsPageModule' },
    { path: 'accounting', loadChildren: './pages/accounting/accounting.module#AccountingPageModule' },
    { path: 'contracts', loadChildren: './pages/contracts/contracts.module#ContractsPageModule' }
];

@NgModule({
    imports: [RouterModule.forRoot(routes)],
    exports: [RouterModule]
})
export class AppRoutingModule { }

manage.module.ts

import { HeaderManageComponent } from './../../components/header-manage/header-manage.component';
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';

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

import { ManagePage } from './manage.page';
import { SharedModule } from '../../components/shared.module';

const routes: Routes = [
  {
    path: '',
    component: ManagePage
  },
  {
    path: 'manage/companies/list', loadChildren: './pages/companies/list/list.module#ListPageModule', outlet: 'manage'
  }
];

@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    IonicModule,
    RouterModule.forChild(routes),
    SharedModule
  ],
  declarations: [ManagePage, HeaderManageComponent]
})
export class ManagePageModule {}

Posts: 1

Participants: 1

Read full topic

Ionic 4 tab select with button push

$
0
0

@BrentAshWilliams wrote:

Hello,

I have a page with tabs. I have a button on the first tab that when pushed I would like to route/select another tab.

The high level html has the following:

<ion-tabs #my_profile_tabs>
    <ion-tab-bar slot="bottom" color="dark" >
        <ion-tab-button tab="tab1">
            <ion-label>Tab 1</ion-label>
        </ion-tab-button>
        <ion-tab-button tab="tab2">
            <ion-label>Tab 2</ion-label>
        </ion-tab-button>
        <ion-tab-button tab="tab3">
            <ion-label>Tab 3</ion-label>
        </ion-tab-button>
        <ion-tab-button tab="tab4">
            <ion-label>Tab 4</ion-label>
        </ion-tab-button>
    </ion-tab-bar>
</ion-tabs>

In tab 1’s component I have the following:

@ViewChild(‘my_profile_tabs’) tabRef: IonTabs;

On a button click event on the tab 1 I try the following:

this.tabRef.select('tab4');

When the click event occurs tabRef is undefined:

ERROR TypeError: Cannot read property 'select' of undefined

Any thoughts on what I am doing wrong?

Posts: 1

Participants: 1

Read full topic

File variables.scss not working when i run code in android device

$
0
0

@abdelhamidts wrote:

hello everyone
i have a problem with variables when i build and run app in my device android

this code work when i use ‘ionic serve’ in browser and the ion-content background take this color
(–ion-color-primary: #3880ff)
but when i run this code in android this color not work and ion-content stay transparent also
ion-botton not get primary color by default is also stay without color

example code
Capture
when i use ionic serve
Capture

and when i use ionic cordova run android

ionic -v : 5.2.1
cordova -v : 9.0.0 (cordova-lib@9.0.1)
Angular CLI: 7.3.9
Node: 10.16.0
OS: win32 x64
Angular: 7.2.15

Posts: 1

Participants: 1

Read full topic

Execution failed for task ':processDebugResources' when build in android

$
0
0

@WolframTheta wrote:

Hi,

I have a problem when I was attempting to do:

ionic cordova build android

Error:

BUILD FAILED

Total time: 1.405 secs
Error: /Users/upcnet/Develop/ionic/appToYouV4/platforms/android/gradlew: Command failed with exit code 1 Error output:
/Users/upcnet/Develop/ionic/appToYouV4/platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml:40: AAPT: No resource identifier found for attribute 'appComponentFactory' in package 'android'
    
/Users/upcnet/Develop/ionic/appToYouV4/platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml:40: error: No resource identifier found for attribute 'appComponentFactory' in package 'android'



FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

As a configuration I have:

Ionic:

   Ionic CLI          : 5.2.1 (/Users/upcnet/.nvm/versions/node/v10.16.0/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.5.2
   @ionic/app-scripts : 1.3.12

Cordova:

   Cordova CLI       : 6.5.0
   Cordova Platforms : android 6.4.0
   Cordova Plugins   : no whitelisted plugins (11 plugins total)

Utility:

   cordova-res : 0.5.2 
   native-run  : 0.2.6 (update available: 0.2.7)

System:

   Android SDK Tools : 26.1.1 (/Users/upcnet/Library/Android/sdk/)
   ios-deploy        : 1.9.4
   NodeJS            : v10.16.0 (/Users/upcnet/.nvm/versions/node/v10.16.0/bin/node)
   npm               : 6.9.2
   OS                : macOS Mojave
   Xcode             : Xcode 10.2.1 Build version 10E1001

And the plugins I’ve installed:

> cordova plugin ls
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-console 1.1.0 "Console"
cordova-plugin-device 1.1.7 "Device"
cordova-plugin-firebase 2.0.5 "Google Firebase Plugin"
cordova-plugin-inappbrowser 1.7.2 "InAppBrowser"
cordova-plugin-splashscreen 4.1.0 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova-plugin-wkwebview-engine 1.1.4 "Cordova WKWebView Engine"
cordova-plugin-x-socialsharing 5.4.7 "SocialSharing"
es6-promise-plugin 4.2.2 "Promise"
ionic-plugin-keyboard 2.2.1 "Keyboard"

So… is it impossible for me to solve this problem. So anyone could help me?

Posts: 1

Participants: 1

Read full topic


Get error while trying to build the app using cmd "ionic cordova build android"

$
0
0

@Gokulsrivamsi wrote:

cordova.cmd build android
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=C:\Users\COLOUR~1\AppData\Local\Android\Sdk (DEPRECATED)
Subproject Path: CordovaLib
Subproject Path: app
Exception in thread “main” java.lang.NullPointerException
at org.gradle.wrapper.BootstrapMainStarter.findLauncherJar(BootstrapMainStarter.java:38)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:26)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:108)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:62)
F:\ionic projects\live Projects\switch_sky_app\platforms\android\gradlew: Command failed with exit code 1 Error output:
Exception in thread “main” java.lang.NullPointerException
at org.gradle.wrapper.BootstrapMainStarter.findLauncherJar(BootstrapMainStarter.java:38)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:26)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:108)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:62)
[ERROR] An error occurred while running subprocess cordova.

    cordova.cmd build android exited with exit code 1.

    Re-running this command with the --verbose flag may provide more information.

Posts: 1

Participants: 1

Read full topic

Build/main.js in PWA has all the source code! How to protect my PWA?

$
0
0

@awasl wrote:

Ionic 3 PWA: when I visit my pwa website (https://*****.com/pwa/build/main.js), I can see all the source code! how can I protect this file and make my PWA secure?
Please help.

Posts: 2

Participants: 1

Read full topic

Ionic 3 tabs active

$
0
0

@satya525 wrote:

i have 5 tabs in my ionic 3 app and they are working as expected with in the app.

Now i’m implementing FCM push notifications and i’m trying to redirect the user from the notification to specific screen using below code

this.fcm.onNotification().subscribe(data => {
        if(data.wasTapped){
          if(window.localStorage.getItem("rememberMe") == "true"){
            this.rootPage = TabsPage;
            if(data.location == "Page2"){

              this.app.getRootNav().getActiveChildNav().select(0);
              this.eve.publish('user:created', 0);
              setTimeout(() => {
                this.app.getActiveNav().push(Page2,{'storyData':data,'imgpath':'pathtoimage'});
              }, 100);

            } else if(data.location == "Page1"){
              this.app.getRootNav().getActiveChildNav().select(0);
              this.eve.publish('user:created', 0);
            } else if(data.location == "Page3") {
              this.app.getRootNav().getActiveChildNav().select(3);
              this.eve.publish('user:created', 3);
            }
          }
          console.log("Received in background");
        } else {
          console.log("Received in foreground");
        };
      });

this is working fine when the app is killed or not in background mode and i’m able to redirect the user to desired pages along with appropriate tabs are being active.

But when the app is in background mode pages are again loading perfectly but the active tab is not getting selected instead its showing previously selected tab.

tabs.html

<ion-tabs selectedIndex={{dat}} (ionChange)="tada($event)">
  <ion-tab style="font-family:segoeprb" [root]="tab1Root" tabTitle="tab1" tabIcon="icon"></ion-tab>
  <ion-tab [show]="guest" [root]="tab2Root" tabTitle="tab2" tabIcon="icon"></ion-tab>
  <ion-tab [show]="guest" [root]="tab3Root" tabTitle="tab3" tabIcon="icon"></ion-tab>
  <ion-tab [root]="tab4Root" tabTitle="tab4" tabIcon="icon"></ion-tab>
  <ion-tab [show]="guest" [root]="tab5Root" tabTitle="tab5" tabIcon="icon"></ion-tab>
</ion-tabs>

here i’m using selectedIndex appended to dat and i’m updating it using events which is pushed from app.component as you can see.

tabs.ts

eve.subscribe('user:created', (data) => {
       this.dat = data;
       console.log(this.dat);
    });

here i can see the passed index value of tab, but its not updating when the app is in background mode.

Posts: 1

Participants: 1

Read full topic

Text area for terms and conditions

$
0
0

@ioclaudio wrote:

Hi,
I’ve seen that in some sites you have to scroll all the “terms and conditions” in a text area before that it is considered as “read”.
Is it possible to implement something similar on Ionic4?

Do you know if there is a component or some tricks to do it?

Thank you for your advice.

Claudio

Posts: 1

Participants: 1

Read full topic

ERROR: Undefined is not a function (near '.addEventListener...')

$
0
0

@hillad wrote:

I have a page in which two ion-items act as a place to drop files. Unfortunately, they cannot be given the addEventListener function. The items were brought into the page.ts using @ViewChild and a console.log() confirms that I am getting an ion-item element. Also - I am using ngAfterViewInit so I am sure that the HTML is loaded before I call the element, that seems to be the usual cause of this error message.

<ion-row>
        <ion-col>
          <ion-item #dropper1 class="drop">
            <ion-label>Add FASTQ File Here</ion-label>
          </ion-item>
        </ion-col>
        <ion-col>
          <ion-item #dropper2 class="drop">
            <ion-label>Add FASTQ File Here</ion-label>
          </ion-item>
        </ion-col>
  </ion-row>
export class NewProjectPage implements AfterViewInit{
  @ViewChild('dropper1') fileDrop1;
  @ViewChild('dropper2') fileDrop2;
ngAfterViewInit() {
    this.fileDrop1.addEventListener('drop', (e) => {
      e.preventDefault();
      e.stopPropagation();
      for (let f of e.dataTransfer.files) {
        console.log('You dragged in: ', f);
      }
      console.log(e.dataTransfer.files);
    });
}

Posts: 1

Participants: 1

Read full topic

Ionic 4 - remove shadow box from ion-searchbar

$
0
0

@Kyrax80 wrote:

I am trying to remove the box-shadow from the searchbar through css but it’s not working like this:

.searchbar-input {
  box-shadow: none !important;
}

but it doesn’t work.

However if I edit it directly by inspecting the website it works as expected:

Any idea on how to do this?

Thanks.

Posts: 1

Participants: 1

Read full topic

Can ionic framework read java jsp?

$
0
0

@kismog wrote:

Hi all,
im new to the forum and with ionic framework.

I would like to know if an android app written in ionic framework can read the jsp that are returned by a java servlet via an ajax call.

My app needs to show small portions of jsp,can an apk from ionic framework do this?

If it is not possible can I make REST calls and show the data returned on my app?

Thank you very much

Posts: 1

Participants: 1

Read full topic


Loginform not working until the page is being reloaded

$
0
0

@christopherkock wrote:

I am having a problem with my loginform. Either the submit button gets disabled saying the form is invalid even though it isn’t. What also happens occasionaly is that the button works but im getting error saying the form is invalid in the console and when im trying to console.log the inputs, they are showing null.

From what I can tell, this problem might have started after I implemented an authguard where I redirect the user to loginscreen if they arent logged in. When I put the loginpage as the “starterpage” this problem does not occur. I also tried initializing the form in ngoninit without any success.

The wierd thing is if I go to the registerpage and then back 2 times, the form starts working (it also starts working if I reload the page).

HTML file:

          <form [formGroup]="loginForm">
          <ion-grid class="loginBox">
      <ion-row>
        <ion-col>
          <ion-input formControlName="email" type="email" placeholder="Email"></ion-input>
        </ion-col>
      </ion-row>
      <ion-row class="loginBoxPassword">
        <ion-col>
          <ion-input formControlName="password" type="password" placeholder="Password"></ion-input>
        </ion-col>
      </ion-row>
      <ion-row class="loginLabelRow">
        <ion-col class="loginBoxLabelLeft">
          <ion-label (click)="toSignup()" routerDirection="forward">Sign up</ion-label>
        </ion-col>
        <ion-col class="loginBoxLabelRight">
          <ion-label (click)="toForgotPassword()">Forgot password?</ion-label>
        </ion-col>
      </ion-row>
      <ion-row>
        <ion-col>
          <ion-button (click)="loginUser(loginForm)" expand="full" [disabled]="loginForm.invalid">Sign in</ion-button>
        </ion-col>
      </ion-row>

    </ion-grid>

  </form>

TS file:

import { Component, OnInit } from '@angular/core';
import {FormGroup, FormBuilder, Validators, ReactiveFormsModule, FormControl} from '@angular/forms'
import {LoadingController, AlertController} from '@ionic/angular';
import {AuthService} from '../../services/user/auth.service';
import {Router} from '@angular/router';

     export class LoginPage implements OnInit {

  public loginForm: FormGroup;
  public loading: HTMLIonLoadingElement;

    constructor(
    private formBuilder: FormBuilder, 
    public loadingController: LoadingController, 
    private router: Router, 
    public authService: AuthService, 
    public alertController: AlertController
) {

    this.loginForm = this.formBuilder.group({
      email: ['', Validators.compose([Validators.required, Validators.email])],
      password: ['', Validators.compose([Validators.required, Validators.minLength(3)])],
    });
  }

  ngOnInit() {
  }

  toSignup(){
    this.router.navigateByUrl('signup');
  }

  toForgotPassword(){
    this.router.navigateByUrl('forgotpassword');
  }


  async loginUser(loginForm: FormGroup): Promise<void>{
    console.log(’test’, loginForm.value.email, loginForm.value.password);
    if (!loginForm.valid) {
      console.log('not valid')
    }else {
      this.loading = await this.loadingController.create({
        spinner: 'crescent',
      });
      await this.loading.present();
      const email = loginForm.value.email;
      const password = loginForm.value.password;

      this.authService.loginUser(email, password).then( () => {
        this.loading.dismiss().then(() => {
          this.router.navigateByUrl('home');
        });
      },
        error => {
          this.loading.dismiss().then(async () => {
            console.log('Wrong email or password!');
          });
        }
      );
    };
  }


}

Thank you in advance for any help solving this problem. I have googled around alot without finding anyone with a similar problem.

Posts: 1

Participants: 1

Read full topic

Certain HTML DOM Events don't fire

$
0
0

@hillad wrote:

I have a file drop location that I want to enable drag and drop capabilities on, but I cannot for the life of me get it to fire when using the ‘drop’ event. If I change the event to ‘click’ however, I can get an output from the callback.
This is the relevant TS code:

ngAfterViewInit() {
    this.elRef.nativeElement.querySelector('.drop').addEventListener('drop', (event) => {
      event.preventDefault();
      console.log('click');
    });
  }

Here is the HTML element:

<ion-item class="drop">
</ion-item>

Posts: 1

Participants: 1

Read full topic

Can build Ionic 4 mobile with no webpack?

$
0
0

@hamnya wrote:

I’m trying not to using Ionic no Webpack in mobile iOS, Android.

I want to be www folder is same to originally resource.(resource means index.html, index.js, index.css …)

1.ionic build iOS
2.webpack create like this.

chunk { 0 } 0.js, 0.js.map () 16.4 kB [rendered]
chunk { 1 } 1.js, 1.js.map () 12.9 kB [rendered]
chunk { 2 } 2.js, 2.js.map () 17.3 kB [rendered]

3. is it possible 0.js.map is index.html …like other related name?

OR

if I should be use with webpack,
can I change the name like 0.js.map, 1.js.map…?

I was trying to use Webpack-manifest-plugin.
but the result is same mapping like

{
“1.js” : “1.map.js”

}

Please help.

Posts: 1

Participants: 1

Read full topic

Failed to deploy Ionic 4 apps to apk

Ionic build freezes -- how do I tell why?

$
0
0

@jesposito wrote:

Hi all,

I’m new to ionic development, and I’ve inherited an ionic 3 app that I’m supposed to work on.

I’m trying to build the app and here is what I’m seeing:

F:\PROJECTS\GT\jeffWorking\mobile-master>ionic build
Running app-scripts build:
[19:30:54] build dev started …
[19:30:54] clean started …
[19:30:54] clean finished in 20 ms
[19:30:54] copy started …
[19:30:57] deeplinks started …
[19:30:57] deeplinks finished in 140 ms
[19:30:57] transpile started …
[19:31:07] transpile finished in 10.62 s
[19:31:07] preprocess started …
[19:31:07] preprocess finished in 4 ms
[19:31:07] webpack started …
[19:31:08] copy finished in 13.43 s
[19:31:14] webpack finished in 6.18 s
[19:31:14] sass started …
Without from option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to undefined to prevent this warning.
[19:31:15] autoprefixer: :24266:3: Replace fill-available to stretch, because spec had been changed
[19:31:15] autoprefixer: :24272:3: Replace fill-available to stretch, because spec had been changed
[19:31:15] autoprefixer: :24277:3: Replace fill-available to stretch, because spec had been changed
[19:31:15] sass finished in 1.80 s
[19:31:15] postprocess started …
[19:31:15] postprocess finished in 17 ms
[19:31:15] lint started …
[19:31:15] build dev finished in 21.29 s
ionic cordova prepare --no-build
cordova prepare
Android Studio project detected

And it hangs there forever…

Is there some way to tell what it’s hanging on, such as a build log or something?

Posts: 1

Participants: 1

Read full topic

Viewing all 70435 articles
Browse latest View live


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