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

Ios build failing Undefined symbol: _OBJC_CLASS_$_GSDK_GTMLogger

$
0
0

ios build is failing with below error

** BUILD FAILED **

The following build commands failed:
CompileC /Users/niteshpundra/Library/Developer/Xcode/DerivedData/Business_QuSe-foxneltminojniayetveeacnjnof/Build/Intermediates.noindex/Business\ QuSe.build/Debug-iphonesimulator/Business\ QuSe.build/Objects-normal/x86_64/CDVFileTransfer.o /Users/niteshpundra/Documents/ionic/phonegap/platforms/ios/Business\ QuSe/Plugins/cordova-plugin-file-transfer/CDVFileTransfer.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
xcodebuild: Command failed with exit code 65
[ERROR] An error occurred while running subprocess cordova.

    cordova build ios exited with exit code 65.

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

Undefined symbol: OBJC_CLASS$_GSDK_GTMLogger

Ionic:

ionic (Ionic CLI) : 4.6.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.10
@ionic/app-scripts : 3.2.3

Cordova:

cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 9.0.0, ios 6.2.0-nightly.2020.7.2.e6e90e07
Cordova Plugins : cordova-plugin-ionic-webview 5.0.0, (and 32 other plugins)

System:

ios-deploy : 1.9.4
ios-sim : 8.0.2
NodeJS : v10.16.0 (/usr/local/bin/node)
npm : 6.9.0
OS : macOS
Xcode : Xcode 11.5 Build version 11E608c

1 post - 1 participant

Read full topic


ANDROID_SDK_ROOT=undefined (recommended setting)

$
0
0

Ionic:

Ionic CLI : 6.10.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.0.0
@angular-devkit/build-angular : 0.803.25
@angular-devkit/schematics : 8.3.25
@angular/cli : 8.3.25
@ionic/angular-toolkit : 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 : 0.15.1
native-run : 1.0.0

System:

ios-deploy : 1.10.0
ios-sim : 8.0.2
NodeJS : v12.18.1 (/usr/local/bin/node)
npm : 6.14.5
OS : macOS Catalina
Xcode : Xcode 11.5 Build version 11E608c

While l am try to build android , l have following error :

ANDROID_SDK_ROOT=undefined (recommended setting)

ANDROID_HOME=/Users/macbook/Library/Android/sdk (DEPRECATED)

Requirements check failed for JDK 8 (‘1.8.*’)! Detected version: 14.0.1

Check your ANDROID_SDK_ROOT / JAVA_HOME / PATH environment variables.

.bash_profile

export ANDROID_SDK_ROOT=/Library/Android/sdk/platform-tools
export ANDROID_HOME=/Library/Android/sdk/
export JAVA_HOME=$(/usr/libexec/java_home)

l am already installed Android Studio and installed all sdk platforms tools .

Any idea please ?

1 post - 1 participant

Read full topic

Square columns inside grid [Solved]

$
0
0

I’m trying to make square columns, the problem is that I don’t know how to set the height of the column equal to the width of it.

This is the html:

<ion-grid>
  <ion-row>
    <ion-col size="6">
      <ion-card>
      </ion-card>
    </ion-col>
    <ion-col size="6">
      <ion-card>
      </ion-card>
    </ion-col>
  </ion-row>
</ion-grid>

How can I set the scss values of the column to make it square?

ion-col{
  height: ?;
}

6 posts - 3 participants

Read full topic

Error While Build - Google Service

