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

Unable to execute ionic start for Vue beta

$
0
0

I am trying to dive into using Vue with Ionic and I have run

$ npm i -g @ionic/cli@testing #6.11.8-testing.0

and

$ ionic start test-project blank --type vue --tag vue-beta

but it throws the following error:

[ERROR] vue is not a valid project type.
        
        Please choose a different --type. Use ionic start --list to list all
        available starter templates.

i could not find any existing issues on github, just wondering if anyone else is facing this problem or not
any insights on this?

3 posts - 2 participants

Read full topic


Share function to button and onclick event

$
0
0

Hello.

I am wanting to make a generic button in which I pass certain properties as a parameter. one of those properties is the function that must be executed at the time of clicking event

function Boton(props: { name: React.ReactNode , funcion: React.ReactNode }) {
  return (<div className="center-div"><IonButton shape="round" onClick={props.funcion}> {props.name}</IonButton></div>);
}

I get:

(JSX attribute) onClick?: ((event: React.MouseEvent<HTMLIonButtonElement, MouseEvent>) => void) | undefined
Type ‘ReactNode’ is not assignable to type ‘((event: MouseEvent<HTMLIonButtonElement, MouseEvent>) => void) | undefined’.
Type ‘null’ is not assignable to type ‘((event: MouseEvent<HTMLIonButtonElement, MouseEvent>) => void) | undefined’.ts(2322)
index.d.ts(1455, 9): The expected type comes from property ‘onClick’ which is declared here on type 'IntrinsicAttributes & Pick<IonButton, “color” | “strong” | “disabled” | “size” | “fill” | “mode”

But I do not want a Mouse event because it is going to be a mobile app.

1 post - 1 participant

Read full topic

Ng-selected attribute is not working on ion-select

$
0
0

Good Day Everyone!

PROBLEM: Failed to display a selected option from a dynamic ion-select

DESCRIPTION:

I have two ion-select (dropdown), one for the city field and one for the barangay field. The barangay field displays dynamic values based on the selected city. This works properly but when I try to display a selected value, it doesn’t work.

HTML

                  <!-- City -->
                  <ion-item class="form-field">
                    <ion-label stacked>City</ion-label>
                    <ion-select [(ngModel)]="city" (ionChange)="getBarangay('house')">
                      <ion-option value="Caloocan (NORTH) City" ng-selected="city == 'Caloocan (NORTH) City'">Caloocan City</ion-option>
                      <ion-option value="Caloocan (SOUTH) City" ng-selected="city == 'Caloocan (SOUTH) City'">Caloocan City</ion-option>
                      <ion-option value="Las Piñas City" ng-selected="city == 'Las Piñas City'">Las Piñas City</ion-option>
                      <ion-option value="Makati City" ng-selected="city == 'Makati City'">Makati City</ion-option>
                      <ion-option value="Malabon City" ng-selected="city == 'Malabon City'">Malabon City</ion-option>
                      <ion-option value="Mandaluyong City" ng-selected="city == 'Mandaluyong City'">Mandaluyong City</ion-option>
                      <ion-option value="Manila City" ng-selected="city == 'Manila City'">Manila City</ion-option>
                      <ion-option value="Marikina City" ng-selected="city == 'Marikina City'">Marikina City</ion-option>
                      <ion-option value="Muntinlupa City" ng-selected="city == 'Muntinlupa City'">Muntinlupa City</ion-option>
                      <ion-option value="Navotas City" ng-selected="city == 'Navotas City'">Navotas City</ion-option>
                      <ion-option value="Parañaque City" ng-selected="city == 'Parañaque City'">Parañaque City</ion-option>
                      <ion-option value="Pateros City" ng-selected="city == 'Pateros City'">Pateros City</ion-option>
                      <ion-option value="Pasay City" ng-selected="city == 'Pasay City'">Pasay City</ion-option>
                      <ion-option value="Pasig City" ng-selected="city == 'Pasig City'">Pasig City</ion-option>
                      <ion-option value="Quezon City" ng-selected="city == 'Quezon City'">Quezon City</ion-option>
                      <ion-option value="San Juan City" ng-selected="city == 'San Juan City'">San Juan City</ion-option>
                      <ion-option value="Taguig City" ng-selected="city == 'Taguig City'">Taguig City</ion-option>
                      <ion-option value="Valenzuela City" ng-selected="city == 'Valenzuela City'">Valenzuela City</ion-option>
                      <ion-option value="Other" ng-selected="city == 'Other'">Other</ion-option>
                    </ion-select>
                  </ion-item>


                  <!-- Barangay ** IF CITY IS SELECTED -->
                  <ion-item class="form-field" *ngIf="city != 'Other'">
                    <ion-label stacked>Barangay</ion-label>
                    <ion-select  placeholder="Barangay" [(ngModel)]="barangayId" [disabled]="!barangayList" (ionChange)="setBarangay('house')">
                      <ng-container *ngFor="let bl of barangayList let i = index">
                        <ion-option ng-selected="barangay == barangayList[i].name" value="{{i}}">{{barangayList[i].name}}</ion-option>
                      </ng-container>
                    </ion-select>
                    <ion-label error-field no-margin *ngIf="!isBarangayValid"><ion-icon name="ios-alert"></ion-icon> Please select one.</ion-label>
                  </ion-item>

TYPESCRIPT


  getBarangay(property) {
    var city = property == 'house' ? this.city.replace(' City', '') : this.businessCity.replace(' City', '');
    if (property == 'house') {
      this.barangayList = [];
    } else if (property == 'business') {
      this.businessBarangayList = [];
    }

    if ((property == 'house' &&  this.city != 'Other') || (property == 'business' &&  this.businessCity != 'Other')) { 
      let headers = new Headers ({
        'Accept' : 'application/json'
      });
      let options = new RequestOptions({ headers : headers });

      return new Promise((resolve, reject) => {
        this.http.post(this.apiBaseUrl + city + '/brgy',  options)
        .timeout(10000)
        .toPromise()
        .then((response) =>
        {
          // console.log('Get Barangay List API Response : ', response.json());
          var _response = response.json();
          
          if (property == 'house') {
            for (let element in _response) {  
              this.barangayList.push({  
                name: element.trim(),  
                code: _response[element]
              });
            }
          } else if (property == 'business') {
            for (let element in _response) {  
              this.businessBarangayList.push({  
                name: element,  
                code: _response[element]
              });  
            }
          }
          resolve(response.json());
        })
        .catch((error) =>
        {
          reject(error);
          this.loadingSrvc.hide();
          if (error.name == 'TimeoutError') {
            this.timeOut(property);
          } else {
            this.serverErrorDialog(error);
          }
        });
      });
    }
  }

  setBarangay(property) {
    if (property == 'house') {
      this.barangayCode = this.barangayList[this.barangayId].code;
      this.barangay = this.barangayList[this.barangayId].name;
    } else if (property == 'business') {
      this.businessBarangayCode = this.businessBarangayList[this.businessBarangayId].code;
      this.businessBarangay = this.businessBarangayList[this.businessBarangayId].name;
    }
  }

image
Fig 1. There is no displayed/selected option

image
Fig 2. Displays all the barangay of a selected city

I hope someone can help me with this. Thank you :slight_smile:

3 posts - 2 participants

Read full topic

Unable to open popup

$
0
0

Hello,

I´m developing an mobile application using Ionic and Angular
Ionic:

Ionic Framework : @ionic/angular 5.0.7
@angular-devkit/build-angular : 0.803.26
@angular-devkit/schematics : 8.3.26
@angular/cli : 8.3.26
@ionic/angular-toolkit : 2.2.0

Cordova:

Cordova CLI : 10.0.0
Cordova Platforms : android 8.1.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 7 other plugins)

Utility:

cordova-res (update available: 0.14.0) : 0.10.0
native-run (update available: 1.0.0) : 0.3.0

