Viewing version 2.6.1. Open the latest package page.

shared_preferences_foundation

2.6.1

iOS and macOS implementation of the shared_preferences plugin.

Download archive

Readme

shared_preferences_foundation

The iOS and macOS implementation of shared_preferences.

Usage

This package is endorsed, which means you can simply use shared_preferences normally. This package will be automatically included in your app when you do, so you do not need to add it to your pubspec.yaml.

However, if you import this package to use any of its APIs directly, you should add it to your pubspec.yaml as usual.

Changelog

2.6.1

  • Fixes web compilation of apps that import package:shared_preferences_foundation, for example to use SharedPreferencesAsyncFoundationOptions.

2.6.0

  • Updates internal implementation to use Pigeon FFI.
  • Updates minimum supported SDK version to Flutter 3.47/Dart 3.13.

2.5.7

  • Updates pigeon dev_dependency to ^27.3.2 for analyzer 14 compatibility.
  • Updates minimum supported SDK version to Flutter 3.38/Dart 3.10.

2.5.6

  • Updates to Pigeon 26.

2.5.5

  • Updates minimum supported version to iOS 13 and macOS 10.15.
  • Updates minimum supported SDK version to Flutter 3.35/Dart 3.9.

2.5.4

  • Updates Pigeon to fix lint error.
  • Updates minimum supported SDK version to Flutter 3.22/Dart 3.4.

2.5.3

  • Updates Pigeon for non-nullable collection type support.

2.5.2

  • Fixes getting all preferences when suite name is used.

2.5.1

  • Fixes getStringList returning immutable list.
  • Updates minimum supported SDK version to Flutter 3.19/Dart 3.3.

2.5.0

  • Adds new SharedPreferencesAsyncFoundation API.

2.4.0

  • Adds Swift Package Manager compatibility.
  • Updates minimum iOS version to 12.0 and minimum Flutter version to 3.16.6.

2.3.5

  • Adds privacy manifest.
  • Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.

2.3.4

  • Adds pub topics to package metadata.
  • Updates minimum supported SDK version to Flutter 3.7/Dart 2.19.

2.3.3

  • Updates Pigeon-generated code to avoid conflicts with shared_preferences_ios.

2.3.2

  • Updates to the latest version of pigeon.

2.3.1

  • Fixes variable binding bug on older versions of Xcode.

2.3.0

  • Adds clearWithParameters and getAllWithParameters methods.
  • Updates minimum supported macOS version to 10.14.
  • Updates minimum supported SDK version to Flutter 3.3/Dart 2.18.

2.2.2

  • Updates minimum iOS version to 11.

2.2.1

  • Updates pigeon for null value handling fixes.

2.2.0

  • Adds getAllWithPrefix and clearWithPrefix methods.

2.1.5

  • Clarifies explanation of endorsement in README.
  • Aligns Dart and Flutter SDK constraints.

2.1.4

  • Updates links for the merge of flutter/plugins into flutter/packages.

2.1.3

  • Uses the new sharedDarwinSource flag when available.
  • Updates minimum Flutter version to 3.0.

2.1.2

  • Updates code for stricter lint checks.

2.1.1

  • Adds Swift runtime search paths in podspec to avoid crash in Objective-C apps. Convert example app to Objective-C to catch future Swift runtime issues.

2.1.0

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add 'shared_preferences_foundation:2.6.1'
pubspec.yaml
name: shared_preferences_foundation
description: iOS and macOS implementation of the shared_preferences plugin.
repository: https://github.com/flutter/packages/tree/main/packages/shared_preferences/shared_preferences_foundation
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+shared_preferences%22
version: 2.6.1

environment:
  sdk: ^3.13.0
  flutter: ">=3.47.0"

flutter:
  plugin:
    implements: shared_preferences
    platforms:
      ios:
        pluginClass: SharedPreferencesPlugin
        dartPluginClass: SharedPreferencesFoundation
        sharedDarwinSource: true
      macos:
        pluginClass: SharedPreferencesPlugin
        dartPluginClass: SharedPreferencesFoundation
        sharedDarwinSource: true

dependencies:
  ffi: ^2.1.4
  flutter:
    sdk: flutter
  meta: ^1.10.0
  objective_c: ^9.6.2
  shared_preferences_platform_interface: ^2.4.0

dev_dependencies:
  ffigen: ^22.0.0
  flutter_test:
    sdk: flutter
  path: ^1.9.0
  pigeon: ^29.0.10
  pub_semver: ^2.1.4
  swift2objc: ^0.3.0
  swiftgen: ^0.2.0

topics:
  - persistence
  - shared-preferences
  - storage

Version history

VersionPublishedArchiveSHA-256
2.1.0On demandDownload487d82ec…77d33d
2.1.1On demandDownloadf4518808…a44e04
2.1.2On demandDownload1ffa2390…b23951
2.1.3On demandDownload2b55c186…fcccd0
2.1.4On demandDownload6b84fdf0…796259
2.1.5On demandDownload1e755f85…fa5310
2.2.0On demandDownloadcf2a42fb…1b3603
2.2.1On demandDownload0c1c16c5…032b07
2.2.2On demandDownloade014107b…700feb
2.3.0On demandDownload0dc5c49a…c024ab
2.3.1On demandDownloadb046999b…4a8cc1
2.3.2On demandDownloadf39696b8…cf3cd4
2.3.3On demandDownloadd2975399…2310ef
2.3.4On demandDownload7bf53a9f…9b62a7
2.3.5On demandDownload7708d830…988f5c
2.4.0On demandDownload0a8a893b…683ab7
2.5.0On demandDownload671e7a93…191833
2.5.1On demandDownload776786cf…e3c849
2.5.2On demandDownloadc4b35f6c…fc9d9f
2.5.3On demandDownload07e050c7…0d513d
2.5.4On demandDownload6a52cfcd…e49e03
2.5.5On demandDownload1c33a907…45f88b
2.5.6On demandDownload4e7eaffc…19a64f
2.5.7On demandDownload2ec3934e…1b47ea
2.6.0On demandDownloadc2c02dd5…567ff5
2.6.1Cached · Upstream SHA-256 matchedDownload4e396ac6…f1fa69

Dependencies

ffi "^2.1.4"

flutter { "sdk": "flutter" }

meta "^1.10.0"

objective_c "^9.6.2"

shared_preferences_platform_interface "^2.4.0"