DocumentsDirectory different in standalone iOS app

Please provide the following:

  1. SDK Version: 35.0.0
  2. Platforms(Android/iOS/web/all): iOS

I recently migrated an Expo app from SDK 32, to 35 and am experiencing a difference between the document directory.

In previous builds (32) the FileSystem.documentDirectory would result in: file:///var/mobile/Containers/Data/Application/<BUILD_NO>/Documents/ExponentExperienceData/<APP_NAME>/

I have seen in other forum posts that this is what is expected when running an Expo app in the client app as well as standalone.

In the new version of the app (35) it will still provide the same documentDirectory when running the in the Expo Client but built as a standalone app it will use: file:///var/mobile/Containers/Data/Application/<BUILD_NO>/Documents/

This is causing huge issues as our app has documents required for functioning stored in the previous directory.

Additionally, this means AsyncStorage is looking in the wrong directory for the manifest.json.

Is there any reason for this difference?

Github Issue: FileSystem.documentDirectory changed between SDK 32 and 35 · Issue #5942 · expo/expo · GitHub

I ran through the Expo git history and found an answer.

It seems the directory was changed in SDK 33 and a migration was added for SDK’s 33 and 34 but dropped in 35 meaning a migration from 32 to 35 is not supported and will require a manual renaming of the directory.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.