System:

Android SDK Tools : 26.1.1 (C:\Android\sdk)
NodeJS : v14.2.0 (C:\Program Files\nodejs\node.exe)
npm : 6.14.4
OS : Windows 10

I´m using IBM APPID single page application authentication


Once I deploy the application o my Android mobile, I get an error, saying “unable to open popup”. This popup is a window where the user can type in the credentials.

My question is if I´m able to open a popup, if it´s possible, how can it be done.

I really appreciate any help.

Regards,
Amando

1 post - 1 participant

Read full topic

How to add select all option to ion-select in ionic 5

$
0
0

I tried adding ion-select-option and then tried to handle select all logic in the change event but change event doesn’t fire at all. seems it doesn’t support events

    <ion-item>
        <ion-label>Test</ion-label>
        <ion-select [(ngModel)]="selectedValues" multiple="true">
            <ion-select-option (ionChange)="selectAll()">Select All</ion-select-option>
            <ion-select-option [value]="option" *ngFor="let option of  items">{{option}}
            </ion-select-option>
        </ion-select>
    </ion-item>

sample https://stackblitz.com/edit/ionic-5-angular-10-start-template-hure6j?file=src/app/tabs/tabs.page.html

1 post - 1 participant

Read full topic

Ionic 5 loading problem

$
0
0

Hi everybody. In iOS 14, the scrol does not work after loading popup. You could help solve this problem.

1 post - 1 participant

Read full topic

ERROR in No NgModule metadata found for 'AppModule' Angular 10

$
0
0

I am getting [ng] ERROR while ionic serve in No NgModule metadata found for ‘AppModule’ this error. I searched a lot but not getting exact solution. I will be highly thankful if someone give me any idea or any help. I am sharing IONIC and other environment.

Ionic Framework               : @ionic/angular 5.3.3
@angular-devkit/build-angular : 0.1001.2
@angular-devkit/schematics    : 10.0.8
@angular/cli                  : 10.1.2
@ionic/angular-toolkit        : 2.3.3

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

System:
NodeJS : v12.18.4 (C:\Program Files\nodejs\node.exe)
npm    : 6.14.6
OS     : Windows 10

My app.module.ts file code

import { BrowserModule } from '@angular/platform-browser';
import { RouteReuseStrategy } from '@angular/router';

import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';

import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';

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

Can anyone suggest where i am wrong as i globally installed latest version of IONIC, CORDOVA, NODE of all. I am trying from past 2 days but not succeed. I am attaching screenshot pls find.

Thanks in ADVANCE.

1 post - 1 participant

Read full topic

Ionic downloader doesn't download mp4 file

$
0
0

hello guys i have a problem. i want to download video file with ionic downloader and i have a problem: 1008.

the download codes:

var req: DownloadRequest = {
      uri: url,
      title: this.makename(10) + ".mp4",
      description: element.name,
      mimeType: "video/mp4",
      visibleInDownloadsUi: true,
      notificationVisibility: NotificationVisibility.VisibleNotifyCompleted,
      destinationInExternalFilesDir: {
        dirType: 'Downloads',
        subPath: 'MyFile.apk'
      }
    };

    this.dwn.download(req)
      .then((location: string) => {
        this.toast.presentToast('File downloaded at:' + location)
        this.url2 = location;
        
      })
      .catch((error: any) => {
        alert("err: " + error)   ///right here i got 1008 err
        
      });

but not everytime i got this error. i got this error sometimes. how can i fix this?

1 post - 1 participant

Read full topic


Applow: Malfunction in apk generated

$
0
0

My CI pipeline sent an apk after a push on to a git branch, but generated build didnt refresh the view when a component’s var change by using ngmodel nor ngFor, however if I generate a build locally with ionic cordova build android command the apk works.

There is no error in the appflow output just some warnings with fsevents. appflow’s build takes the same command as local one that is in package.json.

How can i make appflow build work correctly? thanks.

