I have strange issue
the following code, works fine on my iphone 4 with ios 7
and crashes on iphone 5 with ios 8
1. Why?
2. How can I get some data on the crash, I got nothing (meaning they guy show me app is closing and no output on screen)
since this happen while he press "yes" and does not happen while he press "no" I am assuming this is related to local db
the following code, works fine on my iphone 4 with ios 7
and crashes on iphone 5 with ios 8
1. Why?
2. How can I get some data on the crash, I got nothing (meaning they guy show me app is closing and no output on screen)
since this happen while he press "yes" and does not happen while he press "no" I am assuming this is related to local db
B4X:
Sub Msg_Click(ButtonText As String)
If ButtonText="yes" Then
WriteToFavorite
Else
Register
End If
End Sub
B4X:
Sub WriteToFavorite
HD.ProgressDialogShow("writing data")
Dim Cursor1 As ResultSet
If Not(File.Exists(File.DirDocuments,"My.db")) Then
File.Copy(File.DirAssets,"My.db",File.DirDocuments,"My.db")
End If
If SQL1.IsInitialized = False Then
SQL1.Initialize(File.DirDocuments,"My.db", False)
End If
Cursor1 = SQL1.ExecQuery("SELECT * FROM Favorite WHERE CustomerPhone='" & Main.CustomerPhone & "'")
If Cursor1.NextRow Then
HD.ToastMessageShow ("already exist",False)
Else
SQL1.ExecNonQuery("INSERT INTO Favorite (CustomerName, CustomerName2, City, Street, Number, AptNum, Floor, ContactPerson, CustomerPhone, Email, Lat, Lon) VALUES ('" & Main.CustomerName & "','" & Main.CustomerName2 & "','" & Main.City & "','" & Main.Street & "','" & Main.Number & "','" & Main.AptNum & "','" & Main.Floor1 & "','" & Main.ContactPerson & "','" & Main.CustomerPhone & "','" & Main.Email1 & "','" & Main.Lat & "','" & Main.Lon & "')")
End If
Register
End Sub