Post

Replies

Boosts

Views

Activity

iOS 17 Xcode 15 during Unit Test restoreCompletedTransactions always Fails
When calling SKPaymentQueue.default().restoreCompletedTransactions() during unit testing it always fails. It calls the restoreCompletedTransactionsFailedWithError with an error message: Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={NSLocalizedDescription=The network connection was lost., NSUnderlyingError=0x600000eb2790 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={_kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-4, NSErrorPeerAddressKey={length = 28, bytes = 0x1c1ef212 00000000 00000000 00000000 ... 00000001 00000000 }}}} This is/was working fine in iOS 16 and Xcode 14. Anyone else seen this issue?
3
1
1.1k
Sep ’23
Memory Crash on layoutIfNeeded()
Can anyone help me diagnose this crash. It happens in the animation block on the layoutIfNeeded() function call. Full function and. crash report attached.     private func showWarningView() {         DispatchQueue.main.async { [weak self] in             guard let strongSelf = self else { return }             if let safeAreaHeight = strongSelf.superview?.safeAreaLayoutGuide.layoutFrame.size.height {                 let visibleBannerHeight: CGFloat = strongSelf.isBannerVisible ? strongSelf.bannerHeight : 0                 let newConstraintConstant = (safeAreaHeight - strongSelf.externalBottomOffset - visibleBannerHeight) - strongSelf.warningBannerHeight                 strongSelf.addInternalBottomOffset(with: strongSelf.warningBannerHeight)                 strongSelf.warningViewTopConstraint.constant = newConstraintConstant             }             strongSelf.isWarningViewVisible = true             let showWarningView = UIViewPropertyAnimator(duration: 0.25, curve: .easeIn, animations: {                 self?.layoutIfNeeded()             })             showWarningView.startAnimation()         }     } Crash Report
0
1
1.3k
Jun ’22