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

Ionic cordova platform add android: npm ERR! Error: EPERM: operation not permitted, lstat

$
0
0

What is your ´ionic info` output?
What software are you running while doing that command? VS Code maybe? Close it.


Error: Failed to fetch platform cordova-android@^6.2.3

$
0
0

Ok I have fixed it, in my case deleting everything from platforms folder and then installing them again was the solution, I have also deleted and installing again node modules but I am not sure if it was helpful

Read Local - Storage syncron/direct

$
0
0

Hi Nachtigal,

I have the same problem. How you fixed you issue ?

I use import { Storage } from '@ionic/storage' for my localstorage

Regards,

Can you build iOS app on Windows?

$
0
0

I was trying to run the following command:

ionic cordova build ios

But it gave me an error:

Error: xcodebuild was not found. Please install version 7.0.0 or greater from App Store

InAppBrowser - Return from opened external Link

$
0
0

This should not happen there must be some code that leads to page transition. Please upload the controller code you are using to open inappbrowser window

Can you build iOS app on Windows?

$
0
0

No.

You can use Ionic Package to build on a remote cloud service.
You can use VMWare to run MacOS on a Windows host (although not that simple - google for solutions)
You can install MacOS on your PC to create a Hackintosh if you have the right hardware.

Ionic package IOS Build fails missing 'xcode' npm module on setManualSigning.js

$
0
0

Hi, I'm facing the exact same issue. My last successful build on the ionic cloud for ios was on 20th April 2017.
When I tried a build today, it failed with this error

Error: Failed to fetch platform cordova-android@^6.2.3


Ionic nested tabs and same structure

$
0
0

So finally I used the same view with just a different navParam and go from one to another.
So sad we can't use Segments and VirtualScroll altogether.

Cannot display contact's image using the contacts plugin

$
0
0

I'm using the contacts plugin for displaying the contacts on the device as a list. All the fields are returned and displayed properly except the contacts' image.

For the photo of the contact: The contacts plugin returns a url which is the location of the image on the device. When I try to load the image from this url using <img [src]="contact.src"> , nothing happens no image is displayed
The code is as follows:

this.contacts.find(["displayName", "addresses", "emails", "phoneNumbers", "photos"]).then(contacts =>{

			for(let i =0 ; i < contacts.length; i++){
				let list = {};
				list['name'] = contacts[i].name.formatted;
				if(contacts[i].emails){
					list['email'] = contacts[i].emails[0].value || "";
				}
				if(contacts[i].phoneNumbers){
					list['phone'] = contacts[i].phoneNumbers[0].value || "";
				}
				if(contacts[i].photos){
					list['src'] = contacts[i].photos[0].value || "";
					// console.log(contacts[i].photos[0].value);
				}
				if(contacts[i].addresses){
					list['address'] = contacts[i].addresses[0].streetAddress+", "+contacts[i].addresses[0].region+" ,"+contacts[i].addresses[0].postalCode;
				}
				// console.log(JSON.stringify(list)+"\n");
				this.contactList.push(list);
			}

		});


       getImgSrc(i){ // Appends .jpg in the image url
    	       // console.log("index:"+i);
   		return i+".jpg";
  	}

The html code is as follows:

<ion-item>
	  <ion-avatar item-start>
	    <img [src]="getImgSrc(contact.src)">
	  </ion-avatar>
	  <h2>{{ contact.name }}</h2>
	  <p>{{ contact.phone }}</p>
	</ion-item>

Screenshot of the error:

Ionic 1.x and 2.x in the same machine

$
0
0

Yes i agree with you, i should have been more specific. Thanks.

What is the equivalent of "resolve" in ionic 2?

$
0
0

My use case was that I had to load some data for all the pages in my app before showing any page.
I manages to do this with a ionViewCanEnter hook on my tabs page. ( I use tabs and this is the only ionic Page component that they all have a a parent.

Returning a promise that always resolves (after putting the data in a service off course;-) worked out fine.

It seems a a bit of a misuse of guards (although my concern is strictly in the naming , resolve seems to fit the usecase better)

But it works!

Setting Focus to an Input in Ionic

$
0
0

Btw, waiting for transitions to end by setting a delay long enough is kinda crappy. Does anyone know if theres any hooks, callbacks or observables for transitions?

Unable to remove phonegap-plugin-push

Ionic editable list in ionic1

$
0
0

Add a text field within each list item with ng-hide=true.
On the click of each plus button bind a function with parameter as text field.
The function should override ng-hide=false for the textfield
call a function to sum all the text field values inside list


Ionic package IOS Build fails missing 'xcode' npm module on setManualSigning.js

$
0
0

Heres my ionic Info

global packages:

@ionic/cli-utils : 1.4.0
Cordova CLI      : 6.5.0
Gulp CLI         : not installed globally
Ionic CLI        : 3.4.0

local packages:

@ionic/cli-plugin-cordova : 1.4.0
@ionic/cli-plugin-gulp    : 1.0.1
@ionic/cli-plugin-ionic1  : 2.0.0
Cordova Platforms         : android 6.1.2 browser 4.1.0 ios 4.4.0
Ionic Framework           : ionic1 1.3.1

System:

Node       : v7.8.0
OS         : Linux 3.16
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed
npm        : 4.2.0

Ionic package IOS Build fails missing 'xcode' npm module on setManualSigning.js

$
0
0

My package.json

tnoel@website:~/dev/netglyde-app$ cat package.json
{
"name": "netglyde-app",
"version": "1.1.2",
"description": "netglyde-app: An Ionic project",
"dependencies": {
"angular-card": "^0.3.7",
"angular2-jwt": "^0.1.24",
"cordova-ios": "^4.4.0",
"gulp": "^3.5.6",
"gulp-concat": "^2.2.0",
"gulp-minify-css": "^0.3.0",
"gulp-rename": "^1.2.0",
"gulp-sass": "^2.0.4",
"cordova-plugin-camera": "~2.3.0",
"cordova-plugin-console": "~1.0.4",
"cordova-plugin-device": "~1.1.3",
"cordova-plugin-file": "~4.3.0",
"cordova-plugin-ios-keychain": "https://github.com/driftyco/cordova-plugin-ios-keychain.git",
"cordova-plugin-splashscreen": "~4.0.0",
"cordova-plugin-statusbar": "~2.2.0",
"cordova-plugin-whitelist": "~1.3.0",
"ionic-plugin-keyboard": "~2.2.1"
},
"devDependencies": {
"@ionic/cli-plugin-cordova": "1.4.0",
"@ionic/cli-plugin-gulp": "1.0.1",
"@ionic/cli-plugin-ionic1": "2.0.0",
"bower": "^1.3.3",
"gulp-util": "^2.2.14",
"shelljs": "^0.3.0"
},
"cordovaPlugins": [
"cordova-plugin-device",
"cordova-plugin-whitelist",
{
"locator": "https://github.com/apache/cordova-plugin-splashscreen.git",
"id": "cordova-plugin-splashscreen"
},
"cordova-plugin-statusbar",
"ionic-plugin-keyboard",
"cordova-plugin-compat",
"cordova-plugin-file",
"cordova-plugin-media-capture",
"cordova-plugin-inappbrowser",
{
"locator": "https://github.com/driftyco/cordova-plugin-ios-keychain.git",
"id": "cordova-plugin-ios-keychain"
},
"cordova-plugin-camera",
"cordova-plugin-webserver",
"cordova-plugin-console",
"cordova-plugin-datepicker"
],
"cordovaPlatforms": [
{
"platform": "browser",
"version": "",
"locator": "browser"
},
{
"platform": "ios",
"version": "4.4.0",
"locator": "ios@4.4.0"
}
],
"cordova": {
"plugins": {
"cordova-plugin-camera": {
"CAMERA_USAGE_DESCRIPTION": "Used only for personlization",
"PHOTOLIBRARY_USAGE_DESCRIPTION": "Used only for personlization"
},
"cordova-plugin-console": {},
"cordova-plugin-device": {},
"cordova-plugin-file": {},
"cordova-plugin-ios-keychain": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-whitelist": {},
"ionic-plugin-keyboard": {}
},
"platforms": [
"ios"
]
}
}

Can't display a base64image like a thumbnail

$
0
0

Hi,
I'm trying to display a base64Image but I can't make it work.
Here's my html code :

    <ion-list>
        <ion-item-sliding id="refresh" #slidingItem *ngFor="let signal of listeSignalements">
            <button ion-item (click)="openSignal()">
                <ion-thumbnail item-start>
                    <img id="image" [src]="signal.base64Image" width="50" height="50" />
                </ion-thumbnail>
                <h2>{{signal.signalement}}</h2>
                <p>{{signal.categorie}}</p>
            </button>

            <ion-item-options>
                <button ion-button color="primary" (tap)="openSignal(signal)">
                    Détails
                </button>
                <button ion-button color="danger" (tap)="delete(signal)">
                    Supprimer
                </button>
            </ion-item-options>
        </ion-item-sliding>
    </ion-list>

I don't really understand why, because I've a cameraPage where I could take a photo or retrieve a photo from the gallery, and the display works fine.
Here is my functionnal snippet

public base64Image : string;

takePhoto() {
  const options : CameraOptions = {
    quality: 90,
    destinationType: this.camera.DestinationType.DATA_URL,
    encodingType: this.camera.EncodingType.PNG,
    mediaType: this.camera.MediaType.PICTURE,
  }
  this.camera.getPicture(options) .then((imageData) => {
      this.base64Image = "data:image/jpeg;base64," + imageData;
      //this.photos.push(this.base64Image);
      //this.photos.reverse();
    }, (err) => {
    console.log(err);
    });
}

And here is the part of my html file

<ion-card class="blockImage">
        <ion-icon name="trash" class="deleteIcon" (click)="deletePhoto()"></ion-icon>
        <img id="image" [src]="base64Image" />
    </ion-card>

Could anyone help me please ?
Thanks

How to centre a button?

How Remove Dropped map marker?

$
0
0

I wan to make android back button get one step to back and remove the dropped marker in is there any possible way to do that?

public AddMarker(){
    let image = '/assets/img/rsz_marker.png';
    let marker = new google.maps.Marker({
    map: this.map,
    animation: google.maps.Animation.DROP,
    position: this.map.getCenter()
    , icon: image
  });
  }
    platform.registerBackButtonAction(() => {
      if (this.nav.canGoBack()) {
        this.nav.pop();
      } else {
         //*remove marker?
      }
    });
Viewing all 228529 articles
Browse latest View live


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