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

Is Angular 8 compatible with ionic 4

$
0
0

@TheAnonymousMode wrote:

Hi,

Angular 8 is not available. Is it compatible with Ionic 4 app? My dependencies are:

"@ionic-native/core": "^5.0.0",
"@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/status-bar": "^5.0.0",
"@ionic/angular": "^4.1.0",

Thx

Posts: 1

Participants: 1

Read full topic


Ionic form-data is not uploading

$
0
0

@swanand6300 wrote:

Hi All,

I tried to upload my image file using REST api with form data but every time i get this below error.

TypeError: Cannot read property ‘length’ of undefined
at Object.keys.forEach.name (vendor.js:7159)
at Array.forEach ()
at HttpHeaders.lazyInit (vendor.js:7151)
at HttpHeaders.init (vendor.js:7267)
at HttpHeaders.forEach (vendor.js:7357)
at Observable.rxjs__WEBPACK_IMPORTED_MODULE_1__.Observable [as _subscribe] (vendor.js:8756)
at Observable._trySubscribe (vendor.js:100672)
at Observable.subscribe (vendor.js:100658)
at subscribeToResult (vendor.js:110705)
at MergeMapSubscriber._innerSub (vendor.js:105935)

I have no clue why this is happening. Please help

Posts: 1

Participants: 1

Read full topic

Ion-slides bugs when modal appear on press

$
0
0

@Nasco wrote:

Hi there, I have the following structure

<ion-slides>
 <ion-slide>
  <button tappable (click)="executeClickFunc()" (press)="executePressFunc()">Button 1</button>
 </ion-slide>

<ion-slide>
  <button tappable (click)="executeClickFunc()" (press)="executePressFunc()">Button 2</button>
 </ion-slide>

<ion-slide>
  <button tappable (click)="executeClickFunc()" (press)="executePressFunc()">Button 3</button>
 </ion-slide>
<ion-slides>

So the issue comes when on executePressFunc() I’m opening a modal (with the modalController) , and after modal closing, the slides are still being dragged (left or right) when moving with the mouse ( the focus on the slider is not lost ).

I’ve tried many things like lockSwipes(), touchRatio , also tried to swiperWrapper.blur() the swiper wrapper before the modal opens so it can lose focus… nothing works… :frowning: Would appreciate any help.

Posts: 1

Participants: 1

Read full topic

IOS Issue ATS Error

$
0
0

@sagarpatil18 wrote:

We are integrating Microsoft office 365 with Keycloak Identity Server where we are facing an issue while building an IOS APP
The same build Android is Working fine but while running on IOS I am getting the this below error

2019-05-29 17:19:58.682617+0530 AttraLIVE[38809:642378] [] nw_socket_handle_socket_event [C13.1:2] Socket SO_ERROR [61: Connection refused]

2019-05-29 17:19:58.685005+0530 AttraLIVE[38809:642378] [] nw_socket_handle_socket_event [C13.2:2] Socket SO_ERROR [61: Connection refused]

2019-05-29 17:19:58.685736+0530 AttraLIVE[38809:642378] TIC TCP Conn Failed [13:0x600000c6c480]: 1:61 Err(61)

2019-05-29 17:19:58.689168+0530 AttraLIVE[38809:642378] Task <9D4D3BBD-656E-4B84-AD79-1672229058CB>.<0> HTTP load failed (error code: -1004 [1:61])

2019-05-29 17:19:58.690264+0530 AttraLIVE[38809:642378] NSURLConnection finished with error - code -1004

2019-05-29 17:19:58.706103+0530 AttraLIVE[38809:642159] ERROR: Error initalizing Keycloak in main.ts Error: No NgModule metadata found for ‘function (){}’.

2019-05-29 17:19:58.708662+0530 AttraLIVE[38809:642159] webView:didFailLoadWithError - -1004: Could not connect to the server.

2019-05-29 17:21:47.670971+0530 AttraLIVE[38809:643524] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C1.1:2][0x7fd8e5f1d670] get output frames failed, state 8196

2019-05-29 17:21:47.671170+0530 AttraLIVE[38809:643524] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C1.1:2][0x7fd8e5f1d670] get output frames failed, state 8196

2019-05-29 17:21:47.672004+0530 AttraLIVE[38809:643524] TIC Read Status [1:0x0]: 1:57

