Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IsolatedStorageFile GetUserStoreForApplication() returns wrong path on .NET for iOS #83384

Closed
akrol95 opened this issue Mar 14, 2023 · 4 comments
Assignees
Labels
Milestone

Comments

@akrol95
Copy link

akrol95 commented Mar 14, 2023

Description

I recently upgraded my application from old Xamarin to new .NET 7 for Android & iOS.
Unfortunately, after installing a new version of the app on real device I noticed I lost all the data stored using Akavache library.
After some investigation I noticed that the problem lies in the path that is returned from IsolatedStorageFile.GetUserStoreForApplication() (Akavache library uses it as a path for mobile projects).

So e.g using old Xamarin.iOS framework I get:
"{some-path-with-UDID}/data/Containers/Data/Application/{UDID}/Documents/.config/.isolated-storage"

and for .NET 7 for iOS I get:
"{some-path-with-UDID}/data/Containers/Data/Application/{UDID}/Documents/.isolated-storage/uygfypsp.kjn/qxiowk50.cd0/AppFiles/"

and that's the reason the app does not see previously stored data.

I see similiar problem described in #74642, but it does not seem to be resolved to me.

Reproduction Steps

  1. Create plain .NET for iOS project from VS for Mac or any other IDE.
  2. Run the project and check out the path from IsolatedStorageFile.GetUserStoreForApplication().
  3. Create plain old Xamarin.iOS project.
  4. Run the project and check out the path from IsolatedStorageFile.GetUserStoreForApplication(), and then compare it to path retrieved from when using .NET 7 for iOS.

Expected behavior

IsolatedStorageFile.GetUserStoreForApplication() should be exact the same using Xamarin.iOS and .NET 7 for iOS.

Actual behavior

Paths are different.

Regression?

No response

Known Workarounds

No response

Configuration

dotnet workload: ios 16.2.1024/7.0.100 SDK 7.0.200
TargetFramework: net7.0-ios

Other information

No response

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Mar 14, 2023
@ghost
Copy link

ghost commented Mar 14, 2023

Tagging subscribers to this area: @dotnet/area-system-io
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

I recently upgraded my application from old Xamarin to new .NET 7 for Android & iOS.
Unfortunately, after installing a new version of the app on real device I noticed I lost all the data stored using Akavache library.
After some investigation I noticed that the problem lies in the path that is returned from IsolatedStorageFile.GetUserStoreForApplication() (Akavache library uses it as a path for mobile projects).

So e.g using old Xamarin.iOS framework I get:
"{some-path-with-UDID}/data/Containers/Data/Application/{UDID}/Documents/.config/.isolated-storage"

and for .NET 7 for iOS I get:
"{some-path-with-UDID}/data/Containers/Data/Application/{UDID}/Documents/.isolated-storage/uygfypsp.kjn/qxiowk50.cd0/AppFiles/"

and that's the reason the app does not see previously stored data.

I see similiar problem described in #74642, but it does not seem to be resolved to me.

Reproduction Steps

  1. Create plain .NET for iOS project from VS for Mac or any other IDE.
  2. Run the project and check out the path from IsolatedStorageFile.GetUserStoreForApplication().
  3. Create plain old Xamarin.iOS project.
  4. Run the project and check out the path from IsolatedStorageFile.GetUserStoreForApplication(), and then compare it to path retrieved from when using .NET 7 for iOS.

Expected behavior

IsolatedStorageFile.GetUserStoreForApplication() should be exact the same using Xamarin.iOS and .NET 7 for iOS.

Actual behavior

Paths are different.

Regression?

No response

Known Workarounds

No response

Configuration

dotnet workload: ios 16.2.1024/7.0.100 SDK 7.0.200
TargetFramework: net7.0-ios

Other information

No response

Author: akrol95
Assignees: -
Labels:

area-System.IO, untriaged

Milestone: -

@steveisok steveisok removed the untriaged New issue has not been triaged by the area owner label Mar 15, 2023
@steveisok steveisok added this to the 8.0.0 milestone Mar 15, 2023
@steveisok
Copy link
Member

Should be fixed by #83380

@steveisok steveisok added the os-ios Apple iOS label Mar 15, 2023
@ghost
Copy link

ghost commented Mar 15, 2023

Tagging subscribers to 'os-ios': @steveisok, @akoeplinger
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

I recently upgraded my application from old Xamarin to new .NET 7 for Android & iOS.
Unfortunately, after installing a new version of the app on real device I noticed I lost all the data stored using Akavache library.
After some investigation I noticed that the problem lies in the path that is returned from IsolatedStorageFile.GetUserStoreForApplication() (Akavache library uses it as a path for mobile projects).

So e.g using old Xamarin.iOS framework I get:
"{some-path-with-UDID}/data/Containers/Data/Application/{UDID}/Documents/.config/.isolated-storage"

and for .NET 7 for iOS I get:
"{some-path-with-UDID}/data/Containers/Data/Application/{UDID}/Documents/.isolated-storage/uygfypsp.kjn/qxiowk50.cd0/AppFiles/"

and that's the reason the app does not see previously stored data.

I see similiar problem described in #74642, but it does not seem to be resolved to me.

Reproduction Steps

  1. Create plain .NET for iOS project from VS for Mac or any other IDE.
  2. Run the project and check out the path from IsolatedStorageFile.GetUserStoreForApplication().
  3. Create plain old Xamarin.iOS project.
  4. Run the project and check out the path from IsolatedStorageFile.GetUserStoreForApplication(), and then compare it to path retrieved from when using .NET 7 for iOS.

Expected behavior

IsolatedStorageFile.GetUserStoreForApplication() should be exact the same using Xamarin.iOS and .NET 7 for iOS.

Actual behavior

Paths are different.

Regression?

No response

Known Workarounds

No response

Configuration

dotnet workload: ios 16.2.1024/7.0.100 SDK 7.0.200
TargetFramework: net7.0-ios

Other information

No response

Author: akrol95
Assignees: mkhamoyan
Labels:

area-System.IO, os-ios

Milestone: 8.0.0

@mkhamoyan
Copy link
Contributor

Fixed by #83380

@ghost ghost locked as resolved and limited conversation to collaborators Sep 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants