Hi,
when using the “lst.sort” function, all my apps from iOS 18 onwards crashed.
Here is my code:
Here is part of the crash:
when using the “lst.sort” function, all my apps from iOS 18 onwards crashed.
Here is my code:
B4X:
Private Sub goShowSavedLaps
Dim lst As List
Dim strTmp As String
lst.Initialize
'Eine Liste mit alle Dokumenten erstellen
lst = File.ListFiles(File.DirDocuments)
If lst.Size > 0 Then
lst.Sort(True)
clvStoredRace.Clear
For i = 0 To lst.Size -1
strTmp = lst.get(i)
If strTmp.EndsWith(ext) Then
strTmp = strTmp.Replace(ext,"")
clvStoredRace.Add(CreateLapListItem(strTmp, clvStoredRace.GetWidth, 50dip), lst.get(i))
End If
Next
Else
hd.ToastMessageShow("NoLapSaved"), True)
End If
End Sub
Here is part of the crash:
Date/Time: 2024-09-18 12:47:50.823 +0200
OS Version: iPadOS 18.0 (22A3354)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000 at 0x0000000000000000
Crashed Thread: 0
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Swift.__SwiftDeferredNSArray sortUsingComparator:]: unrecognized selector sent to instance 0x3034c37c0'