Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all 49299 articles
Browse latest View live

Multiple storage solution in one app

$
0
0

Hello everyone,

I’m relatively new to the Ionic Community and I’m looking to implement storage solution for my workout app. After doing my research I think the strength and weaknesses of Ionic Storage, Capacitor Storage, Preferences API and SQLite are clear, however it’s not clear to me if it would be a good practice to combine these solutions or if it’s the right fit for my use case, so I would like the input from the community.

The app should store:

  1. User preferences
  2. Plates inventory (what plates the user has available in the gym)
  3. Records of each workout

Additionally, I will be providing workout performance statistics to the user.

It sounds to me that Preferences API would be the easiest way to story user preferences persistently.

The plates inventory could be stored with Ionic Storage as JSON since each plate only has about 7 properties, although the user will be able to store 100s of plates so I’m not sure how scalable that is. So maybe I should use a SQLite?

Last but not least, for the workout records, since I will be providing statics and need querying, sounds to me that SQLite is the way to go.

On any case, would you recommend to use multiple solutions in one app; Ionic for preferences, Ionic Storage(with SQLite plugin) for inventory, and SQLite for records. Or should I just use SQLite to store everything there? I’m a bit torn right now.

What would be a good way to go about this? Curious of what your thoughts are.

Thank you!

Claudio

3 posts - 3 participants

Read full topic


Ionic Push Notification [ Vue JS]

$
0
0

Hey there,
well, im trying to hard to make the push notification work but i have no idea how to use it ,
is there any full tutorial how to use it full documentation or video ?

3 posts - 3 participants

Read full topic

Does android webview support css offset path and offset distance

$
0
0

Hello, everyone.
I’m working on an ionic angular app that must work on both Android and iOS. I’m having trouble with an svg component because I’m attempting to use the properties offset-path and offset-distance in scss, but the functionality isn’t working. Could anyone help clarify this issue?
Thank you in advance.

3 posts - 3 participants

Read full topic

I can't manage to make Vitest work with a new standalone ionic-angular project

$
0
0

Hi everyone!
I’m trying to install Vitest on a newly created Ionic-angular project and I’m getting into troubles. I followed this article to install Vitest :

But ng test ends with this error:

Cannot use import statement outside a module
Module /node_modules/.pnpm/@ionic+core@7.8.4/node_modules/@ionic/core/components/ion-back-button.js:4
 seems to be an ES Module but shipped in a CommonJS package.
You might want to create an issue to the package "@ionic/core" asking them to ship the file in .mjs extension or add "type": "module" in their package.json.

As it is suggested, I have updated the vite.config.mts file :

export default defineConfig(({ mode }) => {
  return {
    plugins: [angular()],
    test: {
      globals: true,
      environment: 'jsdom',
      setupFiles: ['src/test-setup.ts'],
      include: ['**/*.spec.ts'],
      reporters: ['default'],
      server: {
        deps: {
          inline: ["@ionic/core"]
        }
      }
    },
    define: {
      'import.meta.vitest': mode !== 'production',
    },
  };
});

but ng test ends with the same error.
Has anyone managed to make it work ?

1 post - 1 participant

Read full topic

Ionic 7: App life cycle on ios

$
0
0

Hello,

I have a problem with my ionic 7 app on iOS.

Sometimes, when I have it in memory and I go to use other apps, when I return the app does not work correctly.

It seems that the system takes it out of memory to optimize resources and when it tries to recover it, it does not have the information of the view in which it was.

I understand that for these cases, I should save the state of the app, but I don’t know where to save/recover that state or how to save it.

Any ideas?

Greetings

1 post - 1 participant

Read full topic

Have you blocked users from Russia?

$
0
0

Hello,

A couple of days ago, I started experiencing an issue where I was seeing “you have been blocked” when accessing the Ionic and Capacitor portals, as well as the documentation and the Ionic Appflow dashboard. However, when I turned on my VPN, the issue seemed to resolve itself.

Could you please help me understand why this is happening?
I would appreciate any information or insights you may have regarding this issue.
Thank you for your assistance.

1 post - 1 participant