$
0
0
  • What went wrong:
    Could not determine the dependencies of task ‘:app:preDebugBuild’.
    In project ‘app’ a resolved Google Play services library dependency depends on another at an exact version (e.g. “[19.0.
    1]”, but isn’t being resolved to that version. Behavior exhibited by the library will be unknown.


    Dependency failing: com.google.firebase:firebase-messaging:19.0.1 -> com.google.firebase:firebase-iid@[19.0.1], but fire
    base-iid version was 20.1.5.


    The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
    ifact with the issue.
    – Project ‘app’ depends onto com.google.firebase:firebase-messaging@19.+
    – Project ‘app’ depends onto com.google.android.gms:play-services-tagmanager@16.0.8
    – Project ‘app’ depends onto com.google.firebase:firebase-perf@18.+
    – Project ‘app’ depends onto com.google.android.gms:play-services-measurement-api@17.4.3
    – Project ‘app’ depends onto com.google.firebase:firebase-core@17.+
    – Project ‘app’ depends onto com.google.android.gms:play-services-tagmanager@16.+
    – Project ‘app’ depends onto com.google.firebase:firebase-config@18.0.0
    – Project ‘app’ depends onto com.google.firebase:firebase-iid@20.1.5
    – Project ‘app’ depends onto com.google.firebase:firebase-config@18.+
    – Project ‘app’ depends onto com.google.android.gms:play-services-tagmanager-api@16.0.8
    – Project ‘app’ depends onto com.google.firebase:firebase-analytics@17.4.3
    – Project ‘app’ depends onto com.google.firebase:firebase-perf@18.0.1
    – Project ‘app’ depends onto com.google.firebase:firebase-messaging@19.0.1
    – Project ‘app’ depends onto com.google.firebase:firebase-core@17.4.3


    For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
    endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://github.com/google/play-services-plugins and disable by adding “googleServices { disableVersionCheck = false }” to
    your b
    uild.gradle file.
    – Project ‘app’ depends onto com.google.firebase:firebase-core@17.4.3


    For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
    endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://github.com/google/play-services-plugins and disable by adding “googleServices { disableVersionCheck = false }” to
    your b
    uild.gradle file.

Can somebody help on this

1 post - 1 participant

Read full topic

How to subtract number method parameters

$
0
0

export class Tab2Page implements OnInit {
categories: AngularFireList;
userBlnc // balance amount of user in database
pricebuy:Number = 0 // price number coming from method parameters

constructor( public af: AngularFireDatabase,public afAuth: AngularFireAuth, public router: Router,
public a : LoadingController,public m : AlertController){}

ngOnInit(): void {
this.afAuth.authState.subscribe(async user => {
if (user) {
let a = await this.a.create({})
a.present();
this.af.list("/users/"+user.uid+’/profile’).valueChanges().subscribe((data: any) => {
this.userBlnc = data;
})
} else {
this.router.navigate([‘signin’])
}

})

}

// getting price parameters
async open(a){
const alert = await this.m.create({
cssClass: ‘my-custom-class’,
message: “شراء فئة” + a.name + " بسعر " + a.price + " د٫ع ",
buttons: [
{
text: ‘الغاء’,
role: ‘cancel’,
handler: () => {
console.log(‘Confirm Cancel’);
}
}, {
text: ‘شراء’,
cssClass:‘btn_buy’,
handler: () => {
this.cut(a);
}
}
]
});

await alert.present();

}

// method excite to subtract price number
async cut(a){
console.log(this.userBlnc[0])
this.pricebuy = a.price
this.userBlnc[0]
let fpaValue : number=0
if (Number(a.price) && Number(this.userBlnc[0])) {
if (Number(this.userBlnc[0]) > Number(a.price)) {
fpaValue = Number(a.price) - Number(this.userBlnc[0]);
console.log(fpaValue)
alert(fpaValue)
} else{
alert(‘no balance engough’)
}
}

}

}

the output is NaN. any idea please?

1 post - 1 participant

Read full topic

Accessibility / a11y, i18n and Ionic 5

$
0
0

I am having accessibility issue with screen readers. It is more of annoyance but maybe someone has a solution?

When using the screen reader on iOS (not tested on Android yet), it speaks out “Ionic App” on every page change because that is in the src/index.html in the <head><title> html tags. This title doesn’t change with page changes. This was noticed in Accessibility improvements #11386 on GitHub. The default text for this is “Ionic App” unless you changed it.

Is there a way to make it change to the internationalized title of the actual page changed to (as in the <ion-title> tag)? Or maybe at least the title of the app in the current language? This app has support for many languages.

1 post - 1 participant

Read full topic

White screen on iPAD

$
0
0

Hi guys,

My ionic 4 app is working fine in iPhones and Androids. But when I upload it to appstore, they get a white screen on iPAD and reject my app. I tested it on all XCode iPads and it works fine, but on the real device it crashes. On real iPhones its working fine.

Can someone have any ideas that could help?

Thanks

1 post - 1 participant

Read full topic

Can `ion-menu` pop a page instead of pushing a page?

$
0
0

It seems like navigating between menu options using ion-menu will navigate forward (push the page to a stack). Is this intentional?

Is it possible to pop the page from the stack when navigating between menu options?

I realized this problem when I am navigating between two different pages using the ion-menu. It only runs each of the page’s ngOnInit() once, and since the page isn’t popped off, the ngOnInit() will not run again the next time.

I know a solution is to use ionViewWillEnter() or ionWillDidEnter(), but I was curious if there was still a way to pop a page instead of pushing a page to the stack.

5 posts - 2 participants

Read full topic


getTab of IonTabs Does Not Exist in Ionic Framework 5.2.2

$
0
0

I’m trying to access a tab to change its label in my project. The IonTabs documentation indicates there is a getTab method; however, it doesn’t look like it exists. I see the other expected methods but not getTab.

1 post - 1 participant

Read full topic

How to play audio in Ionic React

$
0
0

I have a little game app in the playstore and i want to add some audio when the user press some buttons. I’ve struggled with different methods/plugins but i can’t find the way. I’ve tried

1- const audio = new Audio(‘path/to/audioFile.mp3’);
audio.play();
In this case it sounds but it’s kinda buggy (somethimes delayed, sometimes do not sound at all)
2- Using the capacitor comunity plugin https://www.npmjs.com/package/@capacitor-community/native-audio.
3- Using the native-audio cordova plugin.
4- Usin the media cordova plugin.

None of them worked for me. Has anyone achieved this?. Any recommendations / guidance would be apreciated. Thanks in advance

1 post - 1 participant

Read full topic

How to mock capacitor dependecy

$
0
0

I’m writing some unit test for a file system service in my project. It has a capacitor plugin dependency so I need to mock it. How do I do this?

1 post - 1 participant

Read full topic

Split pane max width

$
0
0

Hi,
How to set split pane max width, I tried setting css variable --side-max-width as per documentation , but its not working, any idea how to set max width on side pane

1 post - 1 participant

Read full topic

[Accessibility] Make Ionic Toast compatible with Screen Reader

$
0
0

I am trying to make my app more screen reader compatible. I use Google TalkBack. My current obstacle occured while working with Toasts.
I created a button that creates and presents a simple toast. Since the screen reader completely ignores them, I added the following attributes to the DOM:

  • role=‘alert’
  • aria-live=‘root’
  • aria-label=‘message’

Against my expectation the screen reader describes the button twice and the toast afterwards, when i click the button. This only happens once. If I click the button again, the order of read elements is as I wanted it to be from the beginning.
My guess is that the focus jumps back to the button (once) and is therefor read twice.

Does anyone know how I can fix this? What causes the focus to return to the button?

1 post - 1 participant

Read full topic

How to get the values of dynamically created input fields before submitting in Angular/Ionic?

$
0
0

I would like to get the values of dynamically created input fields before submitting in Angular/Ionic before submitting but I don’t find the way. My final goal is to do a sum of these values.

My html:

<ion-slides (ionSlideDidChange)="slideChanged()">
  <ion-slide *ngFor="let custo of (customers | async)">
    <div class="slide"> 
      <ion-item *ngFor="let stuff of (ordereditems | async)"> 
        <ion-label position="floating" color="primary"> Paid amount</ion-label>    
        <ion-input type="text" formControlName="amount_{{custo.pe_id}}"></ion-input>            
      </ion-item>           
    </div>
  </ion-slide>
</ion-slides>

My ts:

this.customers.subscribe((value) =>
{
  for (let c of value) 
  { 
    console.log(this.validations_form.controls[`amount_${c.pe_id}`]);
  }
});

Thanks for reading so far & Please help :slight_smile:

1 post - 1 participant

Read full topic

Is it possible to be the user change ionic primary/secondary/tertiary color?

$
0
0

Hi guys,

I was wondering if I could make the user choose the app colors? Is it possible?

For example: I set the primary color of my app “green”, but I wanted to give the choice to the user if he/she wants to change it.

Thank you for your attention.

1 post - 1 participant

Read full topic


No output when --prod is applied?

$
0
0

I am upgrading a PWA app from ionic 4/Angular 8 to Ionic 5/Angular 9.
Since the upgrade I have problems when I do a “ionic build --prod” command, before it was working fine, also with “–prod”.

Following lines gives an output in “ionic build” mode correctly, but gives no output with “ionic build --prod” (there is no output read at all/stays empty but should log on input):

console.log('output barcode2 : ', this.rows.at(idx).value.barcode2)

I think it is ionic related and not angular, but I’m not sure. Anyway, I can not seem to find why the “–prod” flag produces this issue. Can someone inform me ?

Thanks

html:

<div [formGroup]="timeform" novalidate align="center">
<ion-grid>
  <ion-row *ngFor="let row of timeform.get('rows')?.controls; let idx = index;" class="ion-justify-content-center">
     <ion-col>
        <ion-row>
         <ion-col size="10">
           <ion-input pattern="[0-9]*" inputmode="decimal" [formControl]="row.get('barcode2')"
            formControlName="barcode2" placeholder="..." #Field2 (ionChange)="findActivity(idx)" 
            (keydown)="isValidNumber($event)"></ion-input>
      ...
     </ion-col>
    </ion-row>
   </ion-col>
  </ion-row>
</ion-grid>
</div>

ts

findActivity(idx) {
      console.log('index    : ', idx)
      console.log('barcode2 : ', this.rows.at(idx).value)
      console.log('barcode2 : ', this.rows.at(idx).value.barcode2)
      console.log('barcode2 : ', this.rows.at(idx).get('barcode2').value)
  }

package.json

{
  "name": "app",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "https://ionicframework.com/",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^9.1.11",
    "@angular/common": "~9.1.11",
    "@angular/core": "~9.1.11",
    "@angular/forms": "~9.1.11",
    "@angular/platform-browser": "~9.1.11",
    "@angular/platform-browser-dynamic": "~9.1.11",
    "@angular/pwa": "^0.803.28",
    "@angular/router": "~9.1.11",
    "@angular/service-worker": "~9.1.11",
    "@ionic-native/core": "^5.27.0",
    "@ionic-native/splash-screen": "^5.27.0",
    "@ionic-native/status-bar": "^5.27.0",
    "@ionic/angular": "^5.2.3",
    "core-js": "^2.5.4",
    "date-fns": "^2.14.0",
    "idb": "^4.0.5",
    "rxjs": "~6.5.5",
    "tslib": "^1.13.0",
    "zone.js": "~0.10.3"
  },
  "devDependencies": {
    "@angular-devkit/architect": "~0.801.2",
    "@angular-devkit/build-angular": "^0.901.10",
    "@angular-devkit/core": "^9.1.10",
    "@angular-devkit/schematics": "^9.1.10",
    "@angular/cli": "^9.1.10",
    "@angular/compiler": "~9.1.11",
    "@angular/compiler-cli": "~9.1.11",
    "@angular/language-service": "~9.1.11",
    "@ionic/angular-toolkit": "^2.2.0",
    "@types/jasmine": "~3.3.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "^5.2.2",
    "jasmine-core": "~3.4.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.1.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.5.4",
    "protractor": "^5.4.4",
    "ts-node": "~7.0.0",
    "tslint": "~5.15.0",
    "typescript": "~3.8.3"
  },
  "description": "An Ionic project"
}

