ionic3

Running Ionic 3 app on iPhone throws error: 2 duplicate symbols for architecture arm64

孤街醉人 提交于 2019-11-27 21:35:29
问题 I am opening .xcworkspace of my Ionic 3 project and trying to run it on my device but I suddenly get the following error in Xcode: Ld /Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Products/Debug-iphoneos/MyApp.app/MyApp normal arm64 cd /Users/manuel/Documents/MyApp/dev/copernic4-ion2/galilei/platforms/ios export IPHONEOS_DEPLOYMENT_TARGET=9.0 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:

Handling hardware back button in Ionic3 Vs Ionic4

荒凉一梦 提交于 2019-11-27 21:28:18
Please find the below code for the Android hardware back button action in ionic3 . As Ionic4 uses angular routing for navigation how the pop event will take place for the back button? If we want to pop to the last page we can use the following code this.navCtrl.goBack('/products'); . But how we can use it for the android hardware back button action in ionic4 ? Ionic3 hardware back button action this.platform.registerBackButtonAction(() => { let activePortal = this.ionicApp._loadingPortal.getActive() || this.ionicApp._modalPortal.getActive() || this.ionicApp._toastPortal.getActive() || this

Ionic2, inject NavController to Injectable Service

谁说胖子不能爱 提交于 2019-11-27 20:50:33
I have a problem with Injectable Service in Angular2 using Ionic2 framework. My service looks like this: import {Injectable} from '@angular/core'; import {NavController} from 'ionic-angular'; @Injectable() export class ViewStackController { static get parameters() { return [[NavController]]; } constructor(nav) { } } And I get error No provider for NavController . It's strange because in any Page class it's working, though it has @Component , maybe that's the catch. edit #1: I am providing this service in ionicBootstrap , like this: ionicBootstrap(MyApp, [ViewStackController], {}); As you can

How can I use content.scrollTo() for ion-scroll in ionic2?

こ雲淡風輕ζ 提交于 2019-11-27 20:40:57
I try to scroll to a fixed position, for example scrollTo(500, 20). Let's say that you are on a device, which has got a width of 300 pixel. The scroll target is now out of the screen scope, you have to scroll to the right. I solved this by doing the following: <ion-content> <ion-scroll scrollX="true" style="width:100%; height:100%; white-space: nowrap; "> <div style="width:1000px; "> [box1] [box2] [box3] [...] </div> </ion-scroll> </ion-content> Up to here everything is fine. The problem starts if i want to jump 500 pixel to the right by pressing a button for example. Swiping to the right

Function DocumentReference.set() called with invalid data. Unsupported field value: a custom Budget object

眉间皱痕 提交于 2019-11-27 20:40:32
问题 Below code works fine until today. But I don't know now it is not working and gives below error.Could you tell me why? Error: Function DocumentReference.set() called with invalid data. Unsupported field value: a custom Budget object export class Project { id: string = null; name: string; budgetList?: Budget[]; } export class Budget { id: string; amount: number; contingency: number = 20; budgetGroup: BudgetGroup = new BudgetGroup(); creationTime: string; } code: async create(data: DtoProject):

Ionic Uncaught Error: Cannot find module “.” when importing a service provider

99封情书 提交于 2019-11-27 18:46:30
问题 I am trying to import a new service provider that I just created after pulling from the latest branch in my ionic app. When I try to import this line of code: import { AuthServiceProvider } from '../providers/auth-service' in app.module.ts I always got an error saying that: Uncaught Error: Cannot find module "." at webpackMissingModule (index.js:3) at e.code (index.js:3) at Object.<anonymous> (index.js:9) at __webpack_require__ (bootstrap 62d6a5897825ac327001:54) at Object.690 (slide

Angular 4 and Ionic 3 No provider for HTTP

♀尐吖头ヾ 提交于 2019-11-27 17:15:00
问题 I have a service which imports Http, and when I use it in my app it throws error. " No provider for Http! Error at g injectionError ". I am lazyloading the app. Also the provider was generated through cli " ionic g provider ... " complaint-service.ts import { Injectable } from '@angular/core'; import { Http } from '@angular/http'; import 'rxjs/add/operator/map'; @Injectable() export class ComplaintService { private complaints: {subject: string, description: string}[] = []; constructor(public

Ionic 2 ionScroll event to not refresh view

女生的网名这么多〃 提交于 2019-11-27 16:20:52
I add to the <ion-content> a ionScroll event which triggers the method foo() and in a <button ion-button> a click event which triggers foo() too. In my template I add for an example {{ x }} and the foo() method increments x . The button click refreshs the view so that the new value is shown. The scrolling not. If I add a console.log this will print. If i set the fokus to some element like a textbox or something, the view refreshs and the new value of x shows up. have someone an idea why? That's because something very interesting and powerfull called Zones . If the concept is new for you,

Ionic 3 - ios - displaying selected image on screen

断了今生、忘了曾经 提交于 2019-11-27 15:44:12
I set up the camera plugin to select an image from the photo library and upload it to the server with the following code: getImage() { //By default the camera retrieves the image as a JPEG file. const options: CameraOptions = { quality: 100, destinationType: this.camera.DestinationType.FILE_URI, sourceType: this.camera.PictureSourceType.PHOTOLIBRARY, targetWidth:1080, targetHeight:1080, correctOrientation: true, mediaType: this.camera.MediaType.PICTURE, encodingType: this.camera.EncodingType.JPEG } this.camera.getPicture(options).then((fileUri) => { if (this.platform.is('ios')) { return this

Not allowed to load local resource: ionic 3 android

流过昼夜 提交于 2019-11-27 13:59:58
问题 I am using ionic 3 android build apk and trying to laod image from file:///storage/emulated/0/data/io.ionic.vdeovalet/cache/image.jpeg takePicture(sourceType) { try { // Create options for the Camera Dialog var options = { quality: 100, destinationType: this.camera.DestinationType.FILE_URI, encodingType: this.camera.EncodingType.JPEG, sourceType: sourceType, }; this.camera.getPicture(options).then((imagePath) => { // Special handling for Android library if (this.platform.is('android') &&