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

React Routing + Firebase + Redirect + Authentication

$
0
0

Thank you for your help panjiuzhen but no luck.

The problem is that I am using tabs for navigation and that does not re render the component. It works for the first time but if you navigate away and come back the component is still mounted so it won’t redirect the user again.

I guess I am taking the wrong approach by having the account/login pages in a tab. No luck using ionic life cycle methods either.

Will re think my approach. Maybe adding a hamburger/account icon at the top to handle the account pages.

Thanks!


Ionic 5 cordova app suddenly can no longer build

$
0
0

The developing rundown of supports has originated from many significant occasions and city objections around the globe, with the occasion objections of Sri Lanka and Grenada joining other summer sun objections, for example, the ever-well known Alicante and Benidorm in Spain.

Cordova platform remove ios
Cordova platform add ios@6.1.1

Eswatini, the mainstream natural life and safari objective in Southern Africa, joins a developing rundown of African countries to embrace ‘Safe Travels’, including Rwanda and Tanzania.

WTTC, which speaks to the worldwide Travel and Tourism private division, made the Safe Travels stamp to permit voyagers to recognize objections and organizations around the globe which have embraced the worldwide normalized wellbeing and cleanliness conventions.

The United Nations World Tourism Organization (UNWTO) has invited the WTTC Safe Travels stamp, which places the security and cleanliness of voyagers as the main concern.

Maybe my information is correct.

Best way ton integrate from Adobe XD

$
0
0

Hi,

I’m working now on an app designed in Adobe XD.

Would like to now which is the best way to integrate this design, there is a XD plugin to use for export the design in a good condition ?

Otherwise, for me the harder part is to make my design responsive, there is any tool (except grids) for help me to make my design responsive ?

Thanks a lot.

HttpClient error code/message reporting

(Android/Capacitor) Local Notification Clear/Dismiss Button

$
0
0

Did you find a solution to this?

Ionic v5 (React w/ TypeScript): History .replace() Method Not Working as Expected

$
0
0

Thank you for the response! I’ll give this a try. Also, I didn’t know at about the direction property so thanks for that bit of knowledge!

Ionic Native Diagnostic not Firing in iOS

$
0
0

I have an app that checks for location services for a store locator page - uses geolocation to get the nearest store to the user. Has worked fine up until a recent app update and then something broke. I’ve tried updating plugins, cordova, ionic, etc and just can’t find the issue. Basically, the native Diagnostic plugin just doesn’t fire, but I also don’t get any thrown errors. Below is the function we’ve used to check for location services:

checkIfLocationPerms(){
let alert = this.alertCtrl.create({
  title: 'Error Loading Locations',
  subTitle:`You must allow geolocation permissions for this application before continuing. Please Change them in the settings of your device`,
  buttons: ['OK']
});
let timeoutFunct = setTimeout(()=>{
  this.goHome();
  alert.present();
}, 5000);
this.Diagnostic.isLocationAvailable().then(status=>{
  if(status == true){
    clearTimeout(timeoutFunct);
    this.loadMap();
  } else {
    timeoutFunct;
    this.Diagnostic.requestLocationAuthorization().then(data=>{
      if(data == this.Diagnostic.permissionStatus.GRANTED_WHEN_IN_USE ||
         data == this.Diagnostic.permissionStatus.GRANTED) {
        clearTimeout(timeoutFunct);
        this.loadMap()
      } else {
        clearTimeout(timeoutFunct);
        this.goHome();
        alert.present();
        return false;
      }
    }).catch(err=>{
      clearTimeout(timeoutFunct);
      this.goHome();
      alert.present();
    })
  }
}).catch(err=>{
  clearTimeout(timeoutFunct);
  this.goHome();
  alert.present();
})
}

Basically the clearTimeout function finishes before I get anything back from Diagnostic. If I don’t call the clearTimeout function, I get nothing returned and no errors. Below is my Ionic Info:

Ionic:

   Ionic CLI          : 6.11.8 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.4

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : ios 5.1.1
   Cordova Plugins   : cordova-plugin-ionic-webview 4.2.1, (and 18 other plugins)

Utility:

   cordova-res : 0.15.1
   native-run  : 1.0.0

System:

   ios-deploy : 1.10.0
   ios-sim    : 6.1.3
   NodeJS     : v13.13.0 (/usr/local/Cellar/node/13.13.0_1/bin/node)
   npm        : 6.14.7
   OS         : macOS Catalina
   Xcode      : Xcode 11.7 Build version 11E801a

here’s the versions of the pertinent plugins from package.json

"@ionic-native/diagnostic": “^5.28.0”,
"@ionic-native/geolocation": “^4.18.0”,

I can add that I don’t get a response even if Locations Services is allowed. I don’t see a way to allow the app to have access to Location Services either. I just don’t know where to go from here, I’ve been fighting this for a week trying to figure it out. Anyone have any suggestions?

Best way ton integrate from Adobe XD

$
0
0

As of now, I don’t know of any plugin for XD that will output Ionic components. You are going to have to use the design specs from XD and manually translate them into the CSS variables.

For the responsive side, remember it is still regular web dev under the hood. Media queries are still going to be your best friend


Local Notifications every week on specific day (Cordova or Capacitor)

$
0
0

I fixed the problem with npx jetify

So then i sheduled as follow (using weekday) and it worked :

this.localNotifications.schedule({
              id: this.notifs.notifs[i].id,
              title: this.title,
              text: this.body,
              trigger: {
                count: 1,
                every: {weekday: i, hour: new Date(this.notifs.time).getHours(), minute: new Date(this.notifs.time).getMinutes()}
              },
              data: {page: this.page},
              foreground: true
            });

ImagePicker to Firebase Storage

$
0
0

Hello,

I’m trying to use the ImagePicker plugin from Cordova to send few pictures to my firebase storage. The problem is that I get a format error:

E/Capacitor/Console: File: http://localhost/vendor-es2015.js - Line 39108 - Msg: ERROR Error: Uncaught (in promise): FirebaseStorageError: {"code_":"storage/invalid-format","message_":"Firebase Storage: String does not match format 'base64': Invalid character '-' found: is it base64url encoded?","serverResponse_":null,"name_":"FirebaseError"}

I tried a lot of configurations that i found, but still not working.
My code is this one :

