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

Ionic cordova platform add problem with ionic3

$
0
0

@mohamedhassan2524 wrote:

Any help with ionic cordova platform add android: when i run this commend i found this error!!

ionic cordova platform add android

[ERROR] Exception: Using cordova-fetch for cordova-android@~7.1.1

    Adding android project...
    Creating Cordova project for the Android platform:
            Path: platforms\android
            Package: io.ionic.starter
            Name: ionicFirebase
            Activity: MainActivity
            Android target: android-27
    Android project created with cordova-android@7.1.4
    Android Studio project detected
    Android Studio project detected
    Source path does not exist: resources/android/icon/drawable-hdpi-icon.png

and when i run platform ls i am found android@7.1.4 in install platform but on ionic project folder no create any directory to platforms install also when i remove resources/android directory manually and run ionic cordova resources directory don’t create again??

i am try run this commend after and before remove platform same the following error:

ionic cordova resource

√ Collecting resource configuration and source images - done!

[ERROR] No platforms detected. Please run: ionic cordova platform add

and same error when rm android and run again ionic cordova resources and when run ionic cordova resources and add platform again same error can’t find path!! I can’t find any solution to my problem and try cordova v7.0.1 and latest and v6.3.1 and CLI 3.19.0 With cordova7.0.0 every version i found the same error and this my ionic info !!!

ionic info

cli packages:

@ionic/cli-utils  : 1.12.0
ionic (Ionic CLI) : 3.12.0

global packages:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)

local packages:

@ionic/app-scripts : 3.1.0
Cordova Platforms  : android 7.1.4
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 25.2.5
Node              : v6.16.0
npm               : 4.6.1
OS                : Windows 10

Misc:

backend : pro

Posts: 1

Participants: 1

Read full topic


Ionic 4 and root page

$
0
0

@aardra wrote:

Hi All

I am using ionic 4.

I would like to know how can i select the first page that loads up after the splash screen.

I would like to use any api to query some data at load time, once the data reply is returned then switch off the splash screen and then load the correct first page.

I have been searching but not found anything that can help me.

Thank You

Posts: 1

Participants: 1

Read full topic

Setting Root page in Ionic 4

$
0
0

@DMoney wrote:

My app is routing to the page based on the condition but the login page appears briefly before routing users to the profile page. How can I prevent that?

  initializeApp() {
    firebase.initializeApp(firebaseConfig);

    this.platform.ready().then(() => {
        const unsubscribe = firebase.auth().onAuthStateChanged( user => {
          if (!user) {
            this.router.navigateByUrl('login');
            unsubscribe();
            console.log('if !user', user);
          } else {
            this.router.navigateByUrl('profile');
            unsubscribe();
            console.log('if user', user);
          }
        });
      this.statusBar.styleDefault();
      this.splashScreen.hide();
    });
  }

Posts: 2

Participants: 1

Read full topic

How to have a custom history and display the back buttons on a deep link?

$
0
0

@badpenguin wrote:

Is there a way to construct the history when accessing a deep link?
For instance when reloading the url /trips/africa/casablanca
the ion-back-button should display and go back to /trips/africa
and then to /trips and finally to /home

Posts: 2

Participants: 2

Read full topic

Ionic 4 PWA Toolkit and iOS push notifications

$
0
0

@kdawg1406 wrote:

I’ve read the PWA’s don’t support push notifications on iOS.

Then I read the PWA Toolkit page here and push notifications are listed.

Can someone confirm the PWA Toolkit will allow push notifications on iOS?

Thank you very much,

Karl

Posts: 1

Participants: 1

Read full topic

Easy ion-radio question

$
0
0

@wekas wrote:

I must be missing something super obvious here.
For some reason I can “check” the ion-radio by clicking on it but I can’t un-check it again.
Any ideas?
Ionic 4.
Just hard-coded the checked to false for now.

<ion-item>
    <ion-label position="floating">{{currentCheck.name}}</ion-label>
    <ion-radio slot="start" value="pass" checked="false"></ion-radio>
</ion-item>

Posts: 3

Participants: 2

Read full topic

Page not loaded fully on ios devices

$
0
0

@rekony wrote:

Hey All

I’ve recently encounter the following issue where the page (let’s call this Page A) is loaded but the bounded images and text was not displaying to the screen.

The page was navigated from “Page Source” via a button click, triggers the pin dialog and navigate it to the Page A e.g

buttonClickFunction() {
this.platform.ready().then(() => {
this.PinDialog.prompt(‘enter xxx’, ‘enter xxx’, [‘OK’, ‘Cancel’]).then(
(result: any) => {
if (result.buttonIndex == 1)
{
this.route.navigateByUrl(’/Page A’);
}
}
);
});
}

Page A - Code snippet
<img [src]=“status == ‘success’ ? ‘assets/img/success.png’ : ‘assets/img/error.png’” height=“150px” width=“150px”>
<span class=“success-text success-text1” [innerHTML]=“messageString1”></span><br>