Read full topic

Ionic 7 + local SSL

$
0
0

Hey Guys,

I’m working on running my local Ionic+Vue3 app with SSL. I’ve hosted my backend API on DigitalOcean, so now it supports HTTPS.

However, when I run my local app on my phone through Android Studio, I can’t test the Google login functionality due to CORS errors. I think this is because the protocols don’t match.

I’ve tried using ionic serve --ssl and ionic serve --https, but it seems like the Vue-specific version doesn’t have that option.

Any ideas on how this could work?

1 post - 1 participant

Read full topic

Apple sign in not working in simulator and real device. But works in browser

$
0
0

Hi,
I am trying to create Sign in with Apple option for my ionic project. Trying out this with firebase. Downloaded the capacitor plugins from GitHub - rlfrahm/capacitor-apple-login: Capacitor Apple Login.
Followed the instructions given in this video, https://www.youtube.com/watch?v=nlk54-QkGk4.

After several modification, given below is my code:
async singInWithAppleNative() {
const provider = new OAuthProvider(‘apple.com’);
signInWithPopup(this.auth, provider)
.then(async (res) => {
console.log(res);
alert(JSON.stringify(res));
})
.catch((error) => {
console.error(error);
alert(error.message);
});
}

Running this in simulator and real device says,
“nw_connection_copy_connected_local_endpoint_block_invoke [C5] Connection has no local endpoint”

and alert popup displays the message “Firebase: error(auth/cancelled-popup-request)”.
Kindly help me to sort out the problem.

Thanks in advance.

1 post - 1 participant

Read full topic


iOS Privacy Manifest help

$
0
0

Hello,
i’ve migrated my app to Capacitor v6 and everything seems to be fine,
the only problem i’m having is related to the privacy manifest code i should use with the following plugins:

capacitor/device

Found potentially required reason API usage 'volumeAvailableCapacityForImportantUsageKey' in 'node_modules/@capacitor/device/ios/Sources/DevicePlugin/Device.swift'
Line numbers: 42 
Found potentially required reason API usage 'systemFreeSize' in 'node_modules/@capacitor/device/ios/Sources/DevicePlugin/Device.swift'
Line numbers: 30 
Found potentially required reason API usage 'systemSize' in 'node_modules/@capacitor/device/ios/Sources/DevicePlugin/Device.swift'
Line numbers: 59 

image

I use it to register my push notifications

but in the info it says i’m using it for “disk space reasons”, which is not my case I guess.
What code should I use in this case in the privacy info file?

the other plugin is
@capacitor-community/apple-sign-in/

Found potentially required reason API usage 'UserDefaults' in 'node_modules/@capacitor-community/apple-sign-in/ios/Plugin/Plugin.swift'
 

here i’ve used 85F4.1, is it fine?

thank you!

1 post - 1 participant

Read full topic

In ionic-angular capacitor application how to hash and store password in local storage for offline feature

$
0
0

Hello, In an ionic-angular capacitor application how to hash and store password in local storage for offline feature.
Is there any npm plugin which can be used for password hashing?
And which one is best? whether to hash password or encrypt password?

1 post - 1 participant

Read full topic

Ionic App and esbuild, anyone is using it?

$
0
0

Hello,
as suggested by ionic vs extension i’ve tried to move from webpack to esbuild but now my app doesn’t work anymore: if I run “ionic serve” i get a lot of errors in the console
like this:

chunk-VIBOU7HO.js?v=f73f4152:50 ERROR Error: Dynamic require of “./main.module-5MY3Q5GX.js” is not supported
or

TypeError: Cannot read properties of undefined (reading ‘isProxied’)

and

The glob pattern import(“./**/.entry.js”) did not match any files [empty-glob]

do I need to fix something somewhere?

thank you.

1 post - 1 participant

Read full topic

How to find all api calls from codebase of my ionic app?

$
0
0

I want to write api test cases for various business use cases, for which I need a list of api calls done by my ionic apps, so that I can recreate them in postman. I don’t want to scan and filter log files. Is there any automated way to do so ? Some plugin or extension ?