2019-05-29 17:21:47.672131+0530 AttraLIVE[38809:643524] TIC Read Status [1:0x0]: 1:57

2019-05-29 17:21:48.588899+0530 AttraLIVE[38809:643524] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C5.1:2][0x7fd8e5f2d750] get output frames failed, state 8196

2019-05-29 17:21:48.589294+0530 AttraLIVE[38809:643524] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C5.1:2][0x7fd8e5f2d750] get output frames failed, state 8196

2019-05-29 17:21:48.589714+0530 AttraLIVE[38809:643524] TIC Read Status [5:0x0]: 1:57

2019-05-29 17:21:48.589810+0530 AttraLIVE[38809:643524] TIC Read Status [5:0x0]: 1:57

2019-05-29 17:22:02.464466+0530 AttraLIVE[38809:643526] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C14.1:2][0x7fd8e5f2c1d0] get output frames failed, state 8196

2019-05-29 17:22:02.464643+0530 AttraLIVE[38809:643526] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C14.1:2][0x7fd8e5f2c1d0] get output frames failed, state 8196

2019-05-29 17:22:02.465100+0530 AttraLIVE[38809:643526] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C15.1:2][0x7fd8e5f6b970] get output frames failed, state 8196

2019-05-29 17:22:02.465273+0530 AttraLIVE[38809:643526] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C15.1:2][0x7fd8e5f6b970] get output frames failed, state 8196

2019-05-29 17:22:02.465589+0530 AttraLIVE[38809:643526] TIC Read Status [14:0x0]: 1:57

2019-05-29 17:22:02.465741+0530 AttraLIVE[38809:643526] TIC Read Status [14:0x0]: 1:57

2019-05-29 17:22:02.466111+0530 AttraLIVE[38809:643526] TIC Read Status [15:0x0]: 1:57

2019-05-29 17:22:02.466236+0530 AttraLIVE[38809:643526] TIC Read Status [15:0x0]: 1:57

2019-05-29 17:23:47.682834+0530 AttraLIVE[38809:644073] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C3.1:2][0x7fd8e5c33fb0] get output frames failed, state 8196

2019-05-29 17:23:47.683078+0530 AttraLIVE[38809:644073] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C3.1:2][0x7fd8e5c33fb0] get output frames failed, state 8196

2019-05-29 17:23:47.683438+0530 AttraLIVE[38809:644073] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C4.1:2][0x7fd8e5c3e9f0] get output frames failed, state 8196

2019-05-29 17:23:47.683613+0530 AttraLIVE[38809:644073] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C4.1:2][0x7fd8e5c3e9f0] get output frames failed, state 8196

I tried many ways in most of the forum I have seen its related ATS network related issue to overcome that I added below code into info.plist
NSAppTransportSecurity

NSAllowsArbitraryLoads

NSExceptionDomains

yourserver.com

NSIncludesSubdomains

NSExceptionAllowsInsecureHTTPLoads

NSExceptionMinimumTLSVersion

TLSv1.1

But still no luck we are getting the same error

Posts: 1

Participants: 1

Read full topic

Top spacing without using a header and toolbar, Ionic 4

$
0
0

@wilprim wrote:

I am playing around with Ionic and am trying to figure out how to build a UI that doesn’t include a header and toolbar. When I try to do this, however, all my content doesn’t get padded down below status bar (and notch for iPhone x) Is there a way to do this? I have thought about adding a padding-top to the and then changing that padding using the Platform utility but I want to first see if there is something easier I may be missing.

Here is my code for the content:

<ion-content>
    
    <ion-list lines='full'>
      <ion-list-header>
        Todos
      </ion-list-header>
      <ion-item-sliding *ngFor="let todo of todos">
        <ion-item-options>
          <ion-item-option side="end">
            Delete
          </ion-item-option>
        </ion-item-options>
        <ion-item>
          <ion-label>
            {{ todo.data.title }} 
          </ion-label>
        </ion-item>
      </ion-item-sliding>
    </ion-list>
    <ion-infinite-scroll threshold="0" (ionInfinite)="loadData($event)">
      <ion-infinite-scroll-content
        loadingSpinner="bubbles"
        loadingText="Loading more data...">
      </ion-infinite-scroll-content>
    </ion-infinite-scroll>
  </ion-content>

Here is a screenshot of iphone 8 and X (pardon my drawing for the notch ;))