I’ve assigned default value to the success and messageString1 param

If i removed the PinDialog step and perform the navigate to Page A from the button click. It works, all the images and text loaded successfully.

This issue only happens in ios device. Browser and Android device is fine
This is on ionic-v4

Posts: 1

Participants: 1

Read full topic

If statement behaving like for loop

$
0
0

@salad-gg wrote:

I have an event listener that is supposed to call an alert controller if a given value is >1:
But I get multiple popups simultaneously, why is that the case.

Using return statement solved the problem, many calls to alert method when not using return.

    this.events.subscribe("books-count", out => {
      let keyz = Object.keys(out);
      if (keyz.length > 1) {
        //this.alertMe();
        return this.alertMe();
      }
    });

Posts: 1

Participants: 1

Read full topic


How to check all previous checkbox on condition

$
0
0

@pksquare wrote:

checkbox%20condition

i have these 4 checkboxes on a page. I want if i check 3 box previous two automaticcaly be checked. how i do this ?

Posts: 1

Participants: 1

Read full topic

Can anyone give me the easiest one clearcut steps to implement firebase push notification in ionic3

Ionic 2 ssl pinning

$
0
0

@aruna0901 wrote:

Hi All,

I’m struggling with ssl pinning in our ionic 2 application. I tried with sslchecker which works fine in android with SHA 256 fingerprints. but the same is not working in iOS. So we installed the previous version of this plugin and used SHA1 fingerprints, which is working fine in both android and iOS.
But we would like to use only SHA256 fingerprints as SHA1 is absolete.

I also tried using cordova-plugin-advanced-http plugin and placed .cer file in www/sertificates folder. But this always returns the success callback even when i use a wrong certificate or no certificate.
Here is my code:

import { HTTP } from ‘@ionic-native/http’;
constructor(public ihttp:HTTP) {
}

postRequest()
{
this.ihttp.setSSLCertMode(‘pinned’).then(success=>{
console.log(“ssl connection secured”,success);
this.post(params);

                    },(err)=>{
                        this.loading.hide();
                        console.log("ssl connection not secured",err)

                    });    

}

Any help would be highly appreciated.

Thanks,
Aruna.

Posts: 1

Participants: 1

Read full topic

How to refresh the page after closing model in ionic 3

Apple Music Kit JS

$
0
0

@VitoFromEarth wrote:

Im trying to integrate Apples Music Kit into the app. But at auth in build version i get redirected to a browser tab. From there the app does not collect anything from session and i can’t get dev token. I tried use InAppBrowser package to override window.open to be in in app browser but there is no use in it. Inside apple’s script i found out that script creates a form via document.createElement(“form”)

ServiceSetupView.prototype._buildFormElement = function (e, t, r) {
        void 0 === t && (t = this.target), void 0 === r && (r = this.developerToken);
        var i = document.createElement("form");
        i.setAttribute("method", "post"), i.setAttribute("action", e), i.setAttribute("target", t), i.style.display = "none";
        var n = document.createElement("input");
        n.setAttribute("name", "jwtToken"), n.setAttribute("value", r), i.appendChild(n);
        var o = document.createElement("input");
        o.setAttribute("name", "isWebPlayer"), o.setAttribute("value", "true"), i.appendChild(o);
        var a = document.createElement("input");
        return a.setAttribute("name", "LogoURL"), a.setAttribute("value", "test"), i.appendChild(a), i
      }

I tried to replace

 i.setAttribute("target", t)

with

 i.setAttribute("target", "_self")

and it did work in dev env when app launches in browser but on native build it still opens a system browser :confused:

If someone had such issue before and can help it would be great. Thanks!

Posts: 1

Participants: 1

Read full topic

Unexpected end of json input

$
0
0

@Alzmoth wrote:

As i was using ionic3 procject working and still apk working well . Ionic auto v4 updated and now i get this error " Unexpected end of JSON input"

i using mysql beckend

i changed ionic version 4 to 3.4 , but still i get same error. how can fix it

I unable to solve it ,anyone know please teach me i will appreciate~

login.ts

