Flutter SharedPreferences Error on iOS and macOS

96 Views Asked by At

I am trying to run my Flutter application via Xcode and I keep getting the error

Warning: Unable to create restoration in progress marker file (11db)

It seems to happen on line 18 of the file 'SharedPreferencesPlugin.swift' (let messenger = registrar.messenger()) where it says

Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)

I am new to Flutter development so I am unsure how to fix this

1

There are 1 best solutions below

0
Dharam Budh On

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  shared_preferences: ^2.2.1

Then, perform the below-mentioned commands one by one.

flutter clean
flutter pub get
cd ios
pod install
cd ..