Solution:
MyStore.RequestProductsInformation(ids) 'ids is empty
if the list passed, is empty, will throw the below error.
On iOS 18.2 if I compile on release, either TestFlight or simulator, when invoking the istore class, the app crashes.
I asked to IA, to summarize the crash, and it shows in the attached image
Code is nothing out of this world.
the first txt file is from apple, the second one is from the simulator.
following erels tutorial for app crashes:
the thread that crashed is 15, and there isnt any line related to the app
update 2:
MyStore.RequestProductsInformation(ids)
when commenting this line, crashing stops.
MyStore.RequestProductsInformation(ids) 'ids is empty
if the list passed, is empty, will throw the below error.
On iOS 18.2 if I compile on release, either TestFlight or simulator, when invoking the istore class, the app crashes.
I asked to IA, to summarize the crash, and it shows in the attached image
Code is nothing out of this world.
B4X:
Public Sub Initialize As Object
#if b4i
MyStore.Initialize("MyStore")
#End If
Return Me
End Sub
private Sub fillIAPItems
Dim ids As List
ids.Initialize
For Each product As Map In TheProducts
Dim apple_id As String = product.Get("apple_id")
If apple_id = "" Then Continue
ids.Add(product.Get("apple_id"))
Next
MyStore.RequestProductsInformation(ids)
End Sub
private Sub MyStore_InformationAvailable (Success As Boolean, Products As List)
If Success Then
Dim items As List
items.Initialize
For Each product As ProductInformation In Products
items.Add($"${product.Title} ${product.LocalizedPrice}"$)
Next
SuscriptionSelectorIAP.SetItems(items)
SuscriptionSelectorIAP.Tag = Products
End If
End Sub
the first txt file is from apple, the second one is from the simulator.
following erels tutorial for app crashes:
Symbolicating a crash report
I will cover the steps required to symbolicate a crash report received from Apple. The result is a readable stack trace. It requires a local Mac. The crash report is a text file that looks like: 1. Find the binary address: 2. Unzip the Archive.zip (the one used when uploading the app)...
www.b4x.com
the thread that crashed is 15, and there isnt any line related to the app
Thread 15 Crashed:
0 libsystem_kernel.dylib 0x10c7c4db6 __pthread_kill + 10
1 libsystem_pthread.dylib 0x10d032ebd pthread_kill + 262
2 libsystem_c.dylib 0x10c0b0d25 abort + 134
3 libswiftCore.dylib 0x10d97af51 swift::fatalErrorv(unsigned int, char const*, __va_list_tag*) + 129
4 libswiftCore.dylib 0x10d97afdb swift::fatalError(unsigned int, char const*, ...) + 123
5 libswiftCore.dylib 0x10d970d47 swift::swift_dynamicCastFailure(void const*, char const*, void const*, char const*, char const*) + 71
6 libswiftCore.dylib 0x10d970dba swift::swift_dynamicCastFailure(swift::TargetMetadata<swift::InProcess> const*, swift::TargetMetadata<swift::InProcess> const*, char const*) + 106
7 libswiftCore.dylib 0x10d97574a swift_dynamicCast + 250
8 Foundation 0x109ff9829 closure #1 in static Set._forceBridgeFromObjectiveC(_:result + 105
9 Foundation 0x109f22271 partial apply for closure #1 in NSRunLoop.schedule(after:interval:toleranceptions:_ + 17
10 Foundation 0x109ff98d2 thunk for @escaping @callee_guaranteed (@in_guaranteed Any, @unowned UnsafeMutablePointer<ObjCBool>) -> () + 66
11 CoreFoundation 0x108b3d356 __NSSET_IS_CALLING_OUT_TO_A_BLOCK__ + 7
12 CoreFoundation 0x108b898a2 -[__NSSetI enumerateObjectsWithOptions:usingBlock:] + 165
13 Foundation 0x109ff962a static Set._forceBridgeFromObjectiveC(_:result + 442
14 Foundation 0x109ff93e4 static Set._unconditionallyBridgeFromObjectiveC(_ + 36
15 StoreKit 0x106b5433d 0x106abe000 + 615229
16 StoreKit 0x106b54a81 0x106abe000 + 617089
17 StoreKit 0x106b0a7f7 0x106abe000 + 313335
18 StoreKit 0x106b0a7f7 0x106abe000 + 313335
19 StoreKit 0x106b0a7f7 0x106abe000 + 313335
20 StoreKit 0x106b0a7f7 0x106abe000 + 313335
21 StoreKit 0x106b06410 0x106abe000 + 295952
22 StoreKit 0x106b064a5 0x106abe000 + 296101
23 StoreKit 0x106b1f70e 0x106abe000 + 399118
0 libsystem_kernel.dylib 0x10c7c4db6 __pthread_kill + 10
1 libsystem_pthread.dylib 0x10d032ebd pthread_kill + 262
2 libsystem_c.dylib 0x10c0b0d25 abort + 134
3 libswiftCore.dylib 0x10d97af51 swift::fatalErrorv(unsigned int, char const*, __va_list_tag*) + 129
4 libswiftCore.dylib 0x10d97afdb swift::fatalError(unsigned int, char const*, ...) + 123
5 libswiftCore.dylib 0x10d970d47 swift::swift_dynamicCastFailure(void const*, char const*, void const*, char const*, char const*) + 71
6 libswiftCore.dylib 0x10d970dba swift::swift_dynamicCastFailure(swift::TargetMetadata<swift::InProcess> const*, swift::TargetMetadata<swift::InProcess> const*, char const*) + 106
7 libswiftCore.dylib 0x10d97574a swift_dynamicCast + 250
8 Foundation 0x109ff9829 closure #1 in static Set._forceBridgeFromObjectiveC(_:result + 105
9 Foundation 0x109f22271 partial apply for closure #1 in NSRunLoop.schedule(after:interval:toleranceptions:_ + 17
10 Foundation 0x109ff98d2 thunk for @escaping @callee_guaranteed (@in_guaranteed Any, @unowned UnsafeMutablePointer<ObjCBool>) -> () + 66
11 CoreFoundation 0x108b3d356 __NSSET_IS_CALLING_OUT_TO_A_BLOCK__ + 7
12 CoreFoundation 0x108b898a2 -[__NSSetI enumerateObjectsWithOptions:usingBlock:] + 165
13 Foundation 0x109ff962a static Set._forceBridgeFromObjectiveC(_:result + 442
14 Foundation 0x109ff93e4 static Set._unconditionallyBridgeFromObjectiveC(_ + 36
15 StoreKit 0x106b5433d 0x106abe000 + 615229
16 StoreKit 0x106b54a81 0x106abe000 + 617089
17 StoreKit 0x106b0a7f7 0x106abe000 + 313335
18 StoreKit 0x106b0a7f7 0x106abe000 + 313335
19 StoreKit 0x106b0a7f7 0x106abe000 + 313335
20 StoreKit 0x106b0a7f7 0x106abe000 + 313335
21 StoreKit 0x106b06410 0x106abe000 + 295952
22 StoreKit 0x106b064a5 0x106abe000 + 296101
23 StoreKit 0x106b1f70e 0x106abe000 + 399118
update 2:
MyStore.RequestProductsInformation(ids)
when commenting this line, crashing stops.
Attachments
Last edited: