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

Google Maps native not load map first time


How to use custom webpack configuration in Ionic 4

RunTime Error Object(...) is not a function after update packs

$
0
0
TypeError: Object(...) is not a function
    at http://localhost:8100/build/vendor.js:87436:76
    at Object.<anonymous> (http://localhost:8100/build/vendor.js:87521:2)
    at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
    at Object.490 (http://localhost:8100/build/main.js:2269:83)
    at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
    at Object.428 (http://localhost:8100/build/main.js:1600:73)
    at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
    at Object.296 (http://localhost:8100/build/main.js:1583:70)
    at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
    at webpackJsonpCallback (http://localhost:8100/build/vendor.js:26:23)

it starts when I Updated some packages…

packs:

“dependencies”: {
@angular/animations”: “5.2.11”,
@angular/common”: “5.2.11”,
@angular/compiler”: “5.2.11”,
@angular/compiler-cli”: “^7.2.9”,
@angular/core”: “5.2.11”,
@angular/forms”: “5.2.11”,
@angular/http”: “5.2.11”,
@angular/platform-browser”: “5.2.11”,
@angular/platform-browser-dynamic”: “5.2.11”,
@ionic-native/app-center-crashes”: “^5.9.0”,
@ionic-native/barcode-scanner”: “^4.9.2”,
@ionic-native/bluetooth-serial”: “^4.12.0”,
@ionic-native/camera”: “^4.12.0”,
@ionic-native/core”: “5.9.0”,
@ionic-native/geolocation”: “^4.12.2”,
@ionic-native/network”: “^4.12.2”,
@ionic-native/splash-screen”: “4.9.1”,
@ionic-native/sqlite”: “^4.18.0”,
@ionic-native/status-bar”: “4.9.1”,
@ionic/storage”: “^2.1.3”,
@ngx-translate/core”: “^9.1.1”,
“cordova-android”: “8.0.0”,
“cordova-browser”: “5.0.4”,
“cordova-plugin-appcenter-crashes”: “0.3.5”,
“cordova-plugin-appcenter-shared”: “0.3.5”,
“cordova-plugin-bluetooth-serial”: “^0.4.7”,
“cordova-plugin-camera”: “^4.0.3”,
“cordova-plugin-device”: “^2.0.2”,
“cordova-plugin-geolocation”: “^4.0.1”,
“cordova-plugin-ionic-keyboard”: “^2.1.3”,
“cordova-plugin-ionic-webview”: “^4.0.1”,
“cordova-plugin-network-information”: “^2.0.1”,
“cordova-plugin-splashscreen”: “^5.0.2”,
“cordova-plugin-whitelist”: “^1.3.3”,
“cordova-sqlite-storage”: “^2.6.0”,
“ionic-angular”: “3.9.2”,
“ionicons”: “3.0.0”,
“phonegap-plugin-barcodescanner”: “^8.0.1”,
“rxjs”: “5.5.11”,
“sw-toolbox”: “3.6.0”,
“tar”: “^4.4.8”,
“zone.js”: “0.8.26”
},
“devDependencies”: {
@ionic/app-scripts”: “^3.2.4”,
“typescript”: “~3.5.2”
},

"export 'ICON_PATHS' was not found in 'ionicons/icons'

$
0
0

You’re right. I just tried to create a new project and the error appeared.

As soon as I add this: yarn add @ionic/vue
And update the main.js file.
The error appears.

I don’t know what to do.

Opening pages with ngFor

[IONIC 4] Others methods to download files

$
0
0

This helped me a lot. I will post here my code with a function that check if device is using cordova, check if a dir already exists, check if file already exist and then save the file. If device is not using cordova, it will save the file using other method (for browsers). I made some changes as my function already receive the data formatted for my desired format, GeoJSON. Another thing that I changed was the version of File Transfer plugin, now using the updated method/version. This don’t get the file from any server, the data “downloaded” is already on device, I hope this helps someone:

fileTransfer: FileTransferObject = this.transfer.create();
download(file, name) {
	if (this.platform.is('cordova')) {
		this.file.checkDir(this.file.externalRootDirectory, 'downloads')
		.then(
			// Directory exists, check for file with the same name
			_ => this.file.checkFile(this.file.externalRootDirectory, 'downloads/' + name + '.geojson')
			.then(_ => {alert("A file with the same name already exists!")})
			// File does not exist yet, we can save normally
			.catch(err =>
				this.fileTransfer.download(file, this.file.externalRootDirectory + '/downloads/' + name + '.geojson').then((entry) => {
			    	alert('File saved in:  ' + entry.nativeURL);
			    })
			    .catch((err) =>{
			    	alert('Error saving file: ' + err.message);
			    })
			))
		.catch(
			// Directory does not exists, create a new one
			err => this.file.createDir(this.file.externalRootDirectory, 'downloads', false)
			.then(response => {
				alert('New folder created:  ' + response.fullPath);
			    this.fileTransfer.download(file, this.file.externalRootDirectory + '/downloads/' + name + '.geojson').then((entry) => {
			    	alert('File saved in : ' + entry.nativeURL);
			    })
			    .catch((err) =>{
			    	alert('Error saving file:  ' + err.message);
			    });
		
			}).catch(err => {
				alert('It was not possible to create the dir "downloads". Err: ' + err.message);
			})			
		);			 

	} else {
		// If downloaded by Web Browser
		let link = document.createElement("a");
		link.download = name + '.geojson';
		link.href = file;
		document.body.appendChild(link);
		link.click();
		document.body.removeChild(link);
		link = null;
	}
}

Opening pages with ngFor

$
0
0

ı just used only one ion-content tag.
ı dont know what is the wrong.
please help me.

Problem with routing in Ionic 4


Ionic v3 Scroll issue after update iOS 12.2

$
0
0

Muito obrigado, isso resolveu p/ mim

Ionic select box how to detect value is changed?

$
0
0

I want to have classic style of select box so I use

<select class="box" name="al">
            <option value="all">all</option>
            <option value="a">A</option>
            <option value="b">B</option>
        </select>

but in this case…how can I detect value is selected?
I don’t think I can use jquery…

I still don’t understand why ion-select is too much different than classic select box…
I don’t want to select any value from popup when I use selectbox.

Schedule background task

List devices in webrtc

$
0
0

I’m listing the devices of my phone in a ionic 4 app using Angular7 and cordova. Calling navigator.mediaDevices.enumerateDevices() I got all audioinput and videoinput but the labels are empty. I know I have to call to this method when the audio and video permissions are granted and I do that.

Connecting to a webrtc sample through Android browser works but through Android WebView not.

Why the labels are empty? How can i list all devices of my android phone?
Thanks

Generate 64bit apk for ionic 1 project

$
0
0

Hi all :wave: I’m picking up an old Ionic 1 project from a couple of years ago. To keep our app in the Google play store I need to somehow generate a 64 bit APK. I’m a little lost on how to do that - I’ve not touched ionic for the last 2 years and a hell of a lot has changed.

I’ve got a couple of questions,

  1. is crosswalk still needed? It looks like that plugin (or atleast the version of cross walk I have installed includes some .so files which will apperently prevent a 64 bit version?
  2. I don’t seem to be able to reinstall all my plugins. I’ve tried ionic state reset but apparently that’s been removed in CLI 3. I’ve tried ionic cordova prepare but I get Error: Your MyApplication platform does not have Api.js
  3. What CLI version should I be running to build an old ionic 1 app, bearing in mind I need to generate a 64 bit APK.

If anyone could help or point me in the right direction that would be awesome.

ionic info gives me:

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

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 7.0.1

local packages:

    Cordova Platforms : android 5.1.1 ios 3.9.2
    Ionic Framework   : ionic1 1.1.1

System:

    ios-deploy : 1.9.1
    ios-sim    : 5.0.13
    Node       : v8.11.3
    npm        : 5.6.0
    OS         : macOS High Sierra
    Xcode      : Xcode 10.0 Build version 10A255

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : legacy

Thanks in advance :raised_hands:

[ionic4] - how to use hardware back button to close loading (when pressed during loading) or to go to previous page or to exit the app

Should i use font in EM or PX with ionic

$
0
0

Hello,

I am currently developing an application with Ionic. I use for this, a model of the application to do the same, with colors, fonts (in px), image, etc …

My question is, should I use the EM or PX unit for the font ?

I ask myself this question because for me the unit EM is supposed to be more adapted to all types of screen. However, the fonts transmitted with the models are in PX and therefore more complicated to make a model identical with the EM unit.

I would just like to know if the EM unit is really useful or not, using Ionic. :slight_smile:

Thanks for your help


Working with android but not working with IOS 11.2.2

$
0
0

We have same problem. And its big trouble now. The app is working since 2 month on android and on iOS we can not get it though the test in Appstore.

Technical details:
Ionic 4 with cordova and firebase.

Any suggestions?

Date/Time:           2019-07-03 08:31:41.4621 -0700
Launch Time:         2019-07-03 08:31:41.0040 -0700
OS Version:          iPhone OS 12.2 (16E227)
Baseband Version:    7.55.01
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  0

Application Specific Information:
abort() called

Last Exception Backtrace:
(0x214cb3518 0x213e8e9f8 0x214bd0ec0 0x215638a00 0x240abe324 0x214ba0f38 0x240abaf7c 0x240abb958 0x240e001e4 0x240e007c0 0x240dfee24 0x2406c3104 0x2406cb69c 0x2406c2d88 0x2406c3678 0x2406c19c4 0x2406c168c 0x2406c61cc 0x2406c6fb0 0x2406c6084 0x2406cad84 0x240dfd518 0x2409f9f0c 0x21762dd44 0x217637754 0x217636f5c 0x2146f47d4 0x2146995d8 0x2176680bc 0x217667d58 0x217668310 0x214c452bc 0x214c4523c 0x214c44b24 0x214c3fa60 0x214c3f354 0x216e3f79c 0x240e00b68 0x1006566e8 0x2147058e0)

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib        	0x00000002148510dc 0x21482e000 + 143580
1   libsystem_pthread.dylib       	0x00000002148ca094 0x2148c8000 + 8340
2   libsystem_c.dylib             	0x00000002147aaea8 0x214750000 + 372392
3   libc++abi.dylib               	0x0000000213e77788 0x213e76000 + 6024
4   libc++abi.dylib               	0x0000000213e77934 0x213e76000 + 6452
5   libobjc.A.dylib               	0x0000000213e8ee00 0x213e89000 + 24064
6   libc++abi.dylib               	0x0000000213e83838 0x213e76000 + 55352
7   libc++abi.dylib               	0x0000000213e838c4 0x213e76000 + 55492
8   libdispatch.dylib             	0x00000002146f47e8 0x214694000 + 395240
9   libdispatch.dylib             	0x00000002146995d8 0x214694000 + 21976
10  FrontBoardServices            	0x00000002176680bc 0x217622000 + 286908
11  FrontBoardServices            	0x0000000217667d58 0x217622000 + 286040
12  FrontBoardServices            	0x0000000217668310 0x217622000 + 287504
13  CoreFoundation                	0x0000000214c452bc 0x214b9b000 + 697020
14  CoreFoundation                	0x0000000214c4523c 0x214b9b000 + 696892
15  CoreFoundation                	0x0000000214c44b24 0x214b9b000 + 695076
16  CoreFoundation                	0x0000000214c3fa60 0x214b9b000 + 674400
17  CoreFoundation                	0x0000000214c3f354 0x214b9b000 + 672596
18  GraphicsServices              	0x0000000216e3f79c 0x216e35000 + 42908
19  UIKitCore                     	0x0000000240e00b68 0x240546000 + 9153384
20  Sonnenbraeu                   	0x00000001006566e8 0x100650000 + 26344
21  libdyld.dylib                 	0x00000002147058e0 0x214704000 + 6368

Thread 1:
0   libsystem_pthread.dylib       	0x00000002148d6cd0 0x2148c8000 + 60624

Thread 2:
0   libsystem_pthread.dylib       	0x00000002148d6cd0 0x2148c8000 + 60624

Thread 3:
0   libsystem_pthread.dylib       	0x00000002148d6cd0 0x2148c8000 + 60624

Thread 4:
0   libsystem_pthread.dylib       	0x00000002148d6cd0 0x2148c8000 + 60624

Thread 5 name:  com.apple.uikit.eventfetch-thread
Thread 5:
0   libsystem_kernel.dylib        	0x00000002148460f4 0x21482e000 + 98548
1   libsystem_kernel.dylib        	0x00000002148455a0 0x21482e000 + 95648
2   CoreFoundation                	0x0000000214c44cb4 0x214b9b000 + 695476
3   CoreFoundation                	0x0000000214c3fbc4 0x214b9b000 + 674756
4   CoreFoundation                	0x0000000214c3f354 0x214b9b000 + 672596
5   Foundation                    	0x000000021560cfcc 0x215605000 + 32716
6   Foundation                    	0x000000021560ce5c 0x215605000 + 32348
7   UIKitCore                     	0x0000000240ee6540 0x240546000 + 10093888
8   Foundation                    	0x00000002157396e4 0x215605000 + 1263332
9   libsystem_pthread.dylib       	0x00000002148d32c0 0x2148c8000 + 45760
10  libsystem_pthread.dylib       	0x00000002148d3220 0x2148c8000 + 45600
11  libsystem_pthread.dylib       	0x00000002148d6cdc 0x2148c8000 + 60636

Thread 6:
0   libsystem_pthread.dylib       	0x00000002148d6cd0 0x2148c8000 + 60624

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x000000028106ed37
    x4: 0x0000000213e86b71   x5: 0x000000016f7ae520   x6: 0x000000000000006e   x7: 0xffffffffffffffec
    x8: 0x0000000000000800   x9: 0x00000002148ce888  x10: 0x00000002148c9f18  x11: 0x0000000000000003
   x12: 0x0000000000000000  x13: 0x0000000000000001  x14: 0x0000000000000010  x15: 0x0000000000000009
   x16: 0x0000000000000148  x17: 0x0000000000000000  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x00000001009fabc0  x21: 0x000000016f7ae520  x22: 0x0000000000000303  x23: 0x00000001009faca0
   x24: 0x0000000000000000  x25: 0x0000000000002303  x26: 0x000000028027d008  x27: 0x000000016f7aece0
   x28: 0x0000000000000000   fp: 0x000000016f7ae480   lr: 0x00000002148ca094
    sp: 0x000000016f7ae450   pc: 0x00000002148510dc cpsr: 0x00000000

Binary Images:
0x100650000 - 0x100737fff Sonnenbraeu arm64  <7fab81186b913d0e916f1dbbaf73e51f> /var/containers/Bundle/Application/528FDABD-4E8C-4385-A417-4F89BFA380EF/Sonnenbraeu.app/Sonnenbraeu
0x100894000 - 0x10089ffff libobjc-trampolines.dylib arm64  <cf9cb7f2097e3ea3ae9501c161aaae6c> /usr/lib/libobjc-trampolines.dylib
0x10096c000 - 0x1009c3fff dyld arm64  <8c28034501643b82a228124b23ca0e9f> /usr/lib/dyld
0x213e1e000 - 0x213e1ffff libSystem.B.dylib arm64  <8b5ad3930f0a3ea2ba9e180d1d979d8c> /usr/lib/libSystem.B.dylib
0x213e20000 - 0x213e75fff libc++.1.dylib arm64  <1f3ca975290139bc97a3430e0cb586ee> /usr/lib/libc++.1.dylib
0x213e76000 - 0x213e88fff libc++abi.dylib arm64  <9ea63d1804ce3e28b6c12cb873ccad18> /usr/lib/libc++abi.dylib
0x213e89000 - 0x214610fff libobjc.A.dylib arm64  <6bcefc3ae6583699925f68a56dda06b5> /usr/lib/libobjc.A.dylib
0x214611000 - 0x214615fff libcache.dylib arm64  <aadc3aace6dd3db380a1e9eeb80519cb> /usr/lib/system/libcache.dylib
0x214616000 - 0x214621fff libcommonCrypto.dylib arm64  <3e243d7fb2283cf482b68575d889c112> /usr/lib/system/libcommonCrypto.dylib
0x214622000 - 0x214626fff libcompiler_rt.dylib arm64  <60d6c3ce000c34868b0876ab06e51d1b> /usr/lib/system/libcompiler_rt.dylib
0x214627000 - 0x21462ffff libcopyfile.dylib arm64  <6e86afdf5d203fc38fd2739ec830940e> /usr/lib/system/libcopyfile.dylib
0x214630000 - 0x214693fff libcorecrypto.dylib arm64  <568543130dd63ba98f7da3f441045254> /usr/lib/system/libcorecrypto.dylib
0x214694000 - 0x214703fff libdispatch.dylib arm64  <9cc8817521b2366da7f24340d383b286> /usr/lib/system/libdispatch.dylib
0x214704000 - 0x21472dfff libdyld.dylib arm64  <2d8aee81500d34799da53eb3c27a7c2b> /usr/lib/system/libdyld.dylib
0x21472e000 - 0x21472efff liblaunch.dylib arm64  <bdda9851925a3001abe65193b426644e> /usr/lib/system/liblaunch.dylib
0x21472f000 - 0x214734fff libmacho.dylib arm64  <1b0eeb34d4653da582c1105d68d9d844> /usr/lib/system/libmacho.dylib
0x214735000 - 0x214736fff libremovefile.dylib arm64  <35f75dfd93ee325dab74ed5155c40d43> /usr/lib/system/libremovefile.dylib

How to reload a previous page when route back to that page in ionic4

$
0
0

Hello,

I have the same problem. I tried with ionViewWillEnter but doesn’t work.In the page A I put the method ionViewWillEnter with a console.log(). In the same page I have a button with the atrribute routerLink="/pageB". In pageB I put the back button . When I come back to the page A, the console.log doesn’t print.

Anyone know what is my problem? I’m new on ionic/angular :slight_smile:

Thank you!

A problem occurred evaluating project ':CordovaLib'. No installed build tools found. Install the Android build tools version 19.1.0 or higher

$
0
0

I have a problem when building my ionic app, do not find build tools but in sdk manager I have installed several versions of this, someone knows how I can fix it?

already try to do it with different points proposed as a solution but it does not work–

A problem occurred evaluating project ‘:CordovaLib’.

No installed build tools found. Install the Android build tools version 19.1.0 or higher

Blockquote

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

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0

local packages:

@ionic/app-scripts : 3.1.8
Cordova Platforms  : android 7.0.0
Ionic Framework    : ionic-angular 3.9.2

System:

Node  : v8.15.0
npm   : 6.4.1
OS    : macOS
Xcode : Xcode 10.2.1 Build version 10E1001

Environment Variables:
ANDROID_HOME : not set

Misc:

backend : pro

Blockquote

cordova requirements
Android Studio project detected

Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: not installed
android: Command failed with exit code ENOENT
Gradle: installed /usr/local/Cellar/gradle/5.4.1/bin/gradle
(node:1022) UnhandledPromiseRejectionWarning: CordovaError: Some of requirements check failed

Injecting stuff not working [object object] errors

$
0
0

Hello I am pretty new to Ionic 4 I guess but whatever I try to inject nav controller or an external service
in the component constructor, I get an error about object in the console…
I have an ionic module in the app module of that component what am I missing here?

Ionic 4 & Angular 8

$
0
0

Follow the below steps to update Ionic.Hope this will help
1)Remove Ionic/cli
2)Remove Angular/cli
3)Remove cordova
4)Uninstall Node JS
5)Check whether everything removed successfully or not

Restart your system before nnext setup
1)Install latest Node js
2)Install Cordova
3)Install Angular /cli latest
4)Install Ionic/cli latest
5)Create a demo project and run ionic serve
Hope it will help you. Thank you , Enjoy coding

Viewing all 228535 articles
Browse latest View live


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