±-----±-------------------------±------------+
| fastlane summary |
±-----±-------------------------±------------+
| Step | Action | Time (in s) |
±-----±-------------------------±------------+
| 1 | default_platform | 0 |
| 2 | build_summary | 0 |
| 3 | add_git_credentials | 0 |
| 4 | detect_native_type | 0 |
| 5 | get_web_dir | 0 |
| 6 | modify_config_xml | 0 |
| 7 | download_credential | 0 |
| 8 | build_pro_app | 196 |
| 9 | add_cordova_to_index | 0 |
| 10 | build_android_cordova | 185 |
| 11 | get_filename_apk | 0 |
| 12 | upload_apk_to_play_store | 0 |
| 13 | upload_apk | 2 |
| 14 | upload_source_maps | 0 |
±-----±-------------------------±------------+

[17:53:04]: fastlane.tools just saved you 6 minutes! :tada:
Running after script…
$ run “clean-up”
Job succeeded

1 post - 1 participant

Read full topic

Cannot find the firebase namespace on Ionic Serve command

$
0
0

It happen all of sudden…
what may be the problem ?

whole error message on console is
Cannot find the firebase namespace; be sure to include firebase-app.js before this library.

it works very well before .

tsconfig.json


{
  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "declaration": false,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "lib": [
      "dom",
      "es2015"
    ],
    "module": "es2015",
    "moduleResolution": "node",
    "sourceMap": true,
    "target": "es5"
  },
  "include": [
    "src/**/*.ts"
  ],
  "exclude": [
    "node_modules",
    "src/**/*.spec.ts",
    "src/**/__tests__/*.ts"
  ],
  "compileOnSave": false,
  "atom": {
    "rewriteTsconfig": false
  }
}

package.json