login(){
   if(this.userData.username && this.userData.password){
    this.authService.postData(this.userData, "login").then((result) =>{
    this.resposeData = result;

auth.service.ts

 postData(credentials, type){

    return new Promise((resolve, reject) =>{
      let headers = new Headers();
      this.http.post(apiUrl+type, JSON.stringify(credentials), {headers: headers}).
      subscribe(res =>{
        resolve(res.json());
      }, (err) =>{
        reject(err);
      });

    });

  }

Posts: 1

Participants: 1

Read full topic

Subheader The animation entered by the page is not


Ion-tab :after css selector

$
0
0

@joseph7 wrote:

Hey guys,

I’m currently having trouble figuring things out. I have three 's inside , and I’d like each of the three to have separate scss :after property. Right now what I did was:

  1. run ionic serve --lab
  2. right click on tab and inspect it
    And here i found out that each of these three tabs has their individual # which goes like id=“tab-t1-0”, tab-t1-1 and tab-t1-2. Issue is, these numeric values change each time user clicks on the tab.
    My code so far:
    tabs.html
<div class="tabs-wrapper">
  <ion-tabs>
    <ion-tab [root]="tab1Root" tabIcon="home" class="home_tab"></ion-tab>
    <ion-tab [root]="tab2Root" tabIcon="search" class="search_tab"></ion-tab>
    <ion-tab [root]="tab3Root" tabIcon="cog" class="cog_tab"></ion-tab>
  </ion-tabs>
</div>

tabs.scss

 page-tabs {
    .tabs-wrapper {
      #tab-t0-0 {
        position: relative !important;
      }
      #tab-t0-0:after {
        content: '' !important;
        width: 1px !important;
        position: absolute !important;
        right: 0 !important;
        top: 25% !important;
        height:50% !important;
        background-color: #013374 !important; // The color of your border
      }
      #tab-t0-1 {
        padding-right: 30% !important;
        padding-left: 30% !important;
      }
      #tab-t0-2 {
        position: relative !important;
      }
      #tab-t0-2:after {
        content: '' !important;
        width: 1px !important;
        position: absolute !important;
        left: 0 !important;
        top: 25% !important;
        height:50% !important;
        background-color: #013374 !important; // The color of your border
      }
}

And I’m having trouble accessing specific tab scss by id or classname.
Any ideas?

Posts: 1

Participants: 1

Read full topic

Ionic 4 - Windows platform is not working

$
0
0

@veerhunter wrote:

Ionic 4 windows platform is not working.

“dependencies”: {
@angular/animations”: “^7.2.2”,
@angular/cdk”: “^7.2.2”,
@angular/common”: “^7.2.2”,
@angular/core”: “^7.2.2”,
@angular/forms”: “^7.2.2”,
@angular/http”: “^7.2.2”,
@angular/material”: “^7.2.2”,
@angular/platform-browser”: “^7.2.2”,
@angular/platform-browser-dynamic”: “^7.2.2”,
@angular/router”: “^7.2.2”,
@ionic-native/core”: “^5.0.0”,
@ionic-native/file”: “^5.0.0”,
@ionic-native/http”: “^5.0.0”,
@ionic-native/splash-screen”: “^5.0.0”,
@ionic-native/status-bar”: “^5.1.0”,
@ionic/angular”: “^4.0.0”,
@ngx-translate/core”: “^11.0.1”,
@ngx-translate/http-loader”: “^4.0.0”,
“chart.js”: “^2.7.3”,
“cordova”: “8.1.2”,
“cordova-android”: “7.0.0”,
“cordova-android-support-gradle-release”: “^2.0.1”,
“cordova-plugin-advanced-http”: “2.0.4”,
“cordova-plugin-device”: “^2.0.2”,
“cordova-plugin-file”: “^6.0.1”,
“cordova-plugin-file-transfer”: “^1.7.1”,
“cordova-plugin-ionic-keyboard”: “^2.1.3”,
“cordova-plugin-ionic-webview”: “3.1.1”,
“cordova-plugin-splashscreen”: “^5.0.2”,
“cordova-plugin-statusbar”: “2.4.2”,
“cordova-plugin-whitelist”: “^1.3.3”,
“cordova-windows”: “6.0.1”,
“core-js”: “^2.5.4”,
“ng2-charts”: “^1.6.0”,
“rxjs”: “^6.3.3”,
“zone.js”: “~0.8.29”
}

This is my project state.
Please help me. Thanks.

Posts: 1

Participants: 1

Read full topic

What is the right component to simulate bus seats arrangement

$
0
0

@salad-gg wrote:

Hi there;

Can someone please suggest to me the appropriate component to use to display a bus sitting arrangement. My guess is using grid but I want to be sure before I start the actual coding.

Posts: 1

Participants: 1

Read full topic

Multiple ionic 3 app to single ionic app

$
0
0

@amalk wrote:

Hi,

I need to merge two ionic v3 application in to one single project without breaking overall structure,
Both app should work individually,

For Example i needed to merge two existing application in ionic v3 (Car pooling application and bus booking application in a same project)

The customer can choose anyone of two application when they open the main project application
Please help me out.

I dont know to explain it more than this.

Posts: 1

Participants: 1

Read full topic

Bug ionic 4

$
0
0

@fahd123 wrote:

I have one bug when i cklick back the page , page.ts he don’t execute
whyyy??

ngOnInit() {

      
      this.storage.get('id').then((res)=>{
        if(res) {
          
          this.router.navigate(['espace-client']);
        }
        
      });
        
      
  }

this code don’t execut when click back

Posts: 3

Participants: 2

Read full topic

Viewing all 48983 articles
Browse latest View live


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