diff --git a/CHANGELOG.md b/CHANGELOG.md index f4232fe2..2f54e434 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## Changelog +### 2.2.2 + +1. Добавили поддержку Xcode 11, iOS 13, ThreatMetrix iOS SDK 5.4-84 + ### 2.2.1 1. Обновили `UIWebView` на `WKWebView` diff --git a/Podfile.lock b/Podfile.lock index bbbaa7c2..bb4e2dec 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -4,7 +4,7 @@ PODS: - Reveal-SDK (24) - SwiftLint (0.34.0) - When (4.0.0) - - YandexCheckoutPayments (2.2.0): + - YandexCheckoutPayments (2.2.2): - FunctionalSwift (~> 1.1.0) - When (~> 4.0.0) - YandexCheckoutPaymentsApi (~> 1.5.0) @@ -63,7 +63,7 @@ SPEC CHECKSUMS: Reveal-SDK: 5d7e56b8f018c0a88b3a2c10bf68d598bbd3b071 SwiftLint: 79d48a17c6565dc286c37efb8322c7b450f95c67 When: 4ffc88d535a094ad4bd5eaf2fd187de747e716d1 - YandexCheckoutPayments: 3329bb2e6d7c9228d4c0de9152c41ae4e890025b + YandexCheckoutPayments: 1aefd76d9512cdf91a4aab1fbcf058ae8588d33a YandexCheckoutPaymentsApi: e3f45d08993fc8e67f63c28d194b04d25a31e303 YandexCheckoutShowcaseApi: 44382163176b3a53692fa1c3b85c0c8d0a82b7e6 YandexCheckoutWalletApi: 5d2774cd1216ee0ce47d6412184008b37caeaeac diff --git a/README.md b/README.md index 872c5971..9d561c6b 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ - [Код демо-приложения, которое интегрирует SDK](https://github.com/yandex-money/yandex-checkout-payments-swift/tree/master/YandexCheckoutPaymentsExample) - [Документация](https://yandex-money.github.io/yandex-checkout-payments-swift/) +--- + - [Yandex Checkout Payments SDK](#yandex-checkout-payments-sdk) - [Changelog](#changelog) - [Migration guide](#migration-guide) @@ -81,8 +83,16 @@ > `Your Target Name` - название таргета в Xcode для вашего приложения.\ > `tag` - версия SDK. Актуальную версию можно узнать на github в разделе [releases](https://github.com/yandex-money/yandex-checkout-payments-swift/releases). -3. Добавьте библиотеку TrustDefender.framework в папку Frameworks.\ - [Подробнее про TrustDefender](#trustdefender). +### Carthage + +На текущий момент Carthage не поддерживается. + +### TrustDefender + +Чтобы получить файл `.framework`, [зарегистрируйтесь в Яндекс.Кассе](https://kassa.yandex.ru/joinups) +и сообщите вашему менеджеру, что хотите подключить мобильный SDK. + +1. Добавьте библиотеку `TrustDefender.framework` в папку `Frameworks`. ```txt App @@ -91,14 +101,11 @@ └─ TrustDefender.framework ``` -### Carthage - -На текущий момент Carthage не поддерживается. +2. Если во время запуска проекта вы видите ошибку `dyld: Library not loaded: @rpath/TrustDefender.framework/TrustDefender`, добавьте TrustDefender.framework в `Embedded Binaries`(в Xcode 10.3 или меньше), или в `Frameworks, Libraries, and Embedded Content`(в Xcode 11) -### TrustDefender +3. Добавьте в `Build Phases` -> `New Run Script Phase`, и добавьте скрипт из файла `strip_framework.sh` -Чтобы получить файл `.framework`, [зарегистрируйтесь в Яндекс.Кассе](https://kassa.yandex.ru/joinups) -и сообщите вашему менеджеру, что хотите подключить мобильный SDK. +4. Если во время сборки проекта вы видите сообщение с ошибкой о `TrustDefender.framework/TrustDefender' does not contain bitcode`, необходимо выключить bitcode у основного таргета проекта. ## Быстрая интеграция diff --git a/YandexCheckoutPayments.podspec b/YandexCheckoutPayments.podspec index f08929c0..a1746def 100644 --- a/YandexCheckoutPayments.podspec +++ b/YandexCheckoutPayments.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'YandexCheckoutPayments' - s.version = '2.2.1' + s.version = '2.2.2' s.homepage = 'https://github.com/yandex-money/yandex-checkout-payments-swift' s.license = { :type => "MIT", @@ -32,7 +32,8 @@ Pod::Spec.new do |s| s.pod_target_xcconfig = { 'OTHER_LDFLAGS' => '-framework "TrustDefender"', - 'FRAMEWORK_SEARCH_PATHS' => '"${PODS_ROOT}/../Frameworks"' + 'FRAMEWORK_SEARCH_PATHS' => '"${PODS_ROOT}/../Frameworks"', + 'ENABLE_BITCODE' => 'NO' } s.ios.dependency 'FunctionalSwift', '~> 1.1.0' diff --git a/YandexCheckoutPayments.xcodeproj/project.pbxproj b/YandexCheckoutPayments.xcodeproj/project.pbxproj index 1a7010ef..64e8a5c1 100644 --- a/YandexCheckoutPayments.xcodeproj/project.pbxproj +++ b/YandexCheckoutPayments.xcodeproj/project.pbxproj @@ -658,6 +658,7 @@ 307D0CEB2061918600CAAAE6 /* CardIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CardIO.framework; path = Carthage/Build/iOS/CardIO.framework; sourceTree = ""; }; 30A588232177B792002AFFF1 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = ""; }; 30B24DE0206C2850002C823B /* YandexMobileMetrica.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = YandexMobileMetrica.framework; path = Carthage/Build/iOS/YandexMobileMetrica.framework; sourceTree = ""; }; + 30FFA679234E63EA00B09847 /* TrustDefender.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = TrustDefender.framework; path = Frameworks/TrustDefender.framework; sourceTree = ""; }; 3613164D10E60C57E3B2E8D5 /* Pods-YandexCheckoutPaymentsExamplePods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YandexCheckoutPaymentsExamplePods.debug.xcconfig"; path = "Pods/Target Support Files/Pods-YandexCheckoutPaymentsExamplePods/Pods-YandexCheckoutPaymentsExamplePods.debug.xcconfig"; sourceTree = ""; }; 402EB008C23528C30EA581DE /* BankCardDataInputRouterIO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BankCardDataInputRouterIO.swift; sourceTree = ""; }; 402EB009CEDEC5DB870537E1 /* KeyValueStoring.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyValueStoring.swift; sourceTree = ""; }; @@ -2837,6 +2838,7 @@ E0D529341FE40337005F495F /* Frameworks */ = { isa = PBXGroup; children = ( + 30FFA679234E63EA00B09847 /* TrustDefender.framework */, E072CCA02121AAE7003D9913 /* FunctionalSwift.framework */, E072CCA22121AAE7003D9913 /* When.framework */, E072CCA42121AAE7003D9913 /* YandexCheckoutPaymentsApi.framework */, @@ -3080,6 +3082,7 @@ "${BUILT_PRODUCTS_DIR}/FunctionalSwift/FunctionalSwift.framework", "${PODS_ROOT}/Reveal-SDK/RevealServer/iOS/RevealServer.framework", "${BUILT_PRODUCTS_DIR}/When/When.framework", + "${PODS_ROOT}/../Frameworks/TrustDefender.framework", "${BUILT_PRODUCTS_DIR}/YandexCheckoutPayments/YandexCheckoutPayments.framework", "${BUILT_PRODUCTS_DIR}/YandexCheckoutPaymentsApi/YandexCheckoutPaymentsApi.framework", "${BUILT_PRODUCTS_DIR}/YandexCheckoutShowcaseApi/YandexCheckoutShowcaseApi.framework", @@ -3094,6 +3097,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FunctionalSwift.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RevealServer.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/When.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TrustDefender.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YandexCheckoutPayments.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YandexCheckoutPaymentsApi.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YandexCheckoutShowcaseApi.framework", @@ -4084,6 +4088,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = ./YandexCheckoutPayments/Public/Resources/Entitlements/YandexCheckoutPaymentsExamplePods.entitlements; DEVELOPMENT_TEAM = 2752592HU5; + ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "\"$PODS_CONFIGURATION_BUILD_DIR/FunctionalSwift\"", @@ -4155,6 +4160,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = ./YandexCheckoutPayments/Public/Resources/Entitlements/YandexCheckoutPaymentsExamplePods.debug.entitlements; DEVELOPMENT_TEAM = 2752592HU5; + ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "\"$PODS_CONFIGURATION_BUILD_DIR/FunctionalSwift\"", @@ -4183,6 +4189,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = ./YandexCheckoutPayments/Public/Resources/Entitlements/YandexCheckoutPaymentsExamplePods.inhouse.entitlements; DEVELOPMENT_TEAM = 2752592HU5; + ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "\"$PODS_CONFIGURATION_BUILD_DIR/FunctionalSwift\"", diff --git a/YandexCheckoutPaymentsExample/RootViewController+TokenizationModuleOutput.swift b/YandexCheckoutPaymentsExample/RootViewController+TokenizationModuleOutput.swift index bd3595fa..8f3455cd 100644 --- a/YandexCheckoutPaymentsExample/RootViewController+TokenizationModuleOutput.swift +++ b/YandexCheckoutPaymentsExample/RootViewController+TokenizationModuleOutput.swift @@ -11,11 +11,12 @@ extension RootViewController: TokenizationModuleOutput { self.token = token self.paymentMethodType = paymentMethodType - let successViewController = SuccessViewController() - successViewController.delegate = self - DispatchQueue.main.async { [weak self] in guard let strongSelf = self else { return } + + let successViewController = SuccessViewController() + successViewController.delegate = self + if let presentedViewController = strongSelf.presentedViewController { presentedViewController.show(successViewController, sender: self) } else {