Quantcast
Channel: Ionic Forum - Latest posts
Viewing all 231638 articles
Browse latest View live

Appflow ignores strings from config.xml (Bluetooth Usage Description)

$
0
0

I tried support before using this forum, but the response was that my query is out of their reach and suggesting to upgrade to a higher plan or use this forum.

Although we understand your frustration this is outside of the level of support we can provide […] The level of support this requires is available through one of our Enterprise Support plans, which include consultation and advisory services. […] I recommend checking out the following resources: The Ionic Forum (extremely active Q&A forum, this is a great place to ask questions!)…


Appflow ignores strings from config.xml (Bluetooth Usage Description)

$
0
0

I think the problem is that Appflow has updated Xcode 11 and now Appflow is not working properly.

Attached screenshot comparing the 2 plist files created by Appflow for the same commit. You will see that one was created with the Xcode version 11A420a (2 days ago) and the other with the Xcode version 11E608c (1 day ago).

The new version of Xcode 11E608c as you can see ignores bluetooth usage description strings, therefore Apple rejects ipa.

If I choose to build with Xcode 10 on Appflow then the problem goes away, but Xcode 10 uses SDK 12.2 which is deprecated, Apple will only accept apps compiled with SDK 13.

Any ideas how I can build with a working version of Xcode 11 or some workaround?

Thank you

The number of method references in a .dex file cannot exceed 64K

$
0
0

Me salvaste la vida pase 1 día detenido por este error y eso lo soluciono, gracias

base64Data does not exist on type 'CameraPhoto'

$
0
0

how did you solve it while displaying image in dom and also uploading to server? Please share your code I need help

How redirect back to my ionic App from external service

$
0
0

