# shared_preferences_foundation 2.6.1

iOS and macOS implementation of the shared_preferences plugin.




## Installing
```
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add shared_preferences_foundation
```
Published: 2026-10-27T02:35:25.491227Z
Expected archive SHA-256: 4e396ac6f8751ab7d2d6e27f22f32c8350b07006028d534f5221503382f1fa69

Available in cache; verification: upstream_checksum
## Direct dependencies
- ffi: ^2.1.4
- flutter: map[sdk:flutter]
- meta: ^1.10.0
- objective_c: ^9.6.2
- shared_preferences_platform_interface: ^2.4.0

## Package README (untrusted upstream documentation)
# shared\_preferences\_foundation

The iOS and macOS implementation of [`shared_preferences`][1].

## Usage

This package is [endorsed][2], 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.

[1]: https://pub.dev/packages/shared_preferences
[2]: https://flutter.dev/to/endorsed-federated-plugin

## 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

* Renames the package previously published as
  [`shared_preferences_macos`](https://pub.dev/packages/shared_preferences_macos)
* Adds iOS support.







 
