Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: With CapacitorJS Storage does not work with IOS Version "@capacitor/ios": "^6.0.0" #7455

Closed
1 of 3 tasks
chaklasiyanikunj opened this issue May 8, 2024 · 2 comments
Labels
needs reproduction needs reproducible example to illustrate the issue

Comments

@chaklasiyanikunj
Copy link

Capacitor Version

Not working with "@capacitor/ios": "^6.0.0"
working with "@capacitor/ios": "^5.7.1",
In Android It's working "@capacitor/android": "^6.0.0",

Other API Details

No response

Platforms Affected

  • iOS
  • Android
  • Web

Current Behavior

I used the Preferences below :

 async setUser(data: any) {
        await Preferences.set({
            key: 'MyKey',
            value: JSON.stringify(data)
        });
    }

In Version 6.0.0 It's not able to Store the Key

Expected Behavior

Version 6.0.0 should be able to Store the Key
In Version 5.7.1, It's working fine.

Project Reproduction

Angular

Additional Information

Is there any way to change the key assigned to version 6.0.0?

@jcesarmobile jcesarmobile added the needs reproduction needs reproducible example to illustrate the issue label May 8, 2024
Copy link

ionitron-bot bot commented May 8, 2024

This issue needs more information before it can be addressed. In particular, the reporter needs to provide a minimal sample app that demonstrates the issue. If no sample app is provided within 15 days, the issue will be closed.
Please see the Contributing Guide for how to create a Sample App.
Thanks! Ionitron 💙

@ionitron-bot ionitron-bot bot removed the triage label May 8, 2024
@Ionitron Ionitron added needs reply needs reply from the user and removed needs reply needs reply from the user labels May 8, 2024
@jcesarmobile jcesarmobile added the needs reply needs reply from the user label May 8, 2024
@bluepuma77
Copy link

Works for me on iOS with CapacitorJS 6:

import { Preferences } from '@capacitor/preferences';

await Preferences.set({
    key: 'MyKey',
    value: JSON.stringify({data: 'Hello'})
});

let p = await Preferences.get({key: 'MyKey'})
console.log('p', JSON.parse(p.value))
% npx cap doctor
💊   Capacitor Doctor  💊

Latest Dependencies:

  @capacitor/cli: 6.0.0
  @capacitor/core: 6.0.0
  @capacitor/android: 6.0.0
  @capacitor/ios: 6.0.0

Installed Dependencies:

  @capacitor/android: not installed
  @capacitor/cli: 6.0.0
  @capacitor/ios: 6.0.0
  @capacitor/core: 6.0.0

[success] iOS looking great! 👌

@Ionitron Ionitron removed the needs reply needs reply from the user label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs reproduction needs reproducible example to illustrate the issue
Projects
None yet
Development

No branches or pull requests

4 participants