{
    "name": "appNamefornojo",
    "version": "0.0.1",
    "author": "Ionic Framework",
    "homepage": "http://ionicframework.com/",
    "private": true,
    "scripts": {
        "start": "ionic-app-scripts serve",
        "clean": "ionic-app-scripts clean",
        "build": "ionic-app-scripts build",
        "lint": "ionic-app-scripts lint",
        "sync-android": "cordova platform rm android && rm -rf platforms && cordova platform add android"
    },
    "dependencies": {
        "@angular/animations": "5.2.11",
        "@angular/common": "5.2.11",
        "@angular/compiler": "5.2.11",
        "@angular/compiler-cli": "5.2.11",
        "@angular/core": "5.2.11",
        "@angular/forms": "5.2.11",
        "@angular/http": "^7.2.16",
        "@angular/platform-browser": "5.2.11",
        "@angular/platform-browser-dynamic": "5.2.11",
        "@capacitor/android": "^2.2.0",
        "@capacitor/core": "2.2.0",
        "@ionic-native/badge": "^5.28.0",
        "@ionic-native/calendar": "^5.22.0",
        "@ionic-native/call-number": "^5.22.0",
        "@ionic-native/camera": "^5.22.0",
        "@ionic-native/core": "^5.19.1",
        "@ionic-native/date-picker": "^5.23.0",
        "@ionic-native/device": "^5.23.0",
        "@ionic-native/diagnostic": "^5.23.0",
        "@ionic-native/document-viewer": "^5.23.0",
        "@ionic-native/fcm": "^5.27.0",
        "@ionic-native/file": "^5.23.0",
        "@ionic-native/file-opener": "^5.23.0",
        "@ionic-native/file-transfer": "^5.23.0",
        "@ionic-native/firebase": "^5.27.0",
        "@ionic-native/http": "^4.20.0",
        "@ionic-native/iamport-cordova": "^5.26.0",
        "@ionic-native/image-picker": "^5.23.0",
        "@ionic-native/in-app-browser": "^5.23.0",
        "@ionic-native/mobile-accessibility": "^5.23.0",
        "@ionic-native/onesignal": "^5.22.0",
        "@ionic-native/photo-viewer": "^4.20.0",
        "@ionic-native/splash-screen": "^5.0.0",
        "@ionic-native/status-bar": "^5.0.0",
        "@ionic-native/unique-device-id": "^5.28.0",
        "@ionic/cli": "^6.10.1",
        "@ionic/storage": "2.2.0",
        "@types/hammerjs": "^2.0.36",
        "android": "0.0.8",
        "angularfire2": "^5.4.2",
        "call-number": "^1.0.1",
        "com-sarriaroman-photoviewer": "1.2.5",
        "cordova": "^9.0.0",
        "cordova-android": "8.1.0",
        "cordova-android-play-services-gradle-release": "4.0.0",
        "cordova-android-support-gradle-release": "^3.0.1",
        "cordova-ios": "6.1.1",
        "cordova-plugin-advanced-http": "^2.5.1",
        "cordova-plugin-androidx": "^2.0.0",
        "cordova-plugin-androidx-adapter": "^1.1.1",
        "cordova-plugin-calendar": "^5.1.5",
        "cordova-plugin-camera": "^4.1.0",
        "cordova-plugin-datepicker": "^0.9.3",
        "cordova-plugin-device": "git+https://github.com/apache/cordova-plugin-device.git",
        "cordova-plugin-document-viewer": "^0.9.13",
        "cordova-plugin-fcm-with-dependecy-updated": "2.4.0",
        "cordova-plugin-file": "^6.0.2",
        "cordova-plugin-file-opener2": "^3.0.0",
        "cordova-plugin-file-transfer": "^1.7.1",
        "cordova-plugin-inappbrowser": "^3.2.0",
        "cordova-plugin-ionic-keyboard": "^2.2.0",
        "cordova-plugin-ionic-webview": "^4.1.3",
        "cordova-plugin-network-information": "git+https://github.com/apache/cordova-plugin-network-information.git",
        "cordova-plugin-splashscreen": "^5.0.2",
        "cordova-plugin-statusbar": "^2.4.2",
        "cordova-plugin-telerik-imagepicker": "^2.3.3",
        "cordova-plugin-whitelist": "^1.3.3",
        "cordova.plugins.diagnostic": "^5.0.1",
        "fcm-node": "^1.5.2",
        "firebase": "^7.10.0",
        "gradle": "^1.2.3",
        "hammerjs": "^2.0.8",
        "iamport-cordova": "^0.9.5",
        "ionic": "^4.10.1",
        "ionic-angular": "3.9.9",
        "ionic-long-press": "^2.0.3",
        "ionicons": "3.0.0",
        "mx.ferreyra.callnumber": "0.0.2",
        "native-run": "^1.0.0",
        "ng2-pdf-viewer": "^6.2.0",
        "ngx-pinch-zoom": "^2.4.4",
        "phonegap-plugin-mobile-accessibility": "^1.0.5",
        "phonegap-plugin-multidex": "^1.0.0",
        "rebuild": "^0.1.2",
        "rxjs": "6.5.4",
        "rxjs-compat": "^6.5.5",
        "sw-toolbox": "3.6.0",
        "zone.js": "0.8.29"
    },
    "devDependencies": {
        "@capacitor/cli": "2.2.0",
        "@ionic/app-scripts": "3.2.4",
        "typescript": "^3.7.4"
    },
    "description": "An Ionic project",
    "cordova": {
        "plugins": {
            "cordova-plugin-whitelist": {},
            "cordova-plugin-statusbar": {},
            "cordova-plugin-device": {},
            "cordova-plugin-splashscreen": {},
            "cordova-plugin-ionic-webview": {
                "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
            },
            "cordova-plugin-ionic-keyboard": {},
            "cordova-plugin-camera": {
                "ANDROID_SUPPORT_V4_VERSION": "27.+"
            },
            "mx.ferreyra.callnumber": {},
            "cordova-plugin-calendar": {
                "CALENDAR_USAGE_DESCRIPTION": " ",
                "CONTACTS_USAGE_DESCRIPTION": " "
            },
            "cordova-plugin-datepicker": {},
            "cordova-plugin-telerik-imagepicker": {
                "PHOTO_LIBRARY_USAGE_DESCRIPTION": " "
            },
            "cordova-plugin-inappbrowser": {},
            "phonegap-plugin-mobile-accessibility": {},
            "cordova-plugin-document-viewer": {},
            "cordova-plugin-file-transfer": {},
            "cordova-plugin-file": {},
            "cordova.plugins.diagnostic": {
                "ANDROID_SUPPORT_VERSION": "28.+"
            },
            "cordova-plugin-file-opener2": {
                "ANDROID_SUPPORT_V4_VERSION": "27.+"
            },
            "com-sarriaroman-photoviewer": {},
            "cordova-plugin-advanced-http": {
                "OKHTTP_VERSION": "3.10.0"
            },
            "call-number": {},
            "cordova-android-support-gradle-release": {
                "ANDROID_SUPPORT_VERSION": "26.+"
            },
            "cordova-android-play-services-gradle-release": {
                "PLAY-SERVICES-ADS": "18.0.0",
                "PLAY-SERVICES-ADS-IDENTIFIER": "17.0.0",
                "PLAY-SERVICES-ADS-LITE": "18.0.0",
                "PLAY-SERVICES-AFS-NATIVE": "17.0.0",
                "PLAY-SERVICES-ANALYTICS": "17.0.0",
                "PLAY-SERVICES-ANALYTICS-IMPL": "17.0.0",
                "PLAY-SERVICES-APPINVITE": "18.0.0",
                "PLAY-SERVICES-AUDIENCE": "17.0.0",
                "PLAY-SERVICES-AUTH": "17.0.0",
                "PLAY-SERVICES-AUTH-API-PHONE": "17.0.0",
                "PLAY-SERVICES-AWARENESS": "17.0.0",
                "PLAY-SERVICES-BASE": "17.0.0",
                "PLAY-SERVICES-BASEMENT": "17.0.0",
                "PLAY-SERVICES-CAST": "17.0.0",
                "PLAY-SERVICES-CAST-FRAMEWORK": "17.0.0",
                "PLAY-SERVICES-CLEARCUT": "17.0.0",
                "PLAY-SERVICES-CRONET": "17.0.0",
                "PLAY-SERVICES-DRIVE": "17.0.0",
                "PLAY-SERVICES-FIDO": "18.0.0",
                "PLAY-SERVICES-FITNESS": "17.0.0",
                "PLAY-SERVICES-FLAGS": "17.0.0",
                "PLAY-SERVICES-GAMES": "18.0.0",
                "PLAY-SERVICES-GASS": "18.0.0",
                "PLAY-SERVICES-GCM": "17.0.0",
                "PLAY-SERVICES-IDENTITY": "17.0.0",
                "PLAY-SERVICES-IID": "17.0.0",
                "PLAY-SERVICES-INSTANTAPPS": "17.0.0",
                "PLAY-SERVICES-LOCATION": "17.0.0",
                "PLAY-SERVICES-MAPS": "17.0.0",
                "PLAY-SERVICES-MEASUREMENT": "17.0.0",
                "PLAY-SERVICES-MEASUREMENT-API": "17.0.0",
                "PLAY-SERVICES-MEASUREMENT-IMPL": "17.0.0",
                "PLAY-SERVICES-MEASUREMENT-SDK": "17.0.0",
                "PLAY-SERVICES-MEASUREMENT-SDK-API": "17.0.0",
                "PLAY-SERVICES-NEARBY": "17.0.0",
                "PLAY-SERVICES-OSS-LICENSES": "17.0.0",
                "PLAY-SERVICES-PANORAMA": "17.0.0",
                "PLAY-SERVICES-PHENOTYPE": "17.0.0",
                "PLAY-SERVICES-PLACES": "17.0.0",
                "PLAY-SERVICES-PLACES-PLACEREPORT": "17.0.0",
                "PLAY-SERVICES-PLUS": "17.0.0",
                "PLAY-SERVICES-SAFETYNET": "17.0.0",
                "PLAY-SERVICES-STATS": "17.0.0",
                "PLAY-SERVICES-TAGMANAGER": "17.0.0",
                "PLAY-SERVICES-TAGMANAGER-API": "17.0.0",
                "PLAY-SERVICES-TAGMANAGER-V4-IMPL": "17.0.0",
                "PLAY-SERVICES-TASKS": "17.0.0",
                "PLAY-SERVICES-VISION": "18.0.0",
                "PLAY-SERVICES-VISION-COMMON": "18.0.0",
                "PLAY-SERVICES-VISION-IMAGE-LABEL": "18.0.0",
                "PLAY-SERVICES-WALLET": "17.0.0",
                "PLAY-SERVICES-WEARABLE": "17.0.0"
            },
            "phonegap-plugin-multidex": {},
            "cordova-plugin-androidx": {},
            "cordova-plugin-androidx-adapter": {},
            "cordova-plugin-fcm-with-dependecy-updated": {}
        },
        "platforms": [
            "android",
            "ios"
        ]
    }
}

1 post - 1 participant

Read full topic

Ionic selectable

$
0
0

Hi, I am using ionic selectable to display countries
when I choose a country I want to display all airports in that country

any help??

1 post - 1 participant

Read full topic

Conditional local/push notifications for a reminder feature

$
0
0

Hi everyone,

Working on an IonicV5 (with Angular) mobile application, I would like to implement a local/push notification system working this way:

  1. If myArray is not empty at 6PM on D day, display the local notification to the user
  2. If myArray is empty at 6PM on D day, do not display the local notification to the user

As this notification system is key for a reminder feature, it should work even if the app is in background or killed. Another difficulty is that myArray can evolve between the D-1 day & the D day, as elements can be added or deleted in the meantime (making scheduling complicated).

I was considering working with https://ionicframework.com/docs/native/local-notifications (but can change if another solution seems better).

Could someone advice to help me developing such a thing?

Thanks a lot for your answers!

Andra

1 post - 1 participant

Read full topic

[Ionic4/5] [Android]Don't trigger click event while touch stop scrolling

$
0
0

Hi there,

I have an item list which click event is bind to items.
In real device, when we scroll up or down navigating items, we can touch screen to stop scrolling. However, in android, it will trigger click event of item, and open the item page. How can I prevent this happened? This kind of behavior is not user friendly.
Only happened on android.