1 post - 1 participant

Read full topic

Backspace focus previus ion-input

$
0
0

I am having an ion-input. When i run in browser It works fine.

Problem is in Windows appx build. When we type some number in the input field.
And then click else where outside the input field.

Then if i press backspace it erases the number in the ion-input field.
It should not erase.

It works fine in browser.

Please help me.

1 post - 1 participant

Read full topic

Can't get mat-expansion-panel to open in Ionic 5

$
0
0

I am unable to expand a mat-expansion-panel component within an Ionic 5 application.

I have template code as follows

<ion-header>
  <ion-toolbar>
    <ion-title>Jounral Entries</ion-title>
  </ion-toolbar>
</ion-header>

<ion-content>
  <mat-accordion multi disabled="false">
    <mat-expansion-panel *ngFor="let jEntry of journalEntries$ | async" (opened)="handleOpen()" (closed)="handleClosed()" disabled="false">
      <mat-expansion-panel-header disabled="false">
        {{jEntry.name}}
      </mat-expansion-panel-header>
      <div>we got some content</div>
    </mat-expansion-panel>
  </mat-accordion>
  <!-- <mat-accordion clickable>
    <mat-expansion-panel hideToggle>
      <mat-expansion-panel-header>
        <mat-panel-title>
          This is the expansion title
        </mat-panel-title>
        <mat-panel-description>
          This is a summary of the content
        </mat-panel-description>
      </mat-expansion-panel-header>
      <p>This is the primary content of the panel.</p>
    </mat-expansion-panel>
    <mat-expansion-panel (opened)="panelOpenState = true"
                         (closed)="panelOpenState = false">
      <mat-expansion-panel-header>
        <mat-panel-title>
          Self aware panel
        </mat-panel-title>
        <mat-panel-description>
          Currently I am {{panelOpenState ? 'open' : 'closed'}}
        </mat-panel-description>
      </mat-expansion-panel-header>
      <p>I'm visible because I am open</p>
    </mat-expansion-panel>
  </mat-accordion> -->
