ionic-framework

What happens to setTimeout when the window is out of focus?

戏子无情 提交于 2021-01-27 06:41:54
问题 I have a situation where I need to reauthenticate a token on a cordova app before the authentication token expires. To do that I figured I'd set a timeout just before the auth token expires, to reauthenticate. function authenticate() { var token = ... get token setTimeout(function() { .. try to reauthenticate }, token.expiresIn - 600*1000); } Problem I could see is that- The timeout period passes while the app is sleeping. Function does not fire? The timeout "countdown" (if that's how it

error 400 when accessing firebase storage trying to get file url

北战南征 提交于 2021-01-27 04:57:28
问题 I'm trying the ionic and firebase platforms and i ran into a problem. so i have an image in the storage I'm trying to access, i tried using the getDownloadURL() method but i keep getting an error 400, "invalid http method/url pair". i can't find any solution to it. same error when trying to use getMetadata(). firebase is initialized and all is working well for now, authentication, database readings and all. except for this error... i have the following code in a service.. // Get a reference

File google-services.json is missing. The Google Services Plugin cannot function without it ionic 3

孤人 提交于 2021-01-21 12:32:04
问题 I am using FCM for push notification I always get this error message "File google-services.json is missing. The Google Services Plugin cannot function without it ionic 3" on phone I have placed my google-services.json on every folder and nothings working 回答1: Fist of all you need to download google-services.json: Sign in to Firebase and open your project. Click the Settings icon and select Project settings. In the Your apps card, select the package name of the app you need a config file for

File google-services.json is missing. The Google Services Plugin cannot function without it ionic 3

只愿长相守 提交于 2021-01-21 12:31:06
问题 I am using FCM for push notification I always get this error message "File google-services.json is missing. The Google Services Plugin cannot function without it ionic 3" on phone I have placed my google-services.json on every folder and nothings working 回答1: Fist of all you need to download google-services.json: Sign in to Firebase and open your project. Click the Settings icon and select Project settings. In the Your apps card, select the package name of the app you need a config file for

ionic serve on iOS 14 device. Error “Invalid Service”

心已入冬 提交于 2021-01-21 10:22:15
问题 After upgrading an iPhone6s to iOS 14 and Xcode to the latest version, I am unable to serve the app. The error stack is as following Error: InvalidService at LockdownProtocolReader.parseBody (/usr/local/lib/node_modules/native-run/node_modules/node-ioslib/dist/protocol/lockdown.js:35:19) at LockdownProtocolReader.onData (/usr/local/lib/node_modules/native-run/node_modules/node-ioslib/dist/protocol/protocol.js:52:40) at TLSSocket.emit (events.js:315:20) at addChunk (_stream_readable.js:295:12)

ionic serve on iOS 14 device. Error “Invalid Service”

亡梦爱人 提交于 2021-01-21 10:19:03
问题 After upgrading an iPhone6s to iOS 14 and Xcode to the latest version, I am unable to serve the app. The error stack is as following Error: InvalidService at LockdownProtocolReader.parseBody (/usr/local/lib/node_modules/native-run/node_modules/node-ioslib/dist/protocol/lockdown.js:35:19) at LockdownProtocolReader.onData (/usr/local/lib/node_modules/native-run/node_modules/node-ioslib/dist/protocol/protocol.js:52:40) at TLSSocket.emit (events.js:315:20) at addChunk (_stream_readable.js:295:12)

ionic serve on iOS 14 device. Error “Invalid Service”

不打扰是莪最后的温柔 提交于 2021-01-21 10:18:08
问题 After upgrading an iPhone6s to iOS 14 and Xcode to the latest version, I am unable to serve the app. The error stack is as following Error: InvalidService at LockdownProtocolReader.parseBody (/usr/local/lib/node_modules/native-run/node_modules/node-ioslib/dist/protocol/lockdown.js:35:19) at LockdownProtocolReader.onData (/usr/local/lib/node_modules/native-run/node_modules/node-ioslib/dist/protocol/protocol.js:52:40) at TLSSocket.emit (events.js:315:20) at addChunk (_stream_readable.js:295:12)

Custom Icons with Ionic 5?

走远了吗. 提交于 2021-01-21 06:47:09
问题 I recently updated from Ionic 4 to Ionic 5. With Ionic 5 the icons received an update too. Apparently however also the mechanism loading the icons changed. In Ionic 4 it was possible to add custom icons like this: https://medium.com/@JordanBenge/how-to-create-custom-ionic-4-icons-af80cc6cc148 Add e.g. ios-my-custom-icon.svg and md-my-custom-icon.svg in an icon folder in the assets . Then it was necessary to reference them in the angular.json like: ... "assets": [ ... { "glob": "**/*.svg",

Custom Icons with Ionic 5?

血红的双手。 提交于 2021-01-21 06:46:46
问题 I recently updated from Ionic 4 to Ionic 5. With Ionic 5 the icons received an update too. Apparently however also the mechanism loading the icons changed. In Ionic 4 it was possible to add custom icons like this: https://medium.com/@JordanBenge/how-to-create-custom-ionic-4-icons-af80cc6cc148 Add e.g. ios-my-custom-icon.svg and md-my-custom-icon.svg in an icon folder in the assets . Then it was necessary to reference them in the angular.json like: ... "assets": [ ... { "glob": "**/*.svg",

Ionic 5 - How to replace default icon and splash screen image and generate resources

☆樱花仙子☆ 提交于 2021-01-20 16:41:33
问题 I recently started using ionic 6 and capacitor(not cordova), and I don't know how to replace its default application icon and splash screen. Is there any way to do it and generate resources using ionic capacitor cli like what we were doing with cordova(ionic cordova resources android)? where should I replace icon and splash images with my own? after adding android platform using capacitor(ionic cap add android), it generates icon and splash images in android resources, but I don't know how to