Post

Replies

Boosts

Views

Activity

Crash while requesting SKProducts
I am unable to understand what's causing this crash. This crash is very rare but consistent. Crashed: com.apple.root.default-qos 0 libswiftCore.dylib 0x1a6249d8c swift_isUniquelyReferenced_nonNull_native + 34 1 MyApp 0x104a2bf7c @objc IAPHandler.productsRequest(_:didReceive:) + 4301487996 (compiler-generated:4301487996) 2 StoreKit 0x1bf3fd6dc __27-[SKProductsRequest _start]_block_invoke_2 + 184 3 libdispatch.dylib 0x1a2149298 _dispatch_call_block_and_release + 24 4 libdispatch.dylib 0x1a214a280 _dispatch_client_callout + 16 5 libdispatch.dylib 0x1a21228bc _dispatch_queue_override_invoke + 676 6 libdispatch.dylib 0x1a212f450 _dispatch_root_queue_drain + 344 7 libdispatch.dylib 0x1a212fbf0 _dispatch_worker_thread2 + 112 8 libsystem_pthread.dylib 0x1ead35568 _pthread_wqthread + 212 9 libsystem_pthread.dylib 0x1ead38874 start_wqthread + 8 Here is the implementation of SKProductsRequestDelegate delegate method: func productsRequest (_ request: SKProductsRequest, didReceive response: SKProductsResponse) {         guard response.products.count 0 else {             return         }         let iapProducts = response.products var iapProductsDict = [String : SKProduct]()         for product in iapProducts {             iapProductsDict[product.productIdentifier] = product     } }
4
0
2k
Nov ’22