|
@@ -30,7 +30,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|
|
|
|
|
var window: UIWindow?
|
|
|
|
|
|
- func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
|
|
|
+ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
|
|
|
|
|
|
setupIAP()
|
|
|
|
|
@@ -61,7 +61,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|
|
SwiftyStoreKit.updatedDownloadsHandler = { downloads in
|
|
|
|
|
|
// contentURL is not nil if downloadState == .finished
|
|
|
- let contentURLs = downloads.flatMap { $0.contentURL }
|
|
|
+ let contentURLs = downloads.compactMap { $0.contentURL }
|
|
|
if contentURLs.count == downloads.count {
|
|
|
print("Saving: \(contentURLs)")
|
|
|
SwiftyStoreKit.finishTransaction(downloads[0].transaction)
|