iOS Question DocumentPickerViewController, can't select a .db file

marcick

Well-Known Member
Licensed User
Longtime User
The question has been already posted here but the solution does not work for me.
I checked with "public.database", "public.data" and "public.contents" but the .db files are grayed not selectable

B4X:
    Dim DocumentPicker As DocumentPickerViewController
    DocumentPicker.InitializeImport("picker", Array("public.content"))
    DocumentPicker.Show(pg, Sender)

Running on Iphone 6 IOS 12.5.6
Any hint ?
 

Alexander Stolte

Expert
Licensed User
Longtime User
Any hint ?
try public.data thats working for my db backups
B4X:
Dim DocumentPicker As DocumentPickerViewController
DocumentPicker.InitializeImport("picker", Array("public.data"))
DocumentPicker.Show(B4XPages.GetNativeParent(Me), xsbtn_restore.mBase)
Wait For Picker_Complete (Success As Boolean, URLs As List)
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
Thank you but as I wrote, "I checked with "public.database", "public.data" and "public.contents" but the .db files are grayed not selectable"
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
try it togehter with:
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
nothing, doesn't work ....
(anyway I don't want file.dirdocument be accessible from file app)

I can see and select other files (as text or csv) but not the.db
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
My solution works!
Look in the example project.
IOS 16.2

Running on Iphone 6 IOS 12.5.6
i see, you are using an very old version of ios...

It is a version with a current security update. But from version 12-16 has done a lot to IOS, I think that is the error.
 

Attachments

  • test.zip
    3 KB · Views: 143
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
i see, you are using an very old version of ios...

It is a version with a current security update. But from version 12-16 has done a lot to IOS, I think that is the error.

Yes, that is the problem ... tested now on another Iphone12 and works fine as you say.
I'm using this Iphone6 for developing and it's a good device, I don't want to limit my app excluding IOS12.
The latest IOS version available for this device is 12.5.6

So, what to do ?
Maybe I can change the file extension creating a custom identifier ?
Thanks
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…