Ionic 6 Vue - Capacitor 4 Upgrade Error: "Storage" plugin is not implemented on ios

Starting with Capacitor 4, the @capacitor/storage package has been renamed to @capacitor/preferences

I have removed @capacitor/storage and replaced it with the preferences package.

When building for production and running on my physical device via Xcode the app runs fine initially.

If I close the app and attempt to reopen it I receive the following in my devtools:
Unhandled Promise Rejection: Error: "Storage" plugin is not implemented on ios

I don’t have this issue with my android production build. I am curious why there is a reference to the Storage package anywhere after being removed.

Any ideas?

Thank you!

Have you run “npx cap sync” yet? just to make sure the latest native code is connected with the native project?

Hello!

We were able to figure out our issue. Here is what happened:

Our app was reverting to a fallback version which was on capacitor v3. This version was using the capacitor storage plugin. As we upgraded to capacitor version 3, we upgraded to use the preferences plugin too.

It was not apparent at first due to the minification of our app on android and ios devices. It appear to be missing a “chunk” with no discernable connection to the missing storage plugin.

We ended up disabling auto update to prevent our app from attempting to fallback to an incompatible version.