Fix crash on in-app purchase
Concurrency issue. Purchase is however credited after app relaunch.
This commit is contained in:
parent
414ba01dad
commit
83b6adbf86
|
@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## 1.15.3 Beta 2669 (2021-07-16)
|
||||
## Unreleased
|
||||
|
||||
### Added
|
||||
|
||||
|
@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
### Fixed
|
||||
|
||||
- Crash when adding dynamically updated provider.
|
||||
- In-app purchases might crash the app and not be credited until relaunch.
|
||||
|
||||
## 1.15.2 (2021-04-17)
|
||||
|
||||
|
|
|
@ -298,13 +298,17 @@ public class ProductManager: NSObject {
|
|||
|
||||
extension ProductManager: SKPaymentTransactionObserver {
|
||||
public func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) {
|
||||
reloadReceipt()
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
self?.reloadReceipt()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension ProductManager: SKRequestDelegate {
|
||||
public func requestDidFinish(_ request: SKRequest) {
|
||||
reloadReceipt()
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
self?.reloadReceipt()
|
||||
}
|
||||
inApp.restorePurchases { [weak self] (finished, _, error) in
|
||||
guard finished else {
|
||||
return
|
||||
|
|
4
Podfile
4
Podfile
|
@ -16,13 +16,13 @@ end
|
|||
def shared_pods_ios
|
||||
shared_pods
|
||||
for spec in ['About', 'Alerts', 'Dialogs', 'InApp', 'Misc', 'Options', 'Persistence', 'Reviewer', 'Tables', 'WebServices'] do
|
||||
pod "Convenience/#{spec}", :git => 'https://github.com/keeshux/convenience', :commit => 'b30816a'
|
||||
pod "Convenience/#{spec}", :git => 'https://github.com/keeshux/convenience', :commit => '5ed1fe0'
|
||||
end
|
||||
end
|
||||
def shared_pods_macos
|
||||
shared_pods
|
||||
for spec in ['InApp', 'Misc', 'Persistence', 'Reviewer', 'WebServices'] do
|
||||
pod "Convenience/#{spec}", :git => 'https://github.com/keeshux/convenience', :commit => 'b30816a'
|
||||
pod "Convenience/#{spec}", :git => 'https://github.com/keeshux/convenience', :commit => '5ed1fe0'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
26
Podfile.lock
26
Podfile.lock
|
@ -39,16 +39,16 @@ PODS:
|
|||
- TunnelKit/Manager
|
||||
|
||||
DEPENDENCIES:
|
||||
- Convenience/About (from `https://github.com/keeshux/convenience`, commit `b30816a`)
|
||||
- Convenience/Alerts (from `https://github.com/keeshux/convenience`, commit `b30816a`)
|
||||
- Convenience/Dialogs (from `https://github.com/keeshux/convenience`, commit `b30816a`)
|
||||
- Convenience/InApp (from `https://github.com/keeshux/convenience`, commit `b30816a`)
|
||||
- Convenience/Misc (from `https://github.com/keeshux/convenience`, commit `b30816a`)
|
||||
- Convenience/Options (from `https://github.com/keeshux/convenience`, commit `b30816a`)
|
||||
- Convenience/Persistence (from `https://github.com/keeshux/convenience`, commit `b30816a`)
|
||||
- Convenience/Reviewer (from `https://github.com/keeshux/convenience`, commit `b30816a`)
|
||||
- Convenience/Tables (from `https://github.com/keeshux/convenience`, commit `b30816a`)
|
||||
- Convenience/WebServices (from `https://github.com/keeshux/convenience`, commit `b30816a`)
|
||||
- Convenience/About (from `https://github.com/keeshux/convenience`, commit `5ed1fe0`)
|
||||
- Convenience/Alerts (from `https://github.com/keeshux/convenience`, commit `5ed1fe0`)
|
||||
- Convenience/Dialogs (from `https://github.com/keeshux/convenience`, commit `5ed1fe0`)
|
||||
- Convenience/InApp (from `https://github.com/keeshux/convenience`, commit `5ed1fe0`)
|
||||
- Convenience/Misc (from `https://github.com/keeshux/convenience`, commit `5ed1fe0`)
|
||||
- Convenience/Options (from `https://github.com/keeshux/convenience`, commit `5ed1fe0`)
|
||||
- Convenience/Persistence (from `https://github.com/keeshux/convenience`, commit `5ed1fe0`)
|
||||
- Convenience/Reviewer (from `https://github.com/keeshux/convenience`, commit `5ed1fe0`)
|
||||
- Convenience/Tables (from `https://github.com/keeshux/convenience`, commit `5ed1fe0`)
|
||||
- Convenience/WebServices (from `https://github.com/keeshux/convenience`, commit `5ed1fe0`)
|
||||
- Kvitto
|
||||
- MBProgressHUD
|
||||
- SSZipArchive
|
||||
|
@ -67,12 +67,12 @@ SPEC REPOS:
|
|||
|
||||
EXTERNAL SOURCES:
|
||||
Convenience:
|
||||
:commit: b30816a
|
||||
:commit: 5ed1fe0
|
||||
:git: https://github.com/keeshux/convenience
|
||||
|
||||
CHECKOUT OPTIONS:
|
||||
Convenience:
|
||||
:commit: b30816a
|
||||
:commit: 5ed1fe0
|
||||
:git: https://github.com/keeshux/convenience
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
|
@ -85,6 +85,6 @@ SPEC CHECKSUMS:
|
|||
SwiftyBeaver: 84069991dd5dca07d7069100985badaca7f0ce82
|
||||
TunnelKit: 068ff24480fa0f10e2209f3e9a75cfed9b4d78ec
|
||||
|
||||
PODFILE CHECKSUM: 1ee335adb14f0e5517ddeed41e8bed5b0de59ec9
|
||||
PODFILE CHECKSUM: f88917df911decd28e1ada0b866f3370fb4ae70e
|
||||
|
||||
COCOAPODS: 1.10.1
|
||||
|
|
Loading…
Reference in New Issue