expo-targets 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,10 @@ open class ExpoTargetsDocumentsProvider : DocumentsProvider() {
17
17
  private val rootId = "expo_targets_root"
18
18
  private val docRoot = "root"
19
19
 
20
- override fun onCreate(): Boolean = true
20
+ override fun onCreate(): Boolean {
21
+ ensureSeedFile()
22
+ return true
23
+ }
21
24
 
22
25
  private fun docsDir(): File {
23
26
  val dir = File(context!!.filesDir, "expo_targets_docs")
@@ -25,6 +28,14 @@ open class ExpoTargetsDocumentsProvider : DocumentsProvider() {
25
28
  return dir
26
29
  }
27
30
 
31
+ /** Seed a visible file so DocumentsUI / Files can prove the root is live. */
32
+ private fun ensureSeedFile() {
33
+ val seed = File(docsDir(), "et-fp-seed.txt")
34
+ if (!seed.exists()) {
35
+ seed.writeText("expo-targets file-provider seed\n")
36
+ }
37
+ }
38
+
28
39
  override fun queryRoots(projection: Array<out String>?): Cursor {
29
40
  val cols =
30
41
  projection
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-targets",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "Expo config plugin for Apple targets and Android app extensions",
5
5
  "main": "build/src/index.js",
6
6
  "types": "build/src/index.d.ts",