</ion-content>

I’ve commented out code that comes straight from the angular documentation page as I also tried to use theirs to see if I had anything wrong, and theirs will not work either. The expansion panel does show up and the header content is there, but it isn’t clickable, and the cursor doesn’t turn to the hand like it should for a button and when clicked, the expansion panel doesn’t open.

The module that contains the component displaying the expansion panel:

@NgModule({
  imports: [
    CommonModule,
    SharedModule,
    JournalRoutingModule
  ],
  declarations: [JournalComponent]
})

And SharedModule exports MatExpansionModule. As mentioned it does show up, it just won’t open.

enter image description here

I’ve also found this page that shows pretty much what I’m doing so I can’t figure out what it is

https://www.freakyjolly.com/ionic-angular-material-how-to-install-material-and-use-its-components-in-ionic-app/#.Xv9KVShKhZc

1 post - 1 participant

Read full topic

Show different tabs based on user type

$
0
0

Hello, I have an ionic 5 project in which I need to change the set of tabs based on logged in user. if it is a client or a coach.

I have my code ready to check for type of logged in user in the tabs.page.ts but I do not know how to change the actual pages list.
can I apply an it statement in tabs-routing.module.ts?

thank you so much

1 post - 1 participant

Read full topic

Ionic 5 React - Show Side Menu Only On Some Pages

$
0
0

How can I prevent the side menu from being draggable into view in some pages?

Calling menuController.enable(false, "main") doesn’t work properly because it immediately makes the menu disappear instead of closing it with the appropriate animation. And there is no way to set up a callback for when the menu is closed.

Basically I want to scope my menu to a page and its descendants. How can I do that?

1 post - 1 participant

Read full topic

Viewing all 49422 articles
Browse latest View live


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