One way is to look manually in all services files and list the apis but I was looking for a better way to do this because there are a lot of apps, I don’t prefer to do it maunally. All inputs are welcome !

1 post - 1 participant

Read full topic

Ionic 7 App stop working on iOS after a while

$
0
0

I have an Ionic 7 App . Main screen gets info about news,events from an API every time is started, using local cache.

On Android it works well, but on iPhone 12 or higher, it stops working SOMETIMES after restarting: menu disappears, blank screen… it seems all data is lost. Sometimes works for several days, sometimes stops working in two hours…

Any ideas?

{
...
  "private": true,
  "dependencies": {
    "@angular/animations": "^17.0.2",
    "@angular/cdk": "^17.3.2",
    "@angular/common": "^17.0.2",
    "@angular/compiler": "^17.0.2",
    "@angular/core": "^17.0.2",
    "@angular/forms": "^17.0.2",
    "@angular/platform-browser": "^17.0.2",
    "@angular/platform-browser-dynamic": "^17.0.2",
    "@angular/router": "^17.0.2",
    "@awesome-cordova-plugins/app-version": "^6.6.0",
    "@awesome-cordova-plugins/badge": "^6.6.0",
    "@awesome-cordova-plugins/barcode-scanner": "^6.6.0",
    "@awesome-cordova-plugins/camera": "^6.6.0",
    "@awesome-cordova-plugins/file": "^6.6.0",
    "@awesome-cordova-plugins/file-transfer": "^6.6.0",
    "@awesome-cordova-plugins/geolocation": "^6.6.0",
    "@awesome-cordova-plugins/insomnia": "^6.6.0",
    "@awesome-cordova-plugins/launch-navigator": "^6.6.0",
    "@awesome-cordova-plugins/photo-viewer": "^6.6.0",
    "@awesome-cordova-plugins/social-sharing": "^6.6.0",
    "@awesome-cordova-plugins/splash-screen": "^6.6.0",
    "@awesome-cordova-plugins/sqlite": "^6.6.0",
    "@awesome-cordova-plugins/sqlite-porter": "^6.6.0",
    "@capacitor/android": "^5.7.4",
    "@capacitor/app": "^5.0.7",
    "@capacitor/camera": "^5.0.9",
    "@capacitor/core": "^5.7.4",
    "@capacitor/device": "^5.0.7",
    "@capacitor/haptics": "^5.0.7",
    "@capacitor/ios": "^5.7.4",
    "@capacitor/keyboard": "^5.0.8",
    "@capacitor/network": "^5.0.7",
    "@capacitor/preferences": "^5.0.7",
    "@capacitor/splash-screen": "^5.0.7",
    "@capacitor/status-bar": "^5.0.7",
    "@ionic/angular": "^7.0.0",
    "@ionic/storage-angular": "^4.0.0",
    "@techiediaries/ngx-qrcode": "^9.1.0",
    "angularx-qrcode": "^17.0.0",
    "com-sarriaroman-photoviewer": "^1.3.0",
    "cordova-plugin-actionsheet": "^2.3.3",
    "cordova-plugin-badge": "^0.8.9",
    "cordova-plugin-camera": "^7.0.0",
    "cordova-plugin-dialog": "^0.0.1",
    "cordova-plugin-dialogs": "^2.0.2",
    "cordova-plugin-file": "^8.0.1",
    "cordova-plugin-file-transfer": "^2.0.0",
    "cordova-plugin-geolocation": "^5.0.0",
    "cordova-plugin-insomnia": "^4.3.0",
    "cordova-plugin-transfer": "^1.0.8",
    "cordova-plugin-x-socialsharing": "^6.0.4",
    "cordova-sqlite-storage": "^6.1.0",
    "es6-promise-plugin": "^4.2.2",
    "ionic-cache": "^6.0.3",
    "ionicons": "^7.0.0",
    "ngx-ionic-image-viewer": "^0.7.5",
    "onesignal-cordova-plugin": "^3.3.2",
    "rxjs": "~7.8.0",
    "swiper": "^11.1.0",
    "tslib": "^2.3.0",
    "uk.co.workingedge.cordova.plugin.sqliteporter": "^1.1.2",
    "uk.co.workingedge.phonegap.plugin.launchnavigator": "^5.0.6",
    "zone.js": "^0.14.4"
  },
...
}

