2
votes

My current company is migrating app from Xamarin to React Native. The problem is to get current token stored in SQLite in Xamarin, from React Native.

This is the code to initialize SQLite in Xamarin:

public static SQLiteConnection conn = new SQLiteConnection(System.IO.Path.Combine
        (System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "user.db"));


I tried to retrieve from RN using this: https://github.com/andpor/react-native-sqlite-storage

But it seems that we need to specify the folder path. And I don't know where the folder path is in Xamarin.



Thank you in advance for your answers.

1

1 Answers

2
votes

System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal)

  • In Android: /data/data/@PACKAGE_NAME@/files
  • In iOS: @APP_PATH@/Documents