1 post - 1 participant

Read full topic

IONIC WordPress JWT Authentication will work with nginx

$
0
0

Hello,

I have buy ionic wordpress news app with following documentation: https://stionic.github.io/halanews-document/docs/introduction

I have follow all steps in documentation, and all most functions inside app work well, only problem that i have is with comment and profile pages.

After registration user is able to comment, but every comment made from app will have author username guest.
In wordpress, author name will show as anonymous: http://prntscr.com/uo7uru

Also, user is not able to change username or email inside app.

Author say that is some permission error.

At this page: https://stionic.github.io/halanews-document/docs/customize#login--social-login author use JWT Authentication for WP REST API

We use NGINX server that don’t have .htaccess, so we contact our hosting provider and they say:

we use an NGINX server and have no restrictions regarding the specified header, so there is theoretically no need to add the specified code.

For each security, we’ve added the specified header to all servers, so if it still doesn’t work it’s not related

At this moment, am not sure what i can do…

After couple hours at google, i see that many nginx servers use JWT authentication…

Is anyone face with similar problem?

Thank you!

1 post - 1 participant

Read full topic

Angular router child routes not working

$
0
0

I’ve switched my app over from ion nav to the Angular router now, but i’m having problems with child routes and routes not being recognised.

I want to move some pages from the app routing module and into my tabs routing module, but when i move them the routes aren’t recognised - whether i declare them as child routes or not. They’re the ones at the bottom of the app module. They’re all accessed via the homepage (my tab page) so they don’t need to be in the app routing module.