.Good day everyone one. Please I need your help. I am implementing a payment gateway in my app and when the pay_Now button is clicked it redirects users to the payment gateway site to fill in their debit card credentials but the issue I am currently having is how to redirect users back to my app after successful or failed transaction. Also, what will be my ionic callback URL. Here is my code below. Thanks


     completePurchase(){
            this.loadingCtrl.create({
              message:"Order Processing...",
              showBackdrop: true
              }).then((overlay)=>{
                this.loading = overlay;
                this.loading.present();
                let currentCustomerId = localStorage.getItem('currentUserId');
                 if(this.paymentGatwayId ==="tbz_rave"){
                  this.rave.init(false, "PUBLIC_KEY") //true = production, false = test
                  .then(_ => {
                    var paymentObject = this.ravePayment.create({
                      customer_email: this.user.email,
                      amount: this.totalPrice,
                      customer_phone: this.user.billing_phone,
                      currency: "NGN",
                      txref: "rave-123456",
                      meta: [{
                          metaname: "flightID",
                          metavalue: "AP1234"
                      }]
                  })
                    this.rave.preRender(paymentObject)
                      .then(secure_link => {
                        secure_link = secure_link +" ";
                        const browser: InAppBrowserObject = this.rave.render(secure_link, this.iab);
                        browser.on("loadstop")
                            .subscribe((event: InAppBrowserEvent) => {
                              if(event.url.indexOf('https://your-callback-url') != -1) {
                                if(this.rave.paymentStatus('url') == 'failed') {
                                  console.log("failed Message");
                                }else {
                                  console.log("Transaction Succesful");
         
                                  // Place order after payment successfully
         
                                let orderObj = {};
                                orderObj['payment_method'] = this.paymentGatwayId; 
                                orderObj['payment_method_title'] = this.paymentGatewayTitle;
                                orderObj['customer_id'] = currentCustomerId;
                                this.platform.ready().then(()=>{
                                this.address = {
                                  first_name: this.user.first_name,
                                  last_name: this.user.last_name,
                                  address_1: this.user.billing.address_1,
                                  city: this.user.billing.city,
                                  address_2: this.user.billing.address_2,
                                  phone: this.user.billing.phone,
                                  }
                                  orderObj['billing'] = this.address;
                                  orderObj['line_items'] = this.baseProducts;
                                  this.WC.placeOrder(orderObj).then((respData) => {
                                  this.storage.clear();
                                  this.storage.set('currentOrderData', respData);
                                  console.log(orderObj);
                                  //navigate after successful placing of other
                                  this.route.navigate(['/menu/order'])
         
                                  }).catch((error) => {
                                    console.log('Problem with placing order', error);
                                  });
                                });
              
                                }
                                browser.close()
                              }
                            })
                      }).catch(error => {
                        // Error or invalid paymentObject passed in
                        console.log ("error", error);
                      })
                  });
                  }

Ion Slides in Super tabs Ionic 4

$
0
0

Hey Guys,

I am facing problem with the Ion-Slides in Supertabs…

When I try to slide the ion-slide manually , the supertabs slides and switched to next tabs…

Here is my code structure.

Home Categories offers orders
<super-tabs-container>
	<super-tab>
		<ion-content>
			<ion-slides>
				<ion-slide *ngFor="let middle of middleBanner">
					<div class="slider-img">
						<img src="{{this.image_url_bs_banner+middle.banner_name}}">
					</div>
				</ion-slide>
			</ion-slides>
		</ion-content>
	</super-tab>
	
	<super-tab>
		<ion-nav [root]="category"></ion-nav>
	</super-tab>
	<super-tab>
		<ion-nav [root]="offers"></ion-nav>
	</super-tab>
	<super-tab>
		<ion-nav [root]="orders"></ion-nav>
	</super-tab>

</super-tabs-container>

Please help me out…

Ionic 5 Native Barcode Scanner - Unable to Import

$
0
0

Hi hoping to get some help on this. I am trying to import Ionic’s native Barcode Scanner into my Ionic 5, Angular 9 app. I have capacitor installed and used the following method to install the barcode scanner:

npm install phonegap-plugin-barcodescanner
npm install @ionic-native/barcode-scanner
ionic cap sync

I then setup the barcode scanner in a component as follows:

import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx';

constructor(private barcodeScanner: BarcodeScanner) { }

this.barcodeScanner.scan().then(barcodeData => {
 console.log('Barcode data', barcodeData);
}).catch(err => {
    console.log('Error', err);
});

This threw a null injector error. Seeing the forums it looked like you have to import the barcodescanner in app modules as a provider. I did this as follows in app.modules.ts:

import {BarcodeScanner} from '@ionic-native/barcode-scanner';
.....
providers: [
    BarcodeScanner,
    StatusBar,
    SplashScreen,
    FileTransfer, FileTransferObject,
    File,
    InAppBrowser,
    Keyboard,
    { provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
    UpdateService,
    {
      provide: HTTP_INTERCEPTORS,
      useClass: HttpInterceptorService,
      multi: true,
    }
  ],
  bootstrap: [AppComponent]

The issue is I now get the following error:
Invalid provider for the NgModule ‘AppModule’ - only instances of Provider and Type are allowed

Any one else come across this issue before and the solution? I haven’t installed cordova just capacitor which I understand is all I need, is this correct?

Appreciate any help on this as I am at a dead end. Below ionic info + version of barcde scanner installed. Many thanks in advance.

@ionic-native/barcode-scanner": "^5.26.0",
@ionic-native/core": "^5.26.0
Ionic:

   Ionic CLI                     : 5.4.15 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 5.1.1
   @angular-devkit/build-angular : 0.901.7
   @angular-devkit/schematics    : 9.1.7
   @angular/cli                  : 9.1.7
   @ionic/angular-toolkit        : 2.2.0

Capacitor:

   Capacitor CLI   : 2.1.2
   @capacitor/core : 2.1.2

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : none
   Cordova Plugins   : no whitelisted plugins (0 plugins total)

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   NodeJS : v12.14.1 (/usr/local/bin/node)
   npm    : 6.13.4
   OS     : macOS Catalina
   Xcode  : Xcode 11.5 Build version 11E608c

Can't write on a ion-searchbar when a modal is opened

$
0
0

Hello!

I’m experiencing problems with my Windows 10 app, Whenever I open a modal, I can’t click on my ion-searchbar (which is on the header of the parent window). I have removed the modal backdrop already and I can click other buttons, but I can’t write on the searchbar.

Any idea? Thanks!


Ionic native datepicker does not show dates

$
0
0

If some does not know what I mean, two screenshots of a datepicker with valid dates between 6th of June and 12th of June (including). The valid dates are not shown. I found out, that building with target Xcode10, everything is ok, but Xcode11 causes this behaviour. Is this a bug?


Pages transition animations

$
0
0

ionic 3
I’m not sure if you solved it or not.
you can change pageTransition animation by adding the following code to app.module.ts

IonicModule.forRoot(MyApp, {
  mode: 'ios',
  pageTransition: 'md-transition',
})

you can get more configuration options here

Facebook Audience Network Plugin or SDK integration in Ionic 4

$
0
0

I am unable to find Facebook Audience Network Plugin for Ionic 4 and ionic 5. There are Old onces for Ionic 2 and those examples don’t work in latest version

Can we Add Android Audience Network SDK 5.9.0 SDK in my Ionic Project.
Is there a way to add external SDK in your ionic Project

Thanks in advance

Facebook ads ionic 3 or Ionic 4

$
0
0

Is there still no way for Facebook ads for Ionic 4 or ionic 5

How not to save an app on a web browser cache

$
0
0

Hi everyone,

I have a PWA hosted on firebase. Everything is good. I have a little issue: whenever I update the code. It doesn’t update on my users’ devices when they get in. The whole code gets stored on cache and they are not up to date with the version. They have to manually click on the link and hit enter - on Chrome - to refresh the cache. On Safari, I have to refresh the page like four times for it to refresh it.

Is there anything I can do so I can trigger an update on everyone’s phone?

Admob Free plugin and Firebase Analytics google service dependency cinflict

$
0
0

I was facing the same issue while tring to make firebase-analytics work with cordova-admob-free and tried many things.

  1. As mentioned by @AlexBa “PLAY_SERVICES_VERSION” to “17.0.0” inside “\plugins\cordova-admob-sdk\plugin.xml” fixed my build isuue but then firebase was not picking up events and screenview.

What Finally solved my issue was following the above plus adding the below in config.xml

Exact Steps Followed:

  1. Remove platform android

  2. remove admob-free plugin and firebase-analytics plugin

  3. insttall firebase-analytics plugin and add it to top-level

  4. add platform android

  5. add admob-free plugin and change “PLAY_SERVICES_VERSION” to “17.0.0” inside “\plugins\cordova-admob-sdk\plugin.xml” and “PLAY_SERVICES_VERSION” to “17.0.0” \plugin\android.json for both cordova-admob-sdk and cordova-admobd-free

  6. addd the below line in config.xml


  7. Build

For some reason i was not able to do this by adding abmob-plugin before adding android platform. I hope this helps.

Ionic 5 auto complete

$
0
0

It looks like an error is thrown from SynccrmcontactPage.html. Make sure you import the IonicSelectableModule into the module for that page.


Ionic 5 auto complete

$
0
0

Hi,

Thanks for your reply. will check and let you know.

Regards,
Ramji

Ionic capacitor live reload not working on android

$
0
0

I am using the following command to perform live reloading on android

ionic capacitor run android --livereload --external

But it is not working.

Here is the error I am getting

The web page at http://localhost:8100/ could not be loaded because

net : ERR_CONNECTION_REFUSED

I know that mobile devices don’t understand localhost but I thought --external flag will take care of it. Now what I have to do to get live reloading working on android.

Thank you in advance

Ionic 5 cordova build prod generate CUSTOM_ELEMENTS_SCHEMA error

$
0
0

Hi all,

When trying to build a release of my Ionic 5 project i’m getting CUSTOM_ELEMENTS_SCHEMA error.
All Ionic components and my custom components not recognized

Command use : ionic cordova build android --prod --release

Error description :

ERROR in src/app/pages/traduction/traduction.page.html:1:1 - error NG8001: 'app-header' is not a known element:
1. If 'app-header' is an Angular component, then verify that it is part of this module.
2. If 'app-header' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

1 <app-header></app-header>
  ~~~~~~~~~~~~~~~~~~~~~~~~~

  src/app/pages/traduction/traduction.page.ts:22:18
    22     templateUrl: "./traduction.page.html",
                        ~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component TraductionPage.
src/app/pages/traduction/traduction.page.html:3:1 - error NG8001: 'ion-content' is not a known element:
1. If 'ion-content' is an Angular component, then verify that it is part of this module.
2. If 'ion-content' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

3 <ion-content>
  ~~~~~~~~~~~~~

  src/app/pages/traduction/traduction.page.ts:22:18
    22     templateUrl: "./traduction.page.html",
                        ~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component TraductionPage.
src/app/pages/traduction/traduction.page.html:4:5 - error NG8001: 'ion-refresher' is not a known element:
1. If 'ion-refresher' is an Angular component, then verify that it is part of this module.
2. If 'ion-refresher' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

app-header(header.component) by example is a custom component declare and exported in Shared module(shared.module) and finally used in page called Traduction(traduction.page)

shared.module.ts

import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from "@angular/core";
import { CommonModule } from "@angular/common";
import { DisplayValidationErrorMessageComponent } from "./components/display-validation-error-message/display-validation-error-message.component";
import { IonicModule } from "@ionic/angular";
import { HideHeaderDirective } from "./directives/hide-header-directive.directive";
import { HeaderComponent } from "./components/header/header.component";
import { TextBoxComponent } from "./components/text-box/text-box.component";
import { TraductionTextBoxActionsComponent } from "./components/traduction-text-box-actions/traduction-text-box-actions.component";
import { RootComponent } from "./components/root/root.component";

@NgModule({
    declarations: [
        DisplayValidationErrorMessageComponent,
        HideHeaderDirective,
        HeaderComponent,
        TextBoxComponent,
        TraductionTextBoxActionsComponent,
        RootComponent,
    ],
    imports: [CommonModule, IonicModule],
    exports: [
        DisplayValidationErrorMessageComponent,
        HideHeaderDirective,
        HeaderComponent,
        TextBoxComponent,
        TraductionTextBoxActionsComponent,
        RootComponent,
    ],
    schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class SharedModule {}

Please Notice CUSTOM_ELEMENTS_SCHEMA added in SharedModule.

header.component.ts is part of shared module

@Component({
    selector: "app-header",
    templateUrl: "./header.component.html",
    styleUrls: ["./header.component.scss"],
})
export class HeaderComponent implements OnInit {
    userInitials: string;
    constructor(private storageService: StorageService) {}
    ngOnInit() {
        if (this.storageService.isAuthorized) {
            const userData = this.storageService.userData;
            this.userInitials = userData.first_name[0].concat(
                userData.last_name[0]
            );
        }
    }
}

Header component(app-header) is then used in TraductionPage
traduction.page.html

<app-header></app-header>
<ion-content>
    <ion-refresher slot="fixed" (ionRefresh)="doRefresh($event)">
        <ion-refresher-content> </ion-refresher-content>
    </ion-refresher>
</ion-content>

I’m importing SharedModule in TraductionPage module
traduction.module.ts

import { NgModule } from "@angular/core";
import { CommonModule } from "@angular/common";
import { FormsModule } from "@angular/forms";
import { IonicModule } from "@ionic/angular";
import { TraductionPageRoutingModule } from "./traduction-routing.module";
import { SharedModule } from "../../shared/shared.module";
import { Media } from "@ionic-native/media/ngx";
import { File } from "@ionic-native/file/ngx";
import { AndroidPermissions } from "@ionic-native/android-permissions/ngx";
import { TraductionPage } from "./traduction.page";

@NgModule({
    imports: [
        CommonModule,
        FormsModule,
        SharedModule,
        IonicModule,
        TraductionPageRoutingModule,
    ],
    declarations: [TraductionPage],
    providers: [Media, File, AndroidPermissions],
})
export class TraductionPageModule {}

Below is my ionic info output

Ionic:

   Ionic CLI                     : 5.4.16 (C:\Users\Folabi\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 5.0.7
   @angular-devkit/build-angular : 0.901.7
   @angular-devkit/schematics    : 9.1.7
   @angular/cli                  : 9.1.7
   @ionic/angular-toolkit        : 2.2.0

Cordova:

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

Utility:

   cordova-res (update available: 0.14.0) : 0.9.0
   native-run (update available: 1.0.0)   : 0.2.9

System:

   Android SDK Tools : 26.1.1 (C:\Users\Folabi\AppData\Local\Android\Sdk)
   NodeJS            : v12.17.0 (C:\Program Files\nodejs\node.exe)
   npm               : 6.14.4
   OS                : Windows 10

Not sure where is the problem since I’m importing SharedModule in TraductionPageModule and also add CUSTOM_ELEMENTS_SCHEMA to SharedModule.

What am I doing wrong guys ?

Thanks in advance for your help.

How to get Facebook user data post login

$
0
0

to complete the GOOD answer of @nezir you can add “last_name” in “id,name,email,first_name,picture.width(720).height(720).as(picture_large)” and like that you could get the first and the last without effort !

Ionic event not triggered when app goes in background (plattform pause)

Viewing all 231638 articles
Browse latest View live


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