Hi Guys
This got me puzzling for the last 2 hours, and can get it sorted
In my one B4i App this works 100%
In a second app, it don't work
Ive confirmed that the wlife.db is in the files folder of this project
Please advice, thanks, Appreciate
Danie
This got me puzzling for the last 2 hours, and can get it sorted
In my one B4i App this works 100%
B4X:
Dim localdb As String :localdb="gsm/data/gsm.db"
File.MakeDir(File.DirDocuments,"gsm/data")
If File.Exists(File.DirDocuments,"gsm/data/gsm.db") = False Then
File.Copy(File.DirAssets,"gsm.db",File.DirDocuments,localdb)
Log("cannot find db, copy")
Else
Log("find db, ")
End If
In a second app, it don't work
B4X:
Dim localdb As String :localdb="MyApp/data/wlife.db"
File.MakeDir(File.DirDocuments,"MyApp/data")
If File.Exists(File.DirDocuments,"MyApp/data/wlife.db") = False Then
File.Copy(File.DirAssets,"wlife.db",File.DirDocuments,localdb)
Log("cannot find db, copy")
Else
Log("find db, ")
End If
Ive confirmed that the wlife.db is in the files folder of this project
B4X:
Error copying file: Error Domain=NSCocoaErrorDomain Code=4 "The operation couldn’t be completed. (Cocoa error 4.)" UserInfo=0x165f20a0 {NSSourceFilePathErrorKey=/private/var/mobile/Applications/65FD4191-E26F-4080-8EB4-DBF25AC201F8/tmp/virtual_assets/wlife.db, NSUserStringVariant=(
Copy
), NSFilePath=/private/var/mobile/Applications/65FD4191-E26F-4080-8EB4-DBF25AC201F8/tmp/virtual_assets/wlife.db, NSDestinationFilePath=/var/mobile/Applications/65FD4191-E26F-4080-8EB4-DBF25AC201F8/Documents/leznad/wildMang/data/wlife.db, NSUnderlyingError=0x165f18c0 "The operation couldn’t be completed. No such file or
Please advice, thanks, Appreciate
Danie