Posts: 1

Participants: 1

Read full topic

How to store images in a database as binary instead of base64

$
0
0

@SanduCuragau wrote:

Tl:DR: i keep images as base64 strings in the database but I wanna start saving them as binary because i’ve heard it occupies less space. I don’t know where to get started in converting the image to binary and the binary to image.

Hey I have an app where I use camera plugin and allow the users to browse through their gallery and choose an image to use as their profile’s avatar, that image when chosen is returned as a base64 string and saved on the database in the user’s table. Later the app can get his database row and keep it as an object locally, which brings the image as a property and then I simply make an img take the base64 string and it displays the image just like that.

PS: im using mysql

this is some data from my test app so its okay to show it

Thing is, I read a post on stackoverflow where an user said how base64 strings are 33% heavier than saving right away the binary of the image, so I’m now wondering, how can I achieve this? I’ve googled around but didn’t figure anything out.

Code I use to get the image and then update the image locally and also update the database with that image

  async getPhoto(sourceType:number) {
    const options: CameraOptions = {
      quality: 100,
      targetHeight: 300,
      destinationType: this.camera.DestinationType.DATA_URL,
      encodingType: this.camera.EncodingType.JPEG,
      mediaType: this.camera.MediaType.PICTURE,
      correctOrientation: true,
      sourceType: sourceType,
      saveToPhotoAlbum: false,
      allowEdit: true
    }

    this.camera.getPicture(options).then((imageData) => {
      let base64Image = 'data:image/jpeg;base64,' + imageData;
      // set the image locally but also update the database
      this.authenticationService.utilizador.avatar = base64Image;
      this.utilizadorService.update(this.authenticationService.utilizador);
    }, (err) => {
      // Handle error
    });
  }

This is me using the image

        <ion-avatar class="custom-avatar">
            <img src="{{this.authenticationService.utilizador.avatar}}" alt="" srcset="">
        </ion-avatar>

Posts: 1

Participants: 1

Read full topic

How can you make a Modal Service without Circle Dependency?

$
0
0

@ctfrancia wrote:

I am using Ionic-4 (there is no option to specify v4 in the tags) and I cannot make a Modal Service without creating a Circular Dependency.

import { ModalController } from '@ionic/angular';
@Injectable({
  providedIn: 'root'
})
export class ModalService {

  constructor(
    private modalCtrl: ModalController   
  ) { }

  public async openChat(contact: Contact) {
    const chat = await this.modalCtrl.create({
      component: ChatModalPage,
      animated: true,
      componentProps: {contact}
    });
    await chat.present();
  }

  public async openProfile(contact: Contact) {
    const profile = await this.modalCtrl.create({
      component: ProfileComponent,
      animated: true,
      componentProps: {contact}
    });
    return await profile.present();
  }

Chat Modal Page

import { ModalService } from 'src/app/Services/Modal/modal.service';

export class ChatModalPage {
  constructor(
    private modalService: ModalService,
    ) { }

  public async openProfile() {
    this.modalService.openProfile(this.contact); 
  }
}

client:154 Circular dependency detected:
src/app/Services/Modal/modal.service.ts -> src/Components/chat-modal/chat-modal.page.ts -> src/app/Services/Modal/modal.service.ts

Posts: 9

Participants: 2

Read full topic

Problem while getting Promise return

$
0
0

@Fabricio10 wrote:

I’m in a firebase ionic project, and I’m facing some problems. I’m newbie in mobile development, so my problem is when getting a return of a update command in firebase. In my provider I have:

private clientCollection: AngularFirestoreCollection<Client>;
constructor(
    public db: AngularFirestore
  ) {
    this.clientCollection = db.collection<Client>('clients');
    this.historicoCollection = db.collection<Historico>('historico');
  }

And my function after, receive a Client Object and a key of firebase register:

updateUser(user: any, key: string){
    return this.clientCollection.doc<Client>(key).update(user)
  }

My scan function, calls updateUser in provider:

saveUser(data: Client){
      this.meuLoader.dismiss();
    
      this.db.getUserPassword(data.password).subscribe((res) => {
        if(res.length){
          data.key = res[0].key;
          //this.goToResult(data);
        }
      });         

        this.db.updateUser(data, data.key).then((res) => {
          this.goToResult(data);
        }).catch((error) => {
            this.alertCtrl.create({
              title: 'retorno',
              subTitle: 'Erro no retorno da promisse',
              buttons: ['Dismiss']
            }).present();
        })      
  }

The saveUser function calls two functions in provider. Is there a problem making this way? When I run on my device, nothing works. The node does not update…

Thanks

Posts: 3

Participants: 2

Read full topic


Popover draggable and resizable with an Ionic4 PWA

$
0
0

@ioclaudio wrote:

Hi,
my app has a PWA version in which I use popovers to show some pages.
According to you is it possible to make these popover draggable and/or resizable?

Could I succeed in achieving this by working only with CSS?
Have you ever seen or done something similar?

Thank you very much

cld

Posts: 1

Participants: 1

Read full topic

Chema validation failed ".builders['app-shell']" should have required property 'class'

$
0
0

@lautarolorenz wrote:

on “ionic serve”

Schema validation failed with the following errors:
Data path “.builders[‘app-shell’]” should have required property ‘class’.
[ERROR] ng has unexpectedly closed (exit code 1).
The Ionic CLI will exit. Please check any output above for error details.

Ionic:

ionic (Ionic CLI) : 4.12.0 (C:\Users\coco\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.4.2
@angular-devkit/build-angular : 0.800.0
@angular-devkit/schematics : 7.3.9
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.5.1

Cordova:

cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : none
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview
2.2.3, (and 7 other plugins)

System:

NodeJS : v10.0.0 (C:\Program Files\nodejs\node.exe)
npm : 6.9.0
OS : Windows 10

angular.json

{
  "$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
  "version": 1,
  "defaultProject": "app",
  "newProjectRoot": "projects",
  "projects": {
    "app": {
      "root": "",
      "sourceRoot": "src",
      "projectType": "application",
      "prefix": "app",
      "schematics": {},
      "architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
            "progress": false,
            "outputPath": "www",
            "index": "src/index.html",
            "main": "src/main.ts",
            "polyfills": "src/polyfills.ts",
            "tsConfig": "src/tsconfig.app.json",
            "assets": [
              {
                "glob": "**/*",
                "input": "src/assets",
                "output": "assets"
              },
              {
                "glob": "**/*.svg",
                "input": "node_modules/ionicons/dist/ionicons/svg",
                "output": "./svg"
              }
            ],
            "styles": [
              {
                "input": "src/theme/variables.scss"
              },
              {
                "input": "src/global.scss"
              }
            ],
            "scripts": []
          },
          "configurations": {
            "production": {
              "fileReplacements": [
                {
                  "replace": "src/environments/environment.ts",
                  "with": "src/environments/environment.prod.ts"
                }
              ],
              "optimization": true,
              "outputHashing": "all",
              "sourceMap": false,
              "extractCss": true,
              "namedChunks": false,
              "aot": true,
              "extractLicenses": true,
              "vendorChunk": false,
              "buildOptimizer": true
            }
          }
        },
        "serve": {
          "builder": "@angular-devkit/build-angular:dev-server",
          "options": {
            "browserTarget": "app:build"
          },
          "configurations": {
            "production": {
              "browserTarget": "app:build:production"
            }
          }
        },
        "extract-i18n": {
          "builder": "@angular-devkit/build-angular:extract-i18n",
          "options": {
            "browserTarget": "app:build"
          }
        },
        "test": {
          "builder": "@angular-devkit/build-angular:karma",
          "options": {
            "main": "src/test.ts",
            "polyfills": "src/polyfills.ts",
            "tsConfig": "src/tsconfig.spec.json",
            "karmaConfig": "src/karma.conf.js",
            "styles": [],
            "scripts": [],
            "assets": [
              {
                "glob": "favicon.ico",
                "input": "src/",
                "output": "/"
              },
              {
                "glob": "**/*",
                "input": "src/assets",
                "output": "/assets"
              }
            ]
          }
        },
        "lint": {
          "builder": "@angular-devkit/build-angular:tslint",
          "options": {
            "tsConfig": [
              "src/tsconfig.app.json",
              "src/tsconfig.spec.json"
            ],
            "exclude": [
              "**/node_modules/**"
            ]
          }
        },
        "ionic-cordova-build": {
          "builder": "@ionic/angular-toolkit:cordova-build",
          "options": {
            "browserTarget": "app:build"
          },
          "configurations": {
            "production": {
              "browserTarget": "app:build:production"
            }
          }
        },
        "ionic-cordova-serve": {
          "builder": "@ionic/angular-toolkit:cordova-serve",
          "options": {
            "cordovaBuildTarget": "app:ionic-cordova-build",
            "devServerTarget": "app:serve"
          },
          "configurations": {
            "production": {
              "cordovaBuildTarget": "app:ionic-cordova-build:production",
              "devServerTarget": "app:serve:production"
            }
          }
        }
      }
    },
    "app-e2e": {
      "root": "e2e/",
      "projectType": "application",
      "architect": {
        "e2e": {
          "builder": "@angular-devkit/build-angular:protractor",
          "options": {
            "protractorConfig": "e2e/protractor.conf.js",
            "devServerTarget": "app:serve"
          }
        },
        "lint": {
          "builder": "@angular-devkit/build-angular:tslint",
          "options": {
            "tsConfig": "e2e/tsconfig.e2e.json",
            "exclude": [
              "**/node_modules/**"
            ]
          }
        }
      }
    }
  },
  "cli": {
    "defaultCollection": "@ionic/angular-toolkit"
  },
  "schematics": {
    "@ionic/angular-toolkit:component": {
      "styleext": "scss"
    },
    "@ionic/angular-toolkit:page": {
      "styleext": "scss"
    }
  }
}

