apple_keychain 0.0.1 copy "apple_keychain: ^0.0.1" to clipboard
apple_keychain: ^0.0.1 copied to clipboard

Flutter plugin to access keychain items, and share keys between apps

Flutter Keychain Access Plugin #

A Flutter plugin that provides keychain access for securely storing and retrieving data on iOS. It also allows data sharing between apps using the same app group identifier.

Features #

  • Securely store data in the iOS keychain.
  • Retrieve stored data from the keychain.
  • Share data between multiple apps using a common app group identifier.

Usage #

To use this plugin, add apple_keychain as a dependency in your pubspec.yaml file:

dependencies:
  apple_keychain: ^1.0.0

Then, import the library into your Dart code:

import 'package:apple_keychain/apple_keychain.dart';

Storing Data #

To store data in the keychain, use the write method:

String key = 'myKey';
String value = 'myValue';
await AppleKeychain.write(key: key, value: value);

Retrieving Data #

To retrieve data from the keychain, use the read method:

String key = 'myKey';
String value = await AppleKeychain.read(key: key);

Sharing Data Between Apps #

To share data between multiple apps using the same app group identifier, set the accessGroup parameter when reading or writing data:

String key = 'myKey';
String value = 'myValue';
String accessGroup = 'com.example.appgroup';
await AppleKeychain.write(key: key, value: value, accessGroup: accessGroup);

String sharedValue = await AppleKeychain.read(key: key, accessGroup: accessGroup);

Make sure to configure the appropriate app group identifier in your Xcode project settings.

For more detailed usage examples, please refer to the example provided.

Issues and Contributions #

Please report any issues or bugs you encounter by creating an issue on the GitHub repository. Contributions are always welcome!

License #

This plugin is released under the MIT License.

1
likes
150
pub points
45%
popularity

Publisher

unverified uploader

Flutter plugin to access keychain items, and share keys between apps

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface

More

Packages that depend on apple_keychain