Hi,
I'm trying to use the new in app purchace promotion apis - in particular the visibility ones. Though this is something I can't replicate locally, I am consistently getting crash reports. See end of message. I can't figure out what they mean or what they are happening. when my app starts up, I fetch all product types and update their visibiity accordingly. Everything is stored with a strong reference. Here's an example of the code (using swiftystorekit):
SwiftyStoreKit.retrieveProductsInfo(Set(productIdsToFormattedPrice.keys)) { [weak self] result in
for product in result.retrievedProducts {
if (self?.settings.isAppleWatchUpgraded() ?? false) {
self?.storePromotions?.hide(product: product)
} else {
self?.storePromotions?.promote(product: product)
}
}
storePromotions is a strong wrapper over SKProductStorePromotionController, which it accesses with SKProductStorePromotionController.default()
Does anyone have an idea of what this is?
Thank you
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000010
VM Region Info: 0x10 is not in any region. Bytes before following region: 4296556528
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 0000000100184000-0000000100188000 [ 16K] r-x/r-x SM=COW ...pp/CycleMaps]
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]
Triggered by Thread: 2
Thread 2 name:
Thread 2 Crashed:
0 StoreKit 0x0000000197968598 __97-[SKProductStorePromotionController updateStorePromotionVisibility:forProduct:completionHandler:]_block_invoke + 220 (SKProductStorePromotionController.m:83)
1 StoreKit 0x000000019795d1e4 __50-[SKPromotedIAPSetVisibilityRequest _handleReply:]_block_invoke + 56 (SKPromotedIAPSetVisibilityRequest.m:54)
2 StoreKit 0x000000019795d1e4 __50-[SKPromotedIAPSetVisibilityRequest _handleReply:]_block_invoke + 56 (SKPromotedIAPSetVisibilityRequest.m:54)
3 libdispatch.dylib 0x0000000183fe1088 _dispatch_call_block_and_release + 24 (init.c:994)