selectImages(){
        this.imagePicker.getPictures({
            maximumImagesCount: 10,
            width: 500,
            height: 500,
            quality: 80
        }).then((results) => {

            let userImages = [];

            results.forEach(result => {

                const post = 'photos/' + Date.now().toString() + result.name;

                console.log('debug result: ' + result);

                const storageRef = firebase.storage().ref(post).putString('data:image/jpg;base64,' + result, 'data_url');
                }
         }
    }

And I get this from the console log:

I/Capacitor/Console: File: http://localhost/pulser-pulser-module-es2015.js - Line 185 - Msg: debug result: file:///data/user/0/io.ionic.ceopulser/cache/tmp_Screenshot_20200908-181610_Instagram3847727537251182735.jpg

Do someone know how to fix this error, and make this work ?
Thanks in advance

My code is not hitting the server url

$
0
0

ionic cordova platform add android then run
ionic cordova run android and test on emulator or device using app-debug.apk

Ionic Creator with Ionic 5

$
0
0

Hello there,
I was looking for a tool to design Ionic app using drag-n-drop feature, similar to what you use in XCode to build iOs app or Android Studio to build android app. I came across Ionic creator but it does not allow new users. I had an old account and when tried to create an app, I noticed it supports V3 which is again in beta. Seems this tool is not under active roadmap. Am I looking at wrong place? Is there any other tool in the market?

Android install fails when trying to modularize android project

$
0
0

I have an Ionic application in which I wanted to add instant app support with a native dynamic-feature module. I created a new module and made it the base application module, and added a dynamic feature module which would be an instant entry point containing native code. At this point I could run the two separate modules fine, the ionic app module and the new base application module which would bring up the dynamic feature module. I basically had two applications. After changing the ionic app module from application to dynamic-feature, refactoring resources and integrating it with the base application module and dynamic feature module the base application module now fails to install with INSTALL_PARSE_FAILED_MANIFEST_MALFORMED.

Installation did not succeed.
The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

List of apks:
[0] '/Users/jmartinez/Desktop/Frontend/android/base/build/outputs/apk/debug/base-debug.apk'
[1] '/Users/jmartinez/Desktop/Frontend/android/app/build/outputs/apk/debug/app-debug.apk'
[2] '/Users/jmartinez/Desktop/Frontend/android/appointments/build/outputs/apk/debug/appointments-debug.apk'
Installation failed due to: 'null'

Drag and drop on an array from pictures like Instagram feed

$
0
0

Hello,

I currently have a page with an array of images next to each other (3 photos per line like an Instagram feed for example) and I would like to be able to add a drag and drop between these photos to reorganize them.

Following my research I came across several examples of dragging and dropping with lists (dragging from list 1 to 2) or sliding up and down or from right to left.

All these solutions do not meet my need which is a drag and drop of a single vertical list as horizontal.

Do you have any ideas ?

thank you for your time

Register custom android capacitor plugin

$
0
0

I am having problems integrating my plugin with android, I followed the guide https://capacitorjs.com/docs/plugins/android and everything was fine but when importing the plugin into MainActivity
import com.myplugin.plugin says “Cannot resolve symbol myplguin”

in my application
import {Plugins} from ‘@ capacitor / core’;
const {myplugin} = Plugins;

when trying to use myplugin.echo ({value: “test”}). then (® => {
console.log ®;
})

I get “cannot read echo property of undefined”


SQLiteDatabaseConfig - androidDatabaseLocation

$
0
0

Hi there,

using ionic-native sqlite, there’s no androidDatabaseLocation slot in interface SQLiteDatabaseConfig.

I’m using cordova-sqlite-evcore-extbuild-free.

That forces me to edit SQLitePlugin.js directly if I want to use custom android database location.

Can you add it in the interface ?

Thanks !

Ionic 4 Service variables do not change their values

$
0
0
interface Profile {
  id: string;
  email: string;
  ...
}

class ProfileService {
  activeUser$ = new BehaviorSubject<Profile | undefined>();

  updateActiveUser(profile: Profile): void {
    this.activeUser$.next(profile);
  }
  
  peekActiveUser(): Profile | undefined {
    return this.activeUser$.value;
  }

  watchActiveUser(): Observable<Profile | undefined> {
    return this.activeUser$;
  }
}

My code is not hitting the server url

Error on Ionic Serve

$
0
0
{

  "name": "reciklado",

  "description": "Reciklado - Ganhe dinheiro com reciclaveis",

  "version": "0.0.1",

  "author": "LIVE TECH TECNOLOGIA",

  "homepage": "https://reciklado.com/",

  "private": true,

  "scripts": {

    "ng": "ng",

    "start": "ng serve",

    "build": "ng build",

    "test": "ng test",

    "lint": "ng lint",

    "e2e": "ng e2e"

  },

  "dependencies": {

    "@agm/core": "^3.0.0-beta.0",

    "@angular/animations": "^10.0.14",

    "@angular/common": "^10.0.14",

    "@angular/core": "^10.0.14",

    "@angular/forms": "^10.0.14",

    "@angular/platform-browser": "^10.0.14",

    "@angular/platform-browser-dynamic": "^10.0.14",

    "@angular/router": "^10.0.14",

    "@auth0/angular-jwt": "^5.0.1",

    "@capacitor/android": "^2.4.0",

    "@capacitor/core": "2.2.0",

    "@capacitor/ios": "^2.4.0",

    "@ionic-native/card-io": "^5.28.0",

    "@ionic-native/core": "^5.28.0",

    "@ionic-native/device": "^5.28.0",

    "@ionic-native/email-composer": "^5.28.0",

    "@ionic-native/facebook": "^5.28.0",

    "@ionic-native/file": "^5.28.0",

    "@ionic-native/file-chooser": "^5.28.0",

    "@ionic-native/file-transfer": "^5.28.0",

    "@ionic-native/geolocation": "^5.28.0",

    "@ionic-native/globalization": "^5.28.0",

    "@ionic-native/google-analytics": "^5.28.0",

    "@ionic-native/google-maps": "^5.5.0",

    "@ionic-native/google-plus": "^5.28.0",

    "@ionic-native/ionic-webview": "^5.28.0",

    "@ionic-native/keyboard": "^5.28.0",

    "@ionic-native/native-geocoder": "^5.28.0",

    "@ionic-native/network": "^5.28.0",

    "@ionic-native/paypal": "^5.28.0",

    "@ionic-native/social-sharing": "^5.28.0",

    "@ionic-native/splash-screen": "^5.28.0",

    "@ionic-native/status-bar": "^5.28.0",

    "@ionic-native/toast": "^5.28.0",

    "@ionic-native/twitter-connect": "^5.28.0",

    "@ionic/angular": "^5.3.1",

    "@ionic/core": "^5.3.1",

    "@ionic/storage": "^2.3.0",

    "@ngx-translate/core": "^13.0.0",

    "@ngx-translate/http-loader": "^6.0.0",

    "@types/google.analytics": "0.0.40",

    "android-versions": "^1.5.0",

    "autoprefixer": "^7.2.3",

    "capacitor-twitter": "^2.0.0",

    "card.io.cordova.mobilesdk": "^2.1.0",

    "com.paypal.cordova.mobilesdk": "^3.5.0",

    "cordova": "^9.0.0",

    "cordova-android": "^7.1.4",

    "cordova-androidx-build": "^1.0.4",

    "cordova-plugin-add-swift-support": "^2.0.2",

    "cordova-plugin-device": "^2.0.3",

    "cordova-plugin-email": "^1.2.7",

    "cordova-plugin-email-composer": "0.9.2",

    "cordova-plugin-facebook4": "^5.0.0",

    "cordova-plugin-file": "^6.0.2",

    "cordova-plugin-file-transfer": "^1.7.1",

    "cordova-plugin-filechooser": "^1.2.0",

    "cordova-plugin-geolocation": "^3.0.0",

    "cordova-plugin-globalization": "^1.11.0",

    "cordova-plugin-google-analytics": "^1.9.0",

    "cordova-plugin-googlemaps": "^2.7.1",

    "cordova-plugin-googlemaps-sdk": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git",

    "cordova-plugin-googleplus": "^7.0.2",

    "cordova-plugin-ionic-keyboard": "^2.2.0",

    "cordova-plugin-ionic-webview": "^1.2.1",

    "cordova-plugin-nativegeocoder": "^3.4.1",

    "cordova-plugin-network-information": "^1.3.4",

    "cordova-plugin-splashscreen": "^5.0.4",

    "cordova-plugin-statusbar": "^2.4.3",

    "cordova-plugin-whitelist": "^1.3.4",

    "cpf_cnpj": "^0.2.0",

    "crypto-md5": "*",

    "jquery-mask-plugin": "^1.14.16",

    "jquery-maskmoney": "^3.0.2",

    "minimist": "^1.2.5",

    "moment": "^2.27.0",

    "numeral": "^2.0.6",

    "rxjs": "^6.6.2",

    "rxjs-compat": "^6.6.2",

    "text-mask-addons": "*",

    "text-mask-all": "^0.2.0",

    "tslib": "^2.0.1",

    "twitter-connect-plugin": "^0.6.0",

    "xml2js": "^0.4.23",

    "zone.js": "~0.10.3"

  },

  "devDependencies": {

    "@angular-devkit/build-angular": "^0.1000.8",

    "@angular/cli": "^10.0.8",

    "@angular/compiler": "^10.0.14",

    "@angular/compiler-cli": "^10.0.14",

    "@angular/language-service": "^10.0.14",

    "@capacitor/cli": "2.4.0",

    "@ionic/angular-toolkit": "^2.3.3",

    "@ionic/lab": "2.0.7",

    "@types/googlemaps": "^3.39.13",

    "@types/jasmine": "^3.5.14",

    "@types/jasminewd2": "~2.0.3",

    "@types/node": "^14.6.4",

    "codelyzer": "^6.0.0",

    "jasmine-core": "~3.5.0",

    "jasmine-spec-reporter": "~5.0.0",

    "karma": "~5.0.0",

    "karma-chrome-launcher": "~3.1.0",

    "karma-coverage-istanbul-reporter": "~3.0.2",

    "karma-jasmine": "~3.3.0",

    "karma-jasmine-html-reporter": "^1.5.0",

    "protractor": "~7.0.0",

    "ts-node": "~8.3.0",

    "tslint": "~6.1.0",

    "typescript": "^3.9.5"

  },

  "cordova": {

    "plugins": {

      "cordova-plugin-device": {},

      "cordova-plugin-ionic-keyboard": {},

      "cordova-plugin-ionic-webview": {},

      "cordova-plugin-splashscreen": {},

      "cordova-plugin-statusbar": {},

      "cordova-plugin-whitelist": {},

      "com.paypal.cordova.mobilesdk": {},

      "cordova-plugin-email": {},

      "cordova-plugin-geolocation": {},

      "cordova-plugin-email-composer": {

        "ANDROID_SUPPORT_V4_VERSION": "27.+"

      },

      "cordova-plugin-google-analytics": {

        "GMS_VERSION": "11.0.1"

      },

      "cordova-plugin-x-socialsharing": {

        "ANDROID_SUPPORT_V4_VERSION": "24.1.1+"

      },

      "cordova-plugin-googlemaps": {

        "API_KEY_FOR_ANDROID": "AIzaSyDSNNvDauFpwpgIQnoSuy6oas96cOcniUk",

        "API_KEY_FOR_IOS": "AIzaSyDSNNvDauFpwpgIQnoSuy6oas96cOcniUk",

        "LOCATION_WHEN_IN_USE_DESCRIPTION": "Show your location on the map",

        "LOCATION_ALWAYS_USAGE_DESCRIPTION": "Trace your location on the map",

        "PLAY_SERVICES_VERSION": "15.0.1",

        "ANDROID_SUPPORT_V4_VERSION": "27.+"

      },

      "cordova-plugin-network-information": {},

      "cordova-plugin-file-transfer": {},

      "cordova-plugin-filechooser": {},

      "cordova-plugin-nativegeocoder": {},

      "cordova-plugin-facebook4": {

        "APP_ID": "206262219905545",

        "APP_NAME": "Reciklado",

        "FACEBOOK_HYBRID_APP_EVENTS": "false",

        "FACEBOOK_ANDROID_SDK_VERSION": "5.0.2"

      },

      "cordova-plugin-googleplus": {

        "REVERSED_CLIENT_ID": "com.googleusercontent.apps.871505187528-4o62bihfdmi88kimrl4jok0na3boc4hu",

        "WEB_APPLICATION_CLIENT_ID": "871505187528-4o62bihfdmi88kimrl4jok0na3boc4hu.apps.googleusercontent.com",

        "PLAY_SERVICES_VERSION": "15.0.1"

      },

      "cordova-plugin-globalization": {}

    },

    "platforms": [

      "android",

      "ios",

      "browser"

    ]

  }

}

i think than i have some plugin than ask app-scripts but is already ionic 5

postData turns Uncaught TypeError: Cannot read property 'postPvdr' of null error

Viewing all 230058 articles
Browse latest View live


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