Posts: 2

Participants: 1

Read full topic

[ERROR] Network connectivity error occurred, are you offline?

Compilation ipa credentials problem : IOS

$
0
0

@ericcoquelin wrote:

Hi All,
I have an app.
It’s app id (in the config.xml) is weel configured in the console of apple developers.

I’ve created all required files on ubuntu (.cer file, provisioning and i also have the p12 file)
I’ve got all the required files.

But When Uploading my app (under package->certificates) in the Pro platform, i get the following error:

“There was an error while submitting your credentials. Certificate, Provisioning Profile, or Cerftificate password invalid.”

I am sure the password is correct.
I’ve followed each step given in this link :

https://www.ucodice.com/blog/how-to-create-ipa-for-ios-device-without-macbook-or-xcode/

What am i missing? (I also made sure the bundle id on my app account matched the one on the config.xml file)

Please help ?
Thanks.

Posts: 1

Participants: 1

Read full topic

Ionic CLI 5

Deploy Ionic 4 App in IIS

$
0
0

@magar-dev wrote:

Hello, guys.

I Publish an app in IIS Windows 10, from the IIS the application works, but if I run it from the internet browser, the following error is displayed:

HTTP Error 404.0 - Not Found.

Posts: 3

Participants: 2

Read full topic

CANNOT FIND MODULE './image-viewer.directive

$
0
0

@adsegzy wrote:

I am working on an app and when i tried running ionic serve but it’s showing me a RUNTIME ERROR CANNOT FIND MODULE './image-viewer.directoveerror

I have tried installing image viewer severally but it’s not working. Please what do I do?
Thanks

Posts: 1

Participants: 1

Read full topic


How To Navigate To Tabbed Page With Parameters

$
0
0

@Shmoji wrote:

I have recently learned Angular routing and navigation in Ionic 4. I learned how you can use /:id to pass params and go to different pages based on param.

I also learned how to create a tabbed app.

However, I cannot seem to get an app with both of these to work. The routing is crazy and I cannot figure it out. Does anyone know of any examples that do this?

Posts: 1

Participants: 1

Read full topic

Plz help me, i dont kwnow what does this error mean

IONIC 4 modal not working

Draggable ion-fab

$
0
0

@premktr wrote:

Can some plz tell me how to make draggable ion-fab. please give one example with so I can understand better.thanks.

Posts: 1

Participants: 1

Read full topic

Alternate Flash Icon between black/white on CameraPreview based on background color

$
0
0

@MeterMoDev wrote:

Sorry if this is a silly question, I am quite new to Ionic Cordova and I haven’t been able to figure this one out yet.

We use this plugin for an app with a camera: https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview

We also have a Flash On/Off icon (2 images that alternate), but it’s white, so when the background is bright, it would be useful to change the icon to black (obviously by inserting a different image).

Thus, I assume I need to get the actual background brightness somehow whilst using the camera.

Any help would be appreciated.

Posts: 1

Participants: 1

Read full topic

Viewing all 49384 articles
Browse latest View live


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