I am using StoreKit for in app rating. but whenever I call SKStoreReviewController requestReview method, the app get stuck and after a while the review View presented and then app get to normal state. Why this happened and if there is any solution for it?
I have another question, is write a review is necessary (i.e) i don't want to open app store for writing a review, i want that user just submit a review and remain in the app.
I call SKStoreReviewController requestReview method, the app get stuck and after a while the review View presented and then app get to normal state.
Place a breakpoint on the line where you call requestReview
and make sure this is happening on your main thread.
I don't want to open app store for writing a review, i want that user just submit a review and remain in the app.
Per app store guidelines now, you absolutely most use this for reviews, so there is no alternative approach or customization available that you may use when submitting new & updated apps now.
You can see here under section 1.1.7.
I have additional information under this answer that may be of use as well for handling review requests.
I just encountered this same issue. But (at least as far as I can tell) only in the debug version of my app. I have no way of fixing it. But it appears that the storekit is trying to connect to some Apple server, and sometimes that connection takes long.
And while the connection is trying to be established, the whole main queue is frozen. Nothing gets through.
I made some syslog. And at some point I see this happening:
Mar 4 18:17:37 RetepV StoreKitUIService(CFNetwork)[14436] <Notice>: Task <F9F9DB85-B649-43CC-A3D6-B8E931BF9ADA>.<27> resuming, QOS(0x19)
Mar 4 18:17:37 RetepV StoreKitUIService(CFNetwork)[14436] <Notice>: Task <F9F9DB85-B649-43CC-A3D6-B8E931BF9ADA>.<27> {strength 0, tls 4, ct 0, sub 0, sig 1, ciphers 0, bundle 1, builtin 0}
Mar 4 18:17:37 RetepV StoreKitUIService(CFNetwork)[14436] <Notice>: TIC Enabling TLS [29:0x280586a00]
Mar 4 18:17:37 RetepV StoreKitUIService(CFNetwork)[14436] <Notice>: TIC TCP Conn Start [29:0x280586a00]
Mar 4 18:17:37 RetepV StoreKitUIService(libnetwork.dylib)[14436] <Notice>: [C29 Hostname#68464834:443 tcp, url hash: 11d80191, tls] start
Mar 4 18:17:37 RetepV StoreKitUIService(libnetwork.dylib)[14436] <Notice>: nw_connection_report_state_with_handler_locked [C29] reporting state preparing
Mar 4 18:17:37 RetepV StoreKitUIService(CFNetwork)[14436] <Notice>: Task <F9F9DB85-B649-43CC-A3D6-B8E931BF9ADA>.<27> setting up Connection 29
.
Then a whole lot of stuff is happening that's not related to connection C29. And the first time I see C29 pop up again is 31 seconds later:
Mar 4 18:18:08 RetepV StoreKitUIService(libnetwork.dylib)[14436] <Notice>: nw_endpoint_flow_protocol_connected [C29.1 IPv4#9566630f:443 in_progress channel-flow (satisfied)] Transport protocol connected
.
And I had already observed that my app was frozen for about 30 seconds.
I don't see how I can fix this, it's an API call of exactly 1 line. This is something that only Apple must fix. An API function that can freeze the app for some unknown amount of time is not good.
Edit:
NOTE: My requestReview call is always made on the main thread.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With