Does anyone know what the StoreKit2 equivalent to original StoreKit's SKPaymentQueue.presentCodeRedemptionSheet() is?
I'm not seeing anything in the docs that appears to handle Offer Codes specifically. Yes, there's
static func promotionalOffer(offerID: String, keyID: String, nonce: UUID, signature: Data, timestamp: Int) -> Product.PurchaseOption
but promotional offers are a separate thing to Offer codes, I believe.
Appreciate any pointers anyone has on how to allow in-app redemption of an Offer Code using StoreKit2.
I'm assuming I should not include original StoreKit as well as StoreKit2 and call the older API, right?
Post
Replies
Boosts
Views
Activity
I have some uncontroversial code that used to work perfectly in iOS 12 (and I think 13, from memory):
let cropRect = mapVC.view.frame.inset(by: mapVC.view.safeAreaInsets).inset(by: mapVC.mapEdgeInsets)
let mapRenderer = UIGraphicsImageRenderer(bounds: cropRect)
let img = renderer.image(actions: { _ in
mapVC.view.drawHierarchy(in: mapVC.view.bounds, afterScreenUpdates: true)
})
Now, I'm getting a partially rendered image (only the top 8-10 px or so - the rest is white/blank), and this message in the debugger:
[Unknown process name] vImageConvert_AnyToAny - failed width = 0 height = 1 dst component = 16bit float dstLayout = ByteOrder16Little dstBytesPerRow = 0 src component = 16bit integer srcLayout = ByteOrder16Little srcBytesPerRow = 0
There seems to be very little online about this error and I have no clue where to start with it.
The issue arises when calling .jpegData or .pngData methods on mapRenderer.
No other changes to the view hierarchy or the rendered view since this was working just fine.
Any suggestions?
Xcode 12.4, iOS 14.3 running on an iPhone XS Max.