I’m still getting my head around Angular and the router, so any help would be massively appreciated - the app has a really long load time currently.

1 post - 1 participant

Read full topic


Unable to generate apk

$
0
0

Hi there,
I’m new to this forum, yet hoping that this forum helps me out.
I have this project in ionic and I’m very new to this. I figured out almost everything and was able to generate apk and sign it.
but for another app related to the project, I’m able to “ionic serve”, however with " ionic cordova build --release android",
I’m getting following error:

:\Users\HP\Desktop\1 Harbonn Ap1p\App_code\User_app\platforms\android\app\src\main\res\xml\network_security_config.xml:9: Error: Missing includeSubdomains attribute [NetworkSecurityConfig]
        <domain>localhost</domain>
         ~~~~~~

   Explanation for issues of type "NetworkSecurityConfig":
   Ensures that a <network-security-config> file, which is pointed to by an
   android:networkSecurityConfig attribute in the manifest file, is valid

   https://developer.android.com/preview/features/security-config.html

[I had put my hosting ip address within this as I did for my previous app within this file]

Error 2: Execution failed for task ‘:app:transformDexArchiveWithExternalLibsDexMergerForRelease’.

com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: android.support.v4.media.MediaBrowserCompat$CallbackHandler

As a beginner, I’m not able to understand these two errors. Any help would be appreciated.
Here are some things that you may need:

  • I’ve ionic cordova sdk and gradle successfully installed and added necessary environement variables for these. All latest version.

Please help me here considering my knowledge with npm commands as beginners.
Thank you!

1 post - 1 participant

Read full topic

Ionic 4 and Android 11 Location issues

$
0
0

Seems like location services are not available, even when premissions are given. Same build is working great on earlier Android versions (8,9).
We’re running on Mac, ionic framework: 4.11.10 node: 12.17.0, cordova cli: 10.0.0 ionic cli: 6.11.9

Has anyone run into such issues? any advise?

1 post - 1 participant

Read full topic

Shadow Root... how to fix ion-item padding?

$
0
0

I need to get rid of the 10px padding the class “item-inner” adds to the ion-item.
To bad it’s nested inside the shadow root and i can’t access it via the part
(Who said, btw, Shadow Parts are is a cool idea? - It’s design, we don’t need to adapt every software principle to css)

Thanks to another post I found quirk solution via type script, but it simply looks *** that mys lists are drawn first with the padding and then, after a second (I need a timeout to wait for the dom) they are redrawn again without the padding, As the lists are dynamically (I add items), it simply looks s**t.

Is there any other way to get this solved?

Without “hack”:

With the “hack”
Screenshot 2020-09-26 at 19.14.04

2 posts - 2 participants

Read full topic

Error when deploying iOS

$
0
0

/Users/pitech/Desktop/talabate-app/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m:141:27: error:
property ‘defaultWebpagePreferences’ not found on object of type ‘WKWebViewConfiguration *’
configuration.defaultWebpagePreferences.preferredContentMode = WKContentModeMobile;
^
/Users/pitech/Desktop/talabate-app/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m:141:76: error:
use of undeclared identifier ‘WKContentModeMobile’
configuration.defaultWebpagePreferences.preferredContentMode = WKContentModeMobile;
^
/Users/pitech/Desktop/talabate-app/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m:143:27: error:
property ‘defaultWebpagePreferences’ not found on object of type ‘WKWebViewConfiguration *’
configuration.defaultWebpagePreferences.preferredContentMode = WKContentModeDesktop;
^
/Users/pitech/Desktop/talabate-app/platforms/ios/CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.m:143:76: error:
use of undeclared identifier ‘WKContentModeDesktop’
configuration.defaultWebpagePreferences.preferredContentMode = WKContentModeDesktop;
^
4 errors generated.

Ionic Version: Latest Version
xcode version: 10.1

1 post - 1 participant

Read full topic

Audience network facebook

Viewing all 49253 articles
Browse latest View live