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

Httpd won't work/start - plugin not available


When and why NOT to use `--prod` for building?

$
0
0

@Audrey84 wrote:

What would be a reason or time not to use --prod in the build command to get an optimized (smaller, faster) build of my Ionic app? What is the benefit of doing a build without it?

Posts: 1

Participants: 1

Read full topic

Error on Serve

$
0
0

@agelinas2018 wrote:

After updating to ionic 3, and inserting a new src file, I now get this error on running ionic serve

{ Error: A watch configured to watch the following paths failed to start. It likely that a file referenced does not exist: /var/lndFinal/src/assets/**/*, /var/lndFinal/src/index.html, /var/lndFinal/src/manifest.json, /var/lndFinal/src/service-worker.js, /var/lndFinal/node_modules/ionicons/dist/fonts/**/*, /var/lndFinal/node_modules/ionic-angular/fonts/**/*, /var/lndFinal/node_modules/ionic-angular/polyfills/polyfills.js, /var/lndFinal/node_modules/sw-toolbox/sw-toolbox.js
    at new BuildError (/var/lndFinal/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
    at Timeout._onTimeout (/var/lndFinal/node_modules/@ionic/app-scripts/dist/watch.js:71:20)
    at ontimeout (timers.js:471:11)
    at tryOnTimeout (timers.js:306:5)
    at Timer.listOnTimeout (timers.js:266:5) hasBeenLogged: false, isFatal: false }

I have seen similar posts that say to move the manifest.json file and serviceworker.js outside of the asset file, but I do not have those files in my asset folder (which was built in the GUI ionic creator)

Posts: 1

Participants: 1

Read full topic

Cordova iOS Quirks....wait what?!?

$
0
0

@reedrichards wrote:

Cordova introduced some changes in the usage descriptions with their last releases (see http://cordova.apache.org/news/2017/11/10/plugins-release.html)

We have also changed how usage descriptions work in the following plugins: cordova-plugin-camera, cordova-plugin-contacts, cordova-plugin-media, cordova-plugin-geolocation, and cordova-plugin-media-capture. Usage descriptions are required for iOS applications accessing certain apis. Apple wants to know why your app needs certain permissions. We now recommend you add the usage description to your app via edit-config tag. View the iOS Quirks section of the plugin documentation to see an example of how to use it. Here is the example for cordova-plugin-camera.

For example https://github.com/apache/cordova-plugin-camera#ios-quirks

iOS Quirks

Since iOS 10 it’s mandatory to provide an usage description in the info.plist if trying to access privacy-sensitive data. When the system prompts the user to allow access, this usage description string will displayed as part of the permission dialog box, but if you didn’t provide the usage description, the app will crash before showing the dialog. Also, Apple will reject apps that access private data but don’t provide an usage description.

  1. Does that mean that my current app in store is currently freaky crashing on most devices or is that just a warning for upgrade, meaning that from now on I should not forget to provide a description?

  2. It’s me or they forget the internationalization respectively it’s only possible to provide one sting aka one language for the description?

Posts: 1

Participants: 1

Read full topic

Update cordova-android 6.3.0->6.4.0 => Gradle not found

$
0
0

@reedrichards wrote:

I upgraded from cordova-android 6.3.0 to 6.4.0 and also updated Android Studio from 2.3 to 3.0.0 (http://cordova.apache.org/announcements/2017/11/09/android-release.html)

At cordova build time, I’m no facing the error:

ANDROID_HOME=/Users/me/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home
Error: Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio

Any ideas?

Posts: 1

Participants: 1

Read full topic

Angular HttpClient POST request and parameters

$
0
0

@rafarco wrote:

Hello,

I’m having some problems sending an HTTP POST request with Angular’s new HttpClient. The request arrives to the HTTP server, but apparently no parameters are added. Here is the code:

 makeLogin(login: string, pass: string)  {
    const body = {user: login, password: pass};

    this.http.post(this.loginUrl, body)
    .subscribe(data => {...},
err => {
      console.log('Error: ' + err.error);
      console.log('Name: ' + err.name);
      console.log('Message: ' + err.message);
      console.log('Status: ' + err.status);
    });

And I’m only getting this:
Http failure during parsing for http://localhost:8100/api/login

So I’m not sure if I’m passing the parameters to the server the right way. It should receive two post parameters, named user and password, but it doesn’t. I also read there are some issues with some Angular version. I’m running Ionic 3.17.0 and Angular 4.4.4. I’m rather new to Ionic, so maybe I’m just asking a very trivial question. Sorry for that.

Thanks in advance!

Posts: 1

Participants: 1

Read full topic

Devserver with html5 mode urls - avoiding the 404

$
0
0

@ericeslinger wrote:

I’d love it if the devserver had a --html5 switch, or something similar to it. I commented on the github issue that this is pretty easy to fix in the specific situation of My App, at least, I’m not sure if there are more complexities people are dealing with.

The problem is that if you’re using the html5 routing mode, you get urls like /things/1 instead of #/things/1, and that hitting reload in the browser window nets you a 404, because /things/1 is of course sent to the server and routed to “hey, we don’t have that”.

The way I have solved this in the past when I did my own build tooling (gulp, etc) was to have a fallback wildcard route that would just serve index.html. This works by injecting app.get(/^[\w\/]*$/, serveIndex); into @ionic/app-scripts/dist/dev-server.js right before return app; in createHttpServer.

I wanted to use a more complicated match than just ‘’ because that way it will still 404 if you’re referring to a resource you don’t have in assets yet, like ‘someimage.png’, whereas a '’ route would return index.html in place of the image, which causes chrome no end of headaches.

Anyway, my current approach is to manually edit the file in node_modules each time I have to, because I’m not super-excited about getting a dev environment set up for apps-scripts well enough to emit a PR on the issue. My assumption is that there’s some deeper issue here (like people want to do --http5=/devserver/prefix or something, or they want to link this to emitting a <base href="/"> into the index.html in the appropriate place, to make things much more fancy and hands-off) keeping the team from putting in the basic fix.

If it’s just “nobody’s done a PR for this and we’d accept it the way you describe it”, I’ll accept the work of forking and doing a PR, as this causes me pain every so often (whenever I get a new apps-scripts in my node_modules, which has lately been fairly often, as I’m testing deployments).

Posts: 1

Participants: 1

Read full topic

Is necessary "Cordova Plugin Whitelist" on "Ionic V3" for request's to webapi?

$
0
0

@eacpaula wrote:

I’v problem’s in request to my webapi “endpoint with https”, in the ionic app i received 404 not found, but in “Postman” i receive 200.

check(): any {
return new Promise(resolve => {
if (this.getData()) {
resolve(this.getData());
} else {
if (this.network.type !== ‘unknown’) {
this.http.post(this.urlApi, this.makeData())
.toPromise()
.then(data => {
let response = this.extractData(data);
this.success = response.Allow;
this.saveData(true);
resolve(response);
})
.catch(e => {
console.log(“Erro ao confirmar se o dispositivo pode usar este app!”, e)
});
} else {
this.presentAlert(“Liberação do App”, “É necessário que você tenha acessoa internet para verificar se pode utilizar este aplicativo!”);
}
}
});
}

Is necessary “Cordova Plugin Whitelist” on “Ionic V3” for allow request’s to webapi?

Posts: 1

Participants: 1

Read full topic


Sending notifications to specific user

$
0
0

@mateuspetter wrote:

Hello,

I have a chat in my app and I searched a lot in the internet for a tutorial on how to send a push notification when a message arrives, like WhatsApp. Is there anyway, using FCM or any other push notification service, to subscribe the notifications to an event?

Thanks!

Posts: 1

Participants: 1

Read full topic

Ionic application tap sound

Using a radio-list in a form in Ionic 3

$
0
0

@markbackhouse wrote:

Hi! I’m new to Ionic and trying to implement a form where a user can select an item from an array. When they click save I want this item to be pushed to an array in another page.

I’m getting stuck on two things. First - how do I assign the value to each list item so that my form understands what has just been selected? I understand that I should be using some [value] or [ngValue] type thing but am struggling to make this work. Second - how do I grab the actual value from my array to push to the other page?

Here is a snippet of my HTML:

<ion-list radio-group>
    <ion-item *ngFor="let item of itemList">
        <ion-label [formControlName]="item.title">{{item.title}}</ion-label>
        <ion-radio></ion-radio>
    </ion-item>
</ion-list>

<button ion-button full color="primary" (click)="saveItem()">Save Item</button>

And my TypeScript save method:

saveItem(){
    if(this.addItemForm.valid){
      this.badSubmitAttempt = false;
      console.log("success");
      console.log(this.addItemForm.value);
      this.itemProvider.addItem({item: this.addItemForm.value.item.title});
      this.navCtrl.push(itemPage);
    } else {
      this.badSubmitAttempt = true;
    }
  }

I think part of the problem could be how I’ve defined my formBuilder in the constructor, but examples I’ve been using online have been fairly sparse and unhelpful in this regard. How am I supposed to define the “item.title” part within formBuilder.group() when it is dynamically generated by whatever is within the itemList array?

Many thanks! I’ll try to provide better clarification if it is needed.

Posts: 1

Participants: 1

Read full topic

Android platform - how is version chosen?

$
0
0

@brassier wrote:

When adding the android platform via ionic cordova platform add android, I get version 6.1.2 of cordova-android installed. What controls that version? Is that the recommended version from Ionic for some reason? Or is that tied to the Cordova CLI version?

I’d like to upgrade because some plugins won’t let me install them unless I’m on >=6.3.0. My Ionic Info is below:

cli packages:

@ionic/cli-utils  : 1.18.0
ionic (Ionic CLI) : 3.18.0

global packages:

cordova (Cordova CLI) : 6.5.0

local packages:

@ionic/app-scripts : 3.0.1
Cordova Platforms  : android 6.1.2
Ionic Framework    : ionic-angular 3.8.0

System:

Android SDK Tools : 25.2.5
Node              : v6.11.1
npm               : 3.10.10
OS                : Windows 10

Posts: 1

Participants: 1

Read full topic

Integrate HTML5 game into ionic 3

Enable a button if all inputs are filled

Firebase filtering data

$
0
0

@perenyitamas wrote:

Hello guys! I am trying to filtering my data from my firebase database but i cant filter based on two values:

  this.firebasedb.list("/tavak/").subscribe(_data => {
   this.toadatok = _data.filter(item => {
     item.approved == "1";
     item.megye == this.megyevalasztas
   });
 })

If i try to filter by one value, it is working with both of them (ofc the data is correct for both of the filters)

  this.firebasedb.list("/tavak/").subscribe(_data => {
    this.toadatok = _data.filter(item =>
      item.approved == "1"
    );
  })

Where did i make a mistake in the filtering?

Posts: 3

Participants: 2

Read full topic


New Face detection and recognition Api - Faces SDK

$
0
0

@ddokyere wrote:

There is new SDK for adding face recognition and detection in android and iOS …Please can the ionic team look at providing , exposing or including that module in ionic. The Api is called
FACES SDK …

Posts: 1

Participants: 1

Read full topic

Ionic 3 - problem while setting iframe to full screen

$
0
0

@szymonp9 wrote:

In my application (android) I have iframes with video (youtube and vimeo). When I had ionic version 2 then I could set iframe to fullscreen but after updating application to ionic 3 it is not working. When I click fullscreen button then application page reloads and full screen disappears. Has anyone similar problem?

Posts: 1

Participants: 1

Read full topic

Not able scroll to input in ionic 2 (I'm not using ion-input)

$
0
0

@itanhduy wrote:

Hi all,

I’m facing a problem in Ionic 2 when trying to use custom input (I’m not using ion-input). The content is not pushing up when input is focusing and the keyboard overlaps input as well.

This gif will describe my issue:

Here is my expected behavior:

I knew ion-input can resolve this problem but how I can resolve this problem with custom input?
Thanks in advance

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.13.0
    ionic (Ionic CLI) : 3.13.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.0.1
    Cordova Platforms  : android 6.3.0 ios 4.5.3
    Ionic Framework    : ionic-angular 3.7.1

System:

    Node : v8.7.0
    npm  : 5.5.1
    OS   : macOS High Sierra

Misc:

    backend : pro

Posts: 1

Participants: 1

Read full topic

Ionic Virtual Scroll flickers when scrolling past top of page IOS

$
0
0

@texasman03 wrote:

I have a list using virtual scroll. If I scroll past the top of the page with the ‘rubberband’ effect on IOS, the list flickers and tries to snap back into place for a moment.


cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.18.0
    ionic (Ionic CLI) : 3.18.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.1.2
    Cordova Platforms  : android 6.3.0 ios 4.5.3
    Ionic Framework    : ionic-angular 3.9.2

System:

    ios-deploy : 1.9.2
    Node       : v8.4.0
    npm        : 5.5.1
    OS         : macOS Sierra
    Xcode      : Xcode 9.0.1 Build version 9A1004

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

Posts: 1

Participants: 1

Read full topic

Verify input before post

Viewing all 49085 articles
Browse latest View live


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