1 post - 1 participant

Read full topic

I am using ionic capacitor while i am doing app swicher on ios device black screen appeared while its in background mode,I dont how to fix this one. i have tried below solution but still no luck. might be this is ionic bug? i tried this one

$
0
0

When this key is set to NO, your app will not terminate when the user switches to another app. Instead, it will move to the background and enter a suspended state. This should prevent the black screen issue.

Here’s how you can modify your Info.plist file:

UIApplicationExitsOnSuspend

I am using ionic capacitor and while i click on app switcher i mean my application goes at the background then screen shows black.

2 posts - 2 participants

Read full topic

Capacitor Biometrics and GeoLocation Lookup by Address Available?

$
0
0

I have looked through npmjs and the official capacitor documentation and I cannot find an updated plugin that will work for Android Biometric login and also GeoLocation lookup by address

I have a requirement to make sure that users can only check into work when they are at least 500 yards away from their work location. So the easiest way would be to enter in the address of the location to verify they are there correct? In any case I need a plugin that does this type of lookup.

Then of course for login I need an updated version for Capacitor for Biometric handling.

Can someone please help?

1 post - 1 participant

Read full topic


Starting a demo app in IOS 14 Sonoma, fails because dependencies

$
0
0

Hello, I just set up the IONIC environment on a MAC 14 Sonoma and when creating an app from scratch:

ionic start my-app sidemenu

angular
standalone

…the installation does not finish, generating the following error output:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
**npm ERR! **
npm ERR! While resolving: ionic-app-base@0.0.0
npm ERR! Found: zone.js@undefined
npm ERR! node_modules/zone.js
npm ERR! zone.js@“~0.14.2” from the root project
**npm ERR! **
npm ERR! Could not resolve dependency:
npm ERR! peer zone.js@“~0.14.0” from @angular/core@17.3.4
npm ERR! node_modules/@angular/core
npm ERR! @angular/core@“^17.0.2” from the root project
npm ERR! peer @angular/core@“17.3.4” from @angular/common@17.3.4
npm ERR! node_modules/@angular/common
npm ERR! @angular/common@“^17.0.2” from the root project
**npm ERR! **
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
**npm ERR! **
**npm ERR! **
npm ERR! For a full report see:

The versions of node, npm and ionics are:

juancarlos@MacBook-Pro-de-Juan ws % ionic --version
7.2.0
juancarlos@MacBook-Pro-de-Juan ws % npm --version
10.5.0
juancarlos@MacBook-Pro-de-Juan ws % node --version
v20.12.2
juancarlos@MacBook-Pro-de-Juan ws %

Any ideas to solve these dependency problems?
Thank you very much in advance.

1 post - 1 participant

Read full topic

Ion-searchbar helperText property

$
0
0

Been searching for a way to submit a feature request to add a helperText property to the ion-searchbar. Can someone point m to the place I can submit the request?

1 post - 1 participant

Read full topic

Problem with css in pwa ionic-angular

$
0
0

I’ve a new pwa app created with ionic and angular (standalone).
Ionic 7.1.1 - Angular 17.0.2
If I run it with ionic serve it’s all ok. If I run it with http-server ( http-server -c-1 www) i’ve css problems.
For test i’ve created a new class in global.scss.
I can see the class in style.css created with “build --prod”.
Inspecting the button I see the class but it doesn’t apply it. Does anyone have any idea how to figure out the problem?


This is the screen of inspection on chrome browser.

Thanks!
Monica

1 post - 1 participant

Read full topic

Ionic 8 is here!

Mr.business MAgazine

$
0
0

Mr. Business Magazine is a dynamic and inspirational platform catering to business enthusiasts and leaders worldwide. Personifying the entrepreneurial spirit, it showcases the success stories of global businesses and entrepreneurs.

1 post - 1 participant

Read full topic

Viewing all 49299 articles
Browse latest View live


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