capacitor

Ionic4 capacitor android livereload?

孤街醉人 提交于 2020-02-02 11:01:32
问题 Is there posibility to run ionic4 app with capacitor on android device with livereload? I was looking for answear for a few hours now without a luck. Please help. 回答1: You can do it by adding the server object to the capacitor.config.json file, just use the url of your live reload server "server": { "url": "http://192.168.1.33:8100" } 回答2: You can use the ionic cli for this: ionic capacitor run android --livereload For example. Source: https://ionicframework.com/docs/cli/commands/capacitor

How to embed third party framework on ionic capacitor custom plugin?

♀尐吖头ヾ 提交于 2020-01-24 19:03:10
问题 I am developing an Ionic Capacitor plugin which imports 2 iOs .framework files and a .bundle that refers to one of this .framework files. The thing is that no matter how I link/embed and point/copy this files on the plugin project, xcode claims, on the app project, that it cant find the module in the swift file. I already tried to add the files to the project, used the "Embedded binaries" option, linked libraries, allow non-modular includes (on build options menu), add the files to the

How to embed an Android library (AAR file) into a capacitor plugin?

百般思念 提交于 2020-01-24 15:04:14
问题 The issue is already answered for iOS: How to embed framework in capacitor plugin for iOS For Android, I get issues when I add an aar file to the capacitor plugin by creating a new module. After publishing my capacitor plugin via npm and integrating it into an ionic app, the aar library cannot be found anymore. 回答1: As done on iOs, we do practically the same thing here. But, using Android Studio and gradle instead of xcode and cocoapods. Ok, but first things first. When the command npx

How to embed an Android library (AAR file) into a capacitor plugin?

北战南征 提交于 2020-01-24 15:03:06
问题 The issue is already answered for iOS: How to embed framework in capacitor plugin for iOS For Android, I get issues when I add an aar file to the capacitor plugin by creating a new module. After publishing my capacitor plugin via npm and integrating it into an ionic app, the aar library cannot be found anymore. 回答1: As done on iOs, we do practically the same thing here. But, using Android Studio and gradle instead of xcode and cocoapods. Ok, but first things first. When the command npx

Can I call Ionic 4 / Capacitor Electron code from the Ionic part of the application?

扶醉桌前 提交于 2020-01-15 10:14:37
问题 I am investigating using Ionic 4/ Capacitor to target Windows via the Electron option, for an application where I want to use SQLite. Using the Ionic Native SQLite plugin, which wraps this Cordova plugin, out of the box, as far as I can see, the Windows support is for UWP, and not Desktop, which runs using Electron in Ionic Capacitor wrapper. My plan, was to see if I could use Electron SQLite package, and then call this from my Ionic application by making a wrapper class for the Ionic native

JSON.parse nested JSON string property parsing

戏子无情 提交于 2020-01-04 08:27:12
问题 I am getting the following string from an API module: {"value":"{\"Id\":\"100\",\"OrganizationName\":\"[_+-:|;'.\\\/] Arizona Grower Automation\"}"} When I use JSON.parse on the client side, I get: Uncaught SyntaxError: Unexpected token I in JSON at position 12 This works if the quotes inside are double escaped, but whats the best way to do this ? More specifically this is returned by an Ionic Capacitor plugin from the native code to JavaScript environment. 回答1: You need to escape backslash

JSON.parse nested JSON string property parsing

微笑、不失礼 提交于 2020-01-04 08:27:06
问题 I am getting the following string from an API module: {"value":"{\"Id\":\"100\",\"OrganizationName\":\"[_+-:|;'.\\\/] Arizona Grower Automation\"}"} When I use JSON.parse on the client side, I get: Uncaught SyntaxError: Unexpected token I in JSON at position 12 This works if the quotes inside are double escaped, but whats the best way to do this ? More specifically this is returned by an Ionic Capacitor plugin from the native code to JavaScript environment. 回答1: You need to escape backslash

Android project is not resolving any static assets

倾然丶 夕夏残阳落幕 提交于 2019-12-14 02:19:32
问题 For some reason my android project is not resolving any static paths to js / css / images while it works fine on web and ios. I am not using ionic, so maybe I am missing something specific? However all these files are available in android project. Here is an image highlighting this issue, you can see that android app appears completely broken and only shows images that are base64 encoded. It has no styles applied not any js is working, it's just showing some html that was pre-rendered. Arrow

Push Notifications work from FCM console but if sent from API show “InvalidApnsCredential” error (only on iOS devices)

不想你离开。 提交于 2019-12-13 17:08:57
问题 Push notification FMC API doesn't work on iOS I tried to verify my APNS certificates and seems okay From FMC console testing notifications work and arrive successfully to iOS devices Endpoint url https://fcm.googleapis.com/fcm/send Request headers: Content-Type:application/json Authorization:key=**SERVER_KEY** Request payload body: { "to": "**FMC_DEVICE_TOKEN**", "priority": "high", "notification": { "title": "Title", "body" : "First Notification", "text": "Text" } } Response body: {

Platform Pause / Resume events not firing in Capacitor

懵懂的女人 提交于 2019-12-13 08:55:16
问题 I was trying to use these events for my autologout timer functionality however I now realise that these events are not available yet in Capacitor. https://forum.getcapacitor.com/t/platform-pause-platform-resume-not-working/249 Does anyone know a workaround of accessing these events or similar without using native plugins? I can't use plugins as the webview of the device is fixed to an old version (44). Edit: It turns out I can use some native plugins just not the Capacitor ones. 回答1: These