-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.xojo_code
More file actions
32 lines (24 loc) · 793 Bytes
/
Copy pathApp.xojo_code
File metadata and controls
32 lines (24 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#tag Class
Protected Class App
Inherits MobileApplication
#tag CompatibilityFlags = TargetIOS
#tag Event
Sub Opening()
Var dbFile As FolderItem = SpecialFolder.Resource("data.sqlite")
If Not SpecialFolder.Documents.Child("data.sqlite").Exists Then
// Only copy the file if it is not already there
Var dest As FolderItem = SpecialFolder.Documents.Child("data.sqlite")
try
dbFile.CopyTo(dest)
Catch error As IOException
MessageBox(error.Message)
End Try
End If
Var dest As FolderItem = SpecialFolder.Documents.Child("data.sqlite")
//Check Database Structure
Var Sync as new SyncDatabase
Sync.SynchronizeSQLiteDatabases(dbFile,dest)
End Sub
#tag EndEvent
End Class
#tag EndClass