Initial commit
18
.gitignore
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
.DS_Store
|
||||
.dart_tool/
|
||||
|
||||
.packages
|
||||
.pub/
|
||||
/.idea/vcs.xml
|
||||
|
||||
build/
|
||||
*.iml
|
||||
Flutter/Generated.xcconfig
|
||||
Flutter/flutter_export_environment.sh
|
||||
|
||||
.idea/*
|
||||
!.idea/codeStyles/
|
||||
!.idea/copyright/
|
||||
|
||||
#Mac OS X
|
||||
.DS_Store
|
10
.metadata
Normal file
@ -0,0 +1,10 @@
|
||||
# This file tracks properties of this Flutter project.
|
||||
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||
#
|
||||
# This file should be version controlled and should not be manually edited.
|
||||
|
||||
version:
|
||||
revision: 18116933e77adc82f80866c928266a5b4f1ed645
|
||||
channel: stable
|
||||
|
||||
project_type: plugin
|
27
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "demo",
|
||||
"cwd": "demo",
|
||||
"request": "launch",
|
||||
"type": "dart"
|
||||
},
|
||||
{
|
||||
"name": "demo-debug-dev",
|
||||
"cwd": "demo",
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"flutterMode": "debug",
|
||||
"args": [
|
||||
"-t",
|
||||
"lib/main-dev.dart",
|
||||
"--flavor",
|
||||
"dev"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
7
CHANGELOG.md
Normal file
@ -0,0 +1,7 @@
|
||||
# 1.0.1
|
||||
|
||||
* Formatted code. Added homepage and repo urls.
|
||||
|
||||
# 1.0.0
|
||||
|
||||
* Initial development release.
|
18
LICENSE
Normal file
@ -0,0 +1,18 @@
|
||||
The MIT License (MIT)
|
||||
Copyright © 2022 NBCO YooMoney LLC
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||
associated documentation files (the “Software”), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
|
||||
following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial
|
||||
portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
|
||||
OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
517
README.md
Normal file
@ -0,0 +1,517 @@
|
||||
# YooKassa Payments SDK
|
||||
|
||||
Библиотека позволяет встроить прием платежей в мобильные приложения на Flutter и работает как дополнение к API ЮKassa.\
|
||||
В мобильный SDK входят готовые платежные интерфейсы (форма оплаты и всё, что с ней связано).\
|
||||
С помощью SDK можно получать токены для проведения оплаты с банковской карты, через Сбербанк Онлайн или из кошелька в ЮMoney.
|
||||
|
||||
## Подключение зависимостей
|
||||
|
||||
1. В файл `pubspec.yami` добавьте зависимость и запустите `pub get`:
|
||||
|
||||
```dart
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
yookassa_payments_flutter: ^version
|
||||
```
|
||||
|
||||
2. Для iOS в файле your_project_name.podspec, лежащий в корне проекта в папке ios добавьте зависимость:
|
||||
```ruby
|
||||
s.dependency 'YooKassaPayments', '6.8.0'
|
||||
```
|
||||
|
||||
3. Запустите `pod install` в директории рядом с Runner.xcworkspace
|
||||
|
||||
4. В Info.plist своего приложения добавьте поддержку url-схем для корректной работы mSDK с оплатой через Сбер и ЮMoney:
|
||||
```
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>yookassapaymentsflutter</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>yoomoneyauth</string>
|
||||
<string>sberpay</string>
|
||||
</array>
|
||||
```
|
||||
|
||||
Решение проблем подключения:
|
||||
|
||||
А. В случае когда `pod install` завершается с ошибкой – попробуйте команду `pod update YooKassaPayments`
|
||||
|
||||
B. В некоторых сложных случаях рекомендуем сбросить кэш cocoapods. Это можно сделать несколькими способам.
|
||||
|
||||
Вариант 1: выполнить набор команд для сброса кэша для пода YooKassaPayments и его зависимостей:
|
||||
```
|
||||
pod cache clean FunctionalSwift --all
|
||||
pod cache clean MoneyAuth --all
|
||||
pod cache clean ThreatMetrixAdapter --all
|
||||
pod cache clean YooKassaPayments --all
|
||||
pod cache clean YooKassaPaymentsApi --all
|
||||
pod cache clean YooKassaWalletApi --all
|
||||
pod cache clean YooMoneyCoreApi --all
|
||||
pod cache clean TMXProfiling --all
|
||||
pod cache clean TMXProfilingConnections --all
|
||||
```
|
||||
Вариант 2: Удалить полностью кэш cocoapods командой `rm -rf ~/.cocoapods/repos`. Обращаем ваше внимание что после этого
|
||||
cocoapods будет восстанавливать свой локальный каталог некоторое время.
|
||||
|
||||
Далее рекомендуем выполнить `flutter clean`, `pod clean` и `pod deintegrate YOUR_PROJECT_NAME.xcodeproj`
|
||||
для последущей чистой установки командой `pod install`
|
||||
|
||||
## Быстрая интеграция
|
||||
|
||||
1. Создайте `TokenizationModuleInputData` (понадобится [ключ для клиентских приложений](https://yookassa.ru/my/tunes) из личного кабинета ЮKassa). В этой модели передаются параметры платежа (валюта и сумма) и параметры платежной формы, которые увидит пользователь при оплате (способы оплаты, название магазина и описание заказа).
|
||||
|
||||
Пример создания `TokenizationModuleInputData`:
|
||||
|
||||
```dart
|
||||
var clientApplicationKey = "<Ключ для клиентских приложений>";
|
||||
var amount = Amount(value: 999.9, currency: Currency.rub);
|
||||
var applePayID = "<Идентификатор продавца Apple Pay>";
|
||||
var shopId = "<Идентификатор магазина в ЮKassa)>";
|
||||
var tokenizationModuleInputData =
|
||||
TokenizationModuleInputData(clientApplicationKey: clientApplicationKey,
|
||||
title: "Космические объекты",
|
||||
subtitle: "Комета повышенной яркости, период обращения — 112 лет",
|
||||
amount: amount,
|
||||
shopId: shopId,
|
||||
savePaymentMethod: SavePaymentMethod.on);
|
||||
```
|
||||
|
||||
2. Запустите процесс токенизации с кейсом `.tokenization` и передайте `TokenizationModuleInputData`.
|
||||
|
||||
3. Получите token в `TokenizationResult`
|
||||
|
||||
Пример:
|
||||
|
||||
```dart
|
||||
var result = await YookassaPaymentsFlutter.tokenization(tokenizationModuleInputData);
|
||||
var token = result.token;
|
||||
var paymentMethodType = result.paymentMethodType;
|
||||
```
|
||||
|
||||
Закройте модуль SDK и отправьте токен в вашу систему. Затем [создайте платеж](https://yookassa.ru/developers/api#create_payment) по API ЮKassa, в параметре `payment_token` передайте токен, полученный в SDK. Способ подтверждения при создании платежа зависит от способа оплаты, который выбрал пользователь. Он приходит вместе с токеном в `paymentMethodType`.
|
||||
|
||||
## Доступные способы оплаты
|
||||
|
||||
Сейчас в SDK доступны следующие способы оплаты:
|
||||
|
||||
`.yooMoney` — ЮMoney (платежи из кошелька или привязанной картой)\
|
||||
`.bankCard` — банковская карта (карты можно сканировать)\
|
||||
`.sberbank` — SberPay (с подтверждением через приложение Сбербанк Онлайн, если оно установленно, иначе с подтверждением по смс)\
|
||||
|
||||
## Настройка способов оплаты
|
||||
|
||||
У вас есть возможность сконфигурировать способы оплаты.\
|
||||
Для этого необходимо при создании `TokenizationModuleInputData` в параметре `tokenizationSettings` передать модель типа `TokenizationSettings`.
|
||||
|
||||
> Для некоторых способов оплаты нужна дополнительная настройка (см. ниже).\
|
||||
> По умолчанию используются все доступные способы оплаты.
|
||||
|
||||
```dart
|
||||
// Создайте пустой List<PaymentMethod>
|
||||
List<PaymentMethod> paymentMethodTypes = [];
|
||||
|
||||
if (<Условие для банковской карты>) {
|
||||
// Добавляем в paymentMethodTypes элемент `PaymentMethod.bankCard`
|
||||
paymentMethodTypes.add(PaymentMethod.bankCard);
|
||||
}
|
||||
|
||||
if (<Условие для Сбербанка Онлайн>) {
|
||||
// Добавляем в paymentMethodTypes элемент `PaymentMethod.sberbank`
|
||||
paymentMethodTypes.add(PaymentMethod.sberbank);
|
||||
}
|
||||
|
||||
if (<Условие для ЮMoney>) {
|
||||
// Добавляем в paymentMethodTypes элемент `PaymentMethod.yooMoney`
|
||||
paymentMethodTypes.add(PaymentMethod.yooMoney);
|
||||
}
|
||||
|
||||
var settings = TokenizationSettings(PaymentMethodTypes(paymentMethodTypes));
|
||||
```
|
||||
|
||||
Теперь используйте `tokenizationSettings` при инициализации `TokenizationModuleInputData`.
|
||||
|
||||
### ЮMoney
|
||||
|
||||
Для подключения способа оплаты `ЮMoney` необходимо:
|
||||
|
||||
1. Получить `client id` центра авторизации системы `ЮMoney`.
|
||||
2. При создании `TokenizationModuleInputData` передать `client id` в параметре `moneyAuthClientId`
|
||||
3. В `TokenizationSettings` передайте значение `PaymentMethodTypes.yooMoney`.
|
||||
4. Получите токен.
|
||||
5. [Создайте платеж](https://yookassa.ru/developers/api#create_payment) с токеном по API ЮKassa.
|
||||
|
||||
#### Как получить `client id` центра авторизации системы `ЮMoney`
|
||||
|
||||
1. Авторизуйтесь на [yookassa.ru](https://yookassa.ru)
|
||||
2. Перейти на страницу регистрации клиентов СЦА - [yookassa.ru/oauth/v2/client](https://yookassa.ru/oauth/v2/client)
|
||||
3. Нажать [Зарегистрировать](https://yookassa.ru/oauth/v2/client/create)
|
||||
4. Заполнить поля:\
|
||||
4.1. "Название" - `required` поле, отображается при выдаче прав и в списке приложений.\
|
||||
4.2. "Описание" - `optional` поле, отображается у пользователя в списке приложений.\
|
||||
4.3. "Ссылка на сайт приложения" - `optional` поле, отображается у пользователя в списке приложений.\
|
||||
4.4. "Код подтверждения" - выбрать `Передавать в Callback URL`, можно указывать любое значение, например ссылку на сайт.
|
||||
5. Выбрать доступы:\
|
||||
5.1. `Кошелёк ЮMoney` -> `Просмотр`\
|
||||
5.2. `Профиль ЮMoney` -> `Просмотр`
|
||||
6. Нажать `Зарегистрировать`
|
||||
|
||||
#### Передать `client id` в параметре `moneyAuthClientId`
|
||||
|
||||
При создании `TokenizationModuleInputData` передать `client id` в параметре `moneyAuthClientId`
|
||||
|
||||
```swift
|
||||
let moduleData = TokenizationModuleInputData(
|
||||
...
|
||||
moneyAuthClientId: "client_id")
|
||||
```
|
||||
|
||||
Чтобы провести платеж:
|
||||
|
||||
1. При создании `TokenizationModuleInputData` передайте значение `.yooMoney` в `paymentMethodTypes.`
|
||||
2. Получите токен.
|
||||
3. [Создайте платеж](https://yookassa.ru/developers/api#create_payment) с токеном по API ЮKassa.
|
||||
|
||||
#### Поддержка авторизации через мобильное приложение
|
||||
|
||||
1. В `TokenizationModuleInputData` необходимо передавать `applicationScheme` – схема для возврата в приложение после успешной авторизации в `ЮMoney` через мобильное приложение.
|
||||
|
||||
Пример `applicationScheme`:
|
||||
|
||||
```swift
|
||||
let moduleData = TokenizationModuleInputData(
|
||||
...
|
||||
applicationScheme: "examplescheme://"
|
||||
```
|
||||
|
||||
2. В `AppDelegate` импортировать зависимость `YooKassaPayments`:
|
||||
|
||||
```swift
|
||||
import YooKassaPayments
|
||||
```
|
||||
|
||||
3. Добавить обработку ссылок через `YKSdk` в `AppDelegate`:
|
||||
|
||||
```swift
|
||||
func application(
|
||||
_ application: UIApplication,
|
||||
open url: URL,
|
||||
sourceApplication: String?,
|
||||
annotation: Any
|
||||
) -> Bool {
|
||||
return YKSdk.shared.handleOpen(
|
||||
url: url,
|
||||
sourceApplication: sourceApplication
|
||||
)
|
||||
}
|
||||
|
||||
@available(iOS 9.0, *)
|
||||
func application(
|
||||
_ app: UIApplication,
|
||||
open url: URL,
|
||||
options: [UIApplication.OpenURLOptionsKey: Any] = [:]
|
||||
) -> Bool {
|
||||
return YKSdk.shared.handleOpen(
|
||||
url: url,
|
||||
sourceApplication: options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
4. В `Info.plist` добавьте следующие строки:
|
||||
|
||||
```plistbase
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>yoomoneyauth</string>
|
||||
</array>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>${BUNDLE_ID}</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>examplescheme</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
```
|
||||
|
||||
где `examplescheme` - схема для открытия вашего приложения, которую вы указали в `applicationScheme` при создании `TokenizationModuleInputData`. Через эту схему будет открываться ваше приложение после успешной авторизации в `ЮMoney` через мобильное приложение.
|
||||
|
||||
### Банковская карта
|
||||
|
||||
1. При создании `TokenizationModuleInputData` в `TokenizationSettings` передайте значение `PaymentMethodTypes.bankCard`.
|
||||
2. Получите токен.
|
||||
3. [Создайте платеж](https://yookassa.ru/developers/api#create_payment) с токеном по API ЮKassa.
|
||||
|
||||
### SberPay
|
||||
|
||||
Чтобы провести платёж:
|
||||
|
||||
1. При создании `TokenizationModuleInputData` в `TokenizationSettings` передайте значение `PaymentMethodTypes.sberbank`.
|
||||
2. Получите токен.
|
||||
3. [Создайте платеж](https://yookassa.ru/developers/api#create_payment) с токеном по API ЮKassa.
|
||||
|
||||
Для подтверждения платежа через приложение СберБанк Онлайн:
|
||||
|
||||
1. В `AppDelegate` импортируйте зависимость `YooKassaPayments`:
|
||||
|
||||
```swift
|
||||
import YooKassaPayments
|
||||
```
|
||||
|
||||
2. Добавьте обработку ссылок через `YKSdk` в `AppDelegate`:
|
||||
|
||||
```swift
|
||||
func application(
|
||||
_ application: UIApplication,
|
||||
open url: URL,
|
||||
sourceApplication: String?,
|
||||
annotation: Any
|
||||
) -> Bool {
|
||||
return YKSdk.shared.handleOpen(
|
||||
url: url,
|
||||
sourceApplication: sourceApplication
|
||||
)
|
||||
}
|
||||
|
||||
@available(iOS 9.0, *)
|
||||
func application(
|
||||
_ app: UIApplication,
|
||||
open url: URL,
|
||||
options: [UIApplication.OpenURLOptionsKey: Any] = [:]
|
||||
) -> Bool {
|
||||
return YKSdk.shared.handleOpen(
|
||||
url: url,
|
||||
sourceApplication: options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
3. В `Info.plist` добавьте следующие строки:
|
||||
|
||||
```plistbase
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>sberpay</string>
|
||||
</array>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>${BUNDLE_ID}</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>examplescheme</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
```
|
||||
|
||||
где `examplescheme` - схема для открытия вашего приложения, которую вы указали в `applicationScheme` при создании `TokenizationModuleInputData`. Через эту схему будет открываться ваше приложение после успешной оплаты с помощью `SberPay`.
|
||||
|
||||
4. Обработка успешного подтверждения уже реализована в плагине. Плагин отобразит алерт с информацией об успешном подтверждении.
|
||||
|
||||
## Описание публичных параметров
|
||||
|
||||
### TokenizationModuleInputData
|
||||
|
||||
>Обязательные:
|
||||
|
||||
| Параметр | Тип | Описание |
|
||||
| -------------------- | ------ | -------- |
|
||||
| clientApplicationKey | String | Ключ для клиентских приложений из личного кабинета ЮKassa |
|
||||
| title | String | Название магазина в форме оплаты |
|
||||
| subtitle | String | Описание заказа в форме оплаты |
|
||||
| purchaseDescription | String | Описание заказа в форме оплаты |
|
||||
| amount | Amount | Объект, содержащий сумму заказа и валюту |
|
||||
| shopId | String | Идентификатор магазина в ЮKassa ([раздел Организации](https://yookassa.ru/my/company/organization) - скопировать shopId у нужного магазина) |
|
||||
| savePaymentMethod | SavePaymentMethod | Объект, описывающий логику того, будет ли платеж рекуррентным |
|
||||
|
||||
>Необязательные:
|
||||
|
||||
| Параметр | Тип | Описание |
|
||||
| -------------------------- | --------------------- | ------------------------------------------------------------ |
|
||||
| gatewayId | String | По умолчанию `null`. Используется, если у вас несколько платежных шлюзов с разными идентификаторами. |
|
||||
| tokenizationSettings | TokenizationSettings | По умолчанию используется стандартный инициализатор со всеми способами оплаты. Параметр отвечает за настройку токенизации (способы оплаты и логотип ЮKassa). |
|
||||
| testModeSettings | TestModeSettings | По умолчанию `null`. Настройки тестового режима. |
|
||||
| cardScanning | CardScanning | По умолчанию `null`. Возможность сканировать банковские карты. |
|
||||
| applePayMerchantIdentifier | String | По умолчанию `null`. Apple Pay merchant ID (обязательно для платежей через Apple Pay). |
|
||||
| returnUrl | String | По умолчанию `null`. URL страницы (поддерживается только `https`), на которую надо вернуться после прохождения 3-D Secure. Необходим только при кастомной реализации 3-D Secure. Если вы используете `startConfirmationProcess(confirmationUrl:paymentMethodType:)`, не задавайте этот параметр. |
|
||||
| isLoggingEnabled | Bool | По умолчанию `false`. Включает логирование сетевых запросов. |
|
||||
| userPhoneNumber | String | По умолчанию `null`. Телефонный номер пользователя. |
|
||||
| customizationSettings | CustomizationSettings | По умолчанию используется цвет blueRibbon. Цвет основных элементов, кнопки, переключатели, поля ввода. |
|
||||
| moneyAuthClientId | String | По умолчанию `null`. Идентификатор для центра авторизации в системе YooMoney. |
|
||||
| applicationScheme | String | По умолчанию `null`. Схема для возврата в приложение после успешной оплаты с помощью `Sberpay` в приложении СберБанк Онлайн или после успешной авторизации в `YooMoney` через мобильное приложение. |
|
||||
| customerId | String | По умолчанию `null`. Уникальный идентификатор покупателя в вашей системе, например электронная почта или номер телефона. Не более 200 символов. Используется, если вы хотите запомнить банковскую карту и отобразить ее при повторном платеже в mSdk. Убедитесь, что customerId относится к пользователю, который хочет совершить покупку. Например, используйте двухфакторную аутентификацию. Если передать неверный идентификатор, пользователь сможет выбрать для оплаты чужие банковские карты.|
|
||||
| googlePayParameters | GooglePayParameters | По умолчанию поддерживает mastercard и visa. Настройки для платежей через Google Pay. |
|
||||
|
||||
### SavedBankCardModuleInputData
|
||||
|
||||
>Обязательные:
|
||||
|
||||
| Параметр | Тип | Описание |
|
||||
| -------------------- | ------ | -------- |
|
||||
| clientApplicationKey | String | Ключ для клиентских приложений из личного кабинета ЮKassa |
|
||||
| title | String | Название магазина в форме оплаты |
|
||||
| purchaseDescription | String | Описание заказа в форме оплаты |
|
||||
| subtitle | String | Описание заказа в форме оплаты |
|
||||
| paymentMethodId | String | Идентификатор сохраненного способа оплаты |
|
||||
| amount | Amount | Объект, содержащий сумму заказа и валюту |
|
||||
| shopId | String | Идентификатор магазина в ЮKassa ([раздел Организации](https://yookassa.ru/my/company/organization) - скопировать shopId у нужного магазина) |
|
||||
| savePaymentMethod | SavePaymentMethod | Объект, описывающий логику того, будет ли платеж рекуррентным |
|
||||
|
||||
>Необязательные:
|
||||
|
||||
| Параметр | Тип | Описание |
|
||||
| --------------------- | --------------------- | ------------------------------------------------------------ |
|
||||
| gatewayId | String | По умолчанию `null`. Используется, если у вас несколько платежных шлюзов с разными идентификаторами. |
|
||||
| testModeSettings | TestModeSettings | По умолчанию `null`. Настройки тестового режима. |
|
||||
| returnUrl | String | По умолчанию `null`. URL страницы (поддерживается только `https`), на которую надо вернуться после прохождения 3-D Secure. Необходим только при кастомной реализации 3-D Secure. Если вы используете `startConfirmationProcess(confirmationUrl:paymentMethodType:)`, не задавайте этот параметр. |
|
||||
| isLoggingEnabled | Bool | По умолчанию `false`. Включает логирование сетевых запросов. |
|
||||
| customizationSettings | CustomizationSettings | По умолчанию используется цвет Color.fromARGB(255, 0, 112, 240). Цвет основных элементов, кнопки, переключатели, поля ввода. |
|
||||
|
||||
### TokenizationSettings
|
||||
|
||||
Можно настроить список способов оплаты и отображение логотипа ЮKassa в приложении.
|
||||
|
||||
| Параметр | Тип | Описание |
|
||||
| ---------------------- | ------------------ | -------- |
|
||||
| paymentMethodTypes | PaymentMethodTypes | По умолчанию `PaymentMethodTypes.all`. [Способы оплаты](#настройка-способов-оплаты), доступные пользователю в приложении. |
|
||||
| showYooKassaLogo | Bool | По умолчанию `true`. Отвечает за отображение логотипа ЮKassa. По умолчанию логотип отображается. |
|
||||
|
||||
### TestModeSettings
|
||||
|
||||
| Параметр | Тип | Описание |
|
||||
| -------------------------- | ------ | -------- |
|
||||
| paymentAuthorizationPassed | Bool | Определяет, пройдена ли платежная авторизация при оплате ЮMoney. |
|
||||
| cardsCount | Int | Количество привязанные карт к кошельку в ЮMoney. |
|
||||
| charge | Amount | Сумма и валюта платежа. |
|
||||
| enablePaymentError | Bool | Определяет, будет ли платеж завершен с ошибкой. |
|
||||
|
||||
### Amount
|
||||
|
||||
| Параметр | Тип | Описание |
|
||||
| -------- | -------- | -------- |
|
||||
| value | Double | Сумма платежа |
|
||||
| currency | Currency | Валюта платежа |
|
||||
|
||||
### Currency
|
||||
|
||||
| Параметр | Тип | Описание |
|
||||
| -------- | -------- | -------- |
|
||||
| Currency.rub | String | ₽ - Российский рубль |
|
||||
| Currency.usd | String | $ - Американский доллар |
|
||||
| Currency.eur | String | € - Евро |
|
||||
| Currency(“custom”) | String | Будет отображаться значение, которое передали |
|
||||
|
||||
### CustomizationSettings
|
||||
|
||||
| Параметр | Тип | Описание |
|
||||
| ---------- | ------- | -------- |
|
||||
| mainScheme | Color | По умолчанию используется цвет Color.fromARGB(255, 0, 112, 240). Цвет основных элементов, кнопки, переключатели, поля ввода. |
|
||||
|
||||
### SavePaymentMethod
|
||||
|
||||
| Параметр | Тип | Описание |
|
||||
| ----------- | ----------------- | -------- |
|
||||
| SavePaymentMethod.on | SavePaymentMethod | Сохранить платёжный метод для проведения рекуррентных платежей. Пользователю будут доступны только способы оплаты, поддерживающие сохранение. На экране контракта будет отображено сообщение о том, что платёжный метод будет сохранён. |
|
||||
| SavePaymentMethod.off | SavePaymentMethod | Не дает пользователю выбрать, сохранять способ оплаты или нет. |
|
||||
| SavePaymentMethod.userSelects | SavePaymentMethod | Пользователь выбирает, сохранять платёжный метод или нет. Если метод можно сохранить, на экране контракта появится переключатель. |
|
||||
|
||||
## Настройка подтверждения платежа
|
||||
|
||||
Если вы хотите использовать нашу реализацию подтверждения платежа, не закрывайте модуль SDK после получения токена.\
|
||||
Отправьте токен на ваш сервер и после успешной оплаты закройте модуль.\
|
||||
Если ваш сервер сообщил о необходимости подтверждения платежа (т.е. платёж пришёл со статусом `pending`), вызовите метод `confirmation(confirmationUrl, paymentMethodType)`.
|
||||
|
||||
Примеры кода:
|
||||
|
||||
```dart
|
||||
await YookassaPaymentsFlutter.confirmation(controller.text, result.paymentMethodType);
|
||||
)
|
||||
```
|
||||
|
||||
## Логирование
|
||||
|
||||
У вас есть возможность включить логирование всех сетевых запросов.\
|
||||
Для этого необходимо при создании `TokenizationModuleInputData` передать `isLoggingEnabled: true`
|
||||
|
||||
## Тестовый режим
|
||||
|
||||
У вас есть возможность запустить мобильный SDK в тестовом режиме.\
|
||||
Тестовый режим не выполняет никаких сетевых запросов и имитирует ответ от сервера.
|
||||
|
||||
Если вы хотите запустить SDK в тестовом режиме, необходимо:
|
||||
|
||||
1. Сконфигурировать объект с типом `TestModeSettings(paymentAuthorizationPassed, cardsCount, charge, enablePaymentError)`.
|
||||
|
||||
```dart
|
||||
var testModeSettings = TestModeSettings(true, 5, Amount(value: 999, currency: .rub), false);
|
||||
```
|
||||
|
||||
2. Передать его в `TokenizationModuleInputData` в параметре `testModeSettings:`
|
||||
|
||||
```dart
|
||||
var tokenizationModuleInputData = TokenizationModuleInputData(
|
||||
...
|
||||
testModeSettings: testModeSettings);
|
||||
```
|
||||
|
||||
## Кастомизация интерфейса
|
||||
|
||||
По умолчанию используется цвет Color.fromARGB(255, 0, 112, 240). Цвет основных элементов, кнопки, переключатели, поля ввода.
|
||||
|
||||
1. Сконфигурировать объект `CustomizationSettings` и передать его в параметр `customizationSettings` объекта `TokenizationModuleInputData`.
|
||||
|
||||
```dart
|
||||
var tokenizationModuleInputData = TokenizationModuleInputData(
|
||||
...
|
||||
customizationSettings: const CustomizationSettings(Colors.black));
|
||||
```
|
||||
|
||||
## Платёж привязанной к магазину картой с дозапросом CVC/CVV
|
||||
|
||||
1. Создайте `SavedBankCardModuleInputData`.
|
||||
|
||||
```dart
|
||||
var savedBankCardModuleInputData = SavedBankCardModuleInputData(
|
||||
clientApplicationKey: clientApplicationKey,
|
||||
title: "Космические объекты",
|
||||
subtitle: "Комета повышенной яркости, период обращения — 112 лет",
|
||||
purchaseDescription: "root.description",
|
||||
amount: amount,
|
||||
savePaymentMethod: SavePaymentMethod.on,
|
||||
applePayID: applePayID,
|
||||
shopId: shopId,
|
||||
paymentMethodId: paymentMethodId
|
||||
);
|
||||
```
|
||||
|
||||
2. Запустите процесс с кейсом `.bankCardRepeat` и передайте `SavedBankCardModuleInputData`.
|
||||
|
||||
```dart
|
||||
var result = await YookassaPaymentsFlutter.bankCardRepeat(savedBankCardModuleInputData);
|
||||
```
|
||||
|
||||
3. Получите token в `TokenizationResult`
|
||||
|
||||
## Лицензия
|
||||
|
||||
YooKassa Payments SDK доступна под лицензией MIT. Смотрите [LICENSE](https://git.yoomoney.ru/projects/SDK/repos/yookassa-payments-swift/browse/LICENSE) файл для получения дополнительной информации.
|
4
analysis_options.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
include: package:flutter_lints/flutter.yaml
|
||||
|
||||
# Additional information about this file can be found at
|
||||
# https://dart.dev/guides/language/analysis-options
|
8
android/.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/workspace.xml
|
||||
/.idea/libraries
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
56
android/build.gradle
Normal file
@ -0,0 +1,56 @@
|
||||
group 'ru.yoomoney.sdk.kassa.payments.flutter'
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.5.0'
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.0.3'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
compileSdkVersion 31
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation 'ru.yoomoney.sdk.kassa.payments:yookassa-android-sdk:6.5.2'
|
||||
}
|
3
android/gradle.properties
Normal file
@ -0,0 +1,3 @@
|
||||
org.gradle.jvmargs=-Xmx1536M
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
5
android/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
|
1
android/settings.gradle
Normal file
@ -0,0 +1 @@
|
||||
rootProject.name = 'yookassa_payments_flutter'
|
1
android/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1 @@
|
||||
<manifest package="ru.yoomoney.sdk.kassa.payments.flutter" />
|
@ -0,0 +1,17 @@
|
||||
package ru.yoomoney.sdk.kassa.payments.flutter
|
||||
|
||||
import ru.yoomoney.sdk.kassa.payments.TokenizationResult
|
||||
import org.json.JSONObject
|
||||
import ru.yoomoney.sdk.kassa.payments.checkoutParameters.PaymentMethodType
|
||||
|
||||
fun TokenizationResult.toJson(): String {
|
||||
val json = JSONObject()
|
||||
json.put("paymentToken", paymentToken)
|
||||
json.put("paymentMethodType", when(paymentMethodType) {
|
||||
PaymentMethodType.YOO_MONEY -> "yoo_money"
|
||||
PaymentMethodType.BANK_CARD -> "bank_card"
|
||||
PaymentMethodType.SBERBANK -> "sberbank"
|
||||
PaymentMethodType.GOOGLE_PAY -> "google_pay"
|
||||
})
|
||||
return json.toString()
|
||||
}
|
@ -0,0 +1,301 @@
|
||||
package ru.yoomoney.sdk.kassa.payments.flutter
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.widget.Toast
|
||||
import androidx.annotation.NonNull
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
import io.flutter.embedding.engine.FlutterEngine
|
||||
import io.flutter.embedding.engine.plugins.FlutterPlugin
|
||||
import io.flutter.plugin.common.MethodCall
|
||||
import io.flutter.plugin.common.MethodChannel
|
||||
import io.flutter.plugin.common.MethodChannel.MethodCallHandler
|
||||
import io.flutter.plugin.common.MethodChannel.Result
|
||||
import io.flutter.plugin.common.PluginRegistry
|
||||
import io.flutter.plugin.common.PluginRegistry.Registrar
|
||||
import io.flutter.embedding.engine.plugins.activity.ActivityAware
|
||||
import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding
|
||||
import java.io.StringReader
|
||||
import java.math.BigDecimal
|
||||
import java.util.Currency
|
||||
import ru.yoomoney.sdk.kassa.payments.checkoutParameters.Amount
|
||||
import ru.yoomoney.sdk.kassa.payments.Checkout
|
||||
import ru.yoomoney.sdk.kassa.payments.ui.color.ColorScheme
|
||||
import ru.yoomoney.sdk.kassa.payments.checkoutParameters.HostParameters;
|
||||
import ru.yoomoney.sdk.kassa.payments.checkoutParameters.GooglePayParameters
|
||||
import ru.yoomoney.sdk.kassa.payments.checkoutParameters.GooglePayCardNetwork
|
||||
import ru.yoomoney.sdk.kassa.payments.checkoutParameters.MockConfiguration
|
||||
import ru.yoomoney.sdk.kassa.payments.checkoutParameters.PaymentMethodType
|
||||
import ru.yoomoney.sdk.kassa.payments.checkoutParameters.SavePaymentMethod
|
||||
import ru.yoomoney.sdk.kassa.payments.checkoutParameters.PaymentParameters
|
||||
import ru.yoomoney.sdk.kassa.payments.checkoutParameters.SavedBankCardPaymentParameters
|
||||
import ru.yoomoney.sdk.kassa.payments.checkoutParameters.TestParameters
|
||||
import ru.yoomoney.sdk.kassa.payments.TokenizationResult
|
||||
import ru.yoomoney.sdk.kassa.payments.checkoutParameters.UiParameters
|
||||
|
||||
class YookassaPaymentsFlutterPlugin: FlutterPlugin, MethodCallHandler, ActivityAware, PluginRegistry.ActivityResultListener {
|
||||
|
||||
private lateinit var flutterResult: Result
|
||||
private lateinit var channel : MethodChannel
|
||||
private lateinit var context: Context
|
||||
private lateinit var activity: Activity
|
||||
private var binding: ActivityPluginBinding? = null
|
||||
|
||||
private val REQUEST_CODE_TOKENIZE = 33
|
||||
private val REQUEST_CODE_CONFIRMATION = 44
|
||||
|
||||
override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {
|
||||
channel = MethodChannel(flutterPluginBinding.binaryMessenger, "ru.yoomoney.yookassa_payments_flutter/yoomoney")
|
||||
channel.setMethodCallHandler(this)
|
||||
context = flutterPluginBinding.applicationContext
|
||||
}
|
||||
|
||||
override fun onMethodCall(@NonNull call: MethodCall, @NonNull result: Result) {
|
||||
flutterResult = result
|
||||
|
||||
val data: HashMap<String, Object> = call.arguments as HashMap<String, Object>
|
||||
|
||||
when (call.method) {
|
||||
"tokenization" -> tokenization(data)
|
||||
"confirmation" -> confirmation(data)
|
||||
"repeat" -> repeat(data)
|
||||
}
|
||||
}
|
||||
|
||||
fun confirmation(data: HashMap<String, Object>) {
|
||||
val paymentMethod = when (data["paymentMethod"] as String) {
|
||||
"bankCard" -> PaymentMethodType.BANK_CARD
|
||||
"yooMoney" -> PaymentMethodType.YOO_MONEY
|
||||
"sberbank" -> PaymentMethodType.SBERBANK
|
||||
"googlePay" -> PaymentMethodType.GOOGLE_PAY
|
||||
else -> PaymentMethodType.BANK_CARD
|
||||
}
|
||||
|
||||
val url = data["url"] as String
|
||||
|
||||
val intent: Intent = Checkout.createConfirmationIntent(
|
||||
context = context,
|
||||
confirmationUrl = url,
|
||||
paymentMethodType = paymentMethod
|
||||
)
|
||||
|
||||
activity.startActivityForResult(intent, REQUEST_CODE_CONFIRMATION)
|
||||
}
|
||||
|
||||
fun repeat(data: HashMap<String, Object>) {
|
||||
val showLogs = data["isLoggingEnabled"] as Boolean
|
||||
val mockConfiguration: MockConfiguration? = MockConfiguration(data)
|
||||
val uiParameters = UiParameters(data)
|
||||
var hostParameters = HostParameters(data)
|
||||
val testParameters = TestParameters(
|
||||
showLogs = showLogs,
|
||||
mockConfiguration = mockConfiguration,
|
||||
hostParameters = hostParameters
|
||||
)
|
||||
|
||||
val parameters = SavedBankCardPaymentParameters(data)
|
||||
|
||||
val intent = Checkout.createSavedCardTokenizeIntent(context, parameters, testParameters)
|
||||
activity.startActivityForResult(intent, REQUEST_CODE_TOKENIZE)
|
||||
}
|
||||
|
||||
fun tokenization(data: HashMap<String, Object>) {
|
||||
val showLogs = data["isLoggingEnabled"] as Boolean
|
||||
val mockConfiguration: MockConfiguration? = MockConfiguration(data)
|
||||
val uiParameters = UiParameters(data)
|
||||
var hostParameters = HostParameters(data)
|
||||
val googlePayTestEnvironment = data["googlePayTestEnvironment"] as Boolean
|
||||
val testParameters = TestParameters(
|
||||
showLogs = showLogs,
|
||||
googlePayTestEnvironment = googlePayTestEnvironment,
|
||||
mockConfiguration = mockConfiguration,
|
||||
hostParameters = hostParameters
|
||||
)
|
||||
|
||||
val paymentParameters = PaymentParameters(data)
|
||||
|
||||
val intent = Checkout.createTokenizeIntent(context, paymentParameters, testParameters, uiParameters)
|
||||
activity.startActivityForResult(intent, REQUEST_CODE_TOKENIZE)
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?): Boolean {
|
||||
if (requestCode == REQUEST_CODE_TOKENIZE) {
|
||||
if (resultCode == Activity.RESULT_OK && data != null) {
|
||||
val result: TokenizationResult = Checkout.createTokenizationResult(data);
|
||||
flutterResult.success(result.toJson())
|
||||
}
|
||||
} else if (requestCode == REQUEST_CODE_CONFIRMATION) {
|
||||
flutterResult.success(resultCode)
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) {
|
||||
channel.setMethodCallHandler(null)
|
||||
}
|
||||
|
||||
override fun onAttachedToActivity(binding: ActivityPluginBinding) {
|
||||
activity = binding.activity
|
||||
binding.addActivityResultListener(this)
|
||||
this.binding = binding
|
||||
}
|
||||
|
||||
override fun onDetachedFromActivity() {
|
||||
binding?.removeActivityResultListener(this)
|
||||
binding = null
|
||||
}
|
||||
|
||||
override fun onReattachedToActivityForConfigChanges(binding: ActivityPluginBinding) {
|
||||
this.binding?.removeActivityResultListener(this)
|
||||
this.binding = binding
|
||||
binding.addActivityResultListener(this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromActivityForConfigChanges() {
|
||||
binding?.removeActivityResultListener(this)
|
||||
binding = null
|
||||
}
|
||||
}
|
||||
|
||||
private fun PaymentParameters(data: Map<String, Object>): PaymentParameters {
|
||||
val amountMap: HashMap<String, Object> = data["amount"] as HashMap<String, Object>
|
||||
val amount = Amount(BigDecimal(amountMap["value"] as Double), Currency.getInstance(amountMap["currency"] as String))
|
||||
|
||||
val clientApplicationKey = data["clientApplicationKey"] as String
|
||||
val title = data["title"] as String
|
||||
val subtitle = data["subtitle"] as String
|
||||
val shopId = data["shopId"] as String
|
||||
val authCenterClientId = data["moneyAuthClientId"] as String
|
||||
val gatewayId = data["gatewayId"] as? String
|
||||
val userPhoneNumber = data["userPhoneNumber"] as? String
|
||||
val customReturnUrl = data["returnUrl"] as? String
|
||||
val applicationScheme = data["applicationScheme"] as? String
|
||||
val customerId = data["customerId"] as? String
|
||||
val savePaymentMethod: SavePaymentMethod = SavePaymentMethod(data)
|
||||
val paymentMethodTypes = PaymentMethodType(data)
|
||||
val googlePayParameters = GooglePayParameters(data)
|
||||
|
||||
return PaymentParameters(
|
||||
amount = amount,
|
||||
title = title,
|
||||
subtitle = subtitle,
|
||||
clientApplicationKey = clientApplicationKey,
|
||||
shopId = shopId,
|
||||
customerId = customerId,
|
||||
savePaymentMethod = savePaymentMethod,
|
||||
authCenterClientId = authCenterClientId,
|
||||
gatewayId = gatewayId,
|
||||
userPhoneNumber = userPhoneNumber,
|
||||
customReturnUrl = customReturnUrl,
|
||||
paymentMethodTypes = paymentMethodTypes,
|
||||
googlePayParameters = googlePayParameters
|
||||
)
|
||||
}
|
||||
|
||||
private fun PaymentMethodType(data: Map<String, Object>): Set<PaymentMethodType> {
|
||||
val flutterPaymentMethodTypes = (data["tokenizationSettings"] as HashMap<String, Object>)["paymentMethodTypes"] as ArrayList<String>
|
||||
val paymentMethodTypes: MutableSet<PaymentMethodType> = mutableSetOf()
|
||||
|
||||
for(type in flutterPaymentMethodTypes){
|
||||
when (type) {
|
||||
"PaymentMethod.bankCard" -> paymentMethodTypes.add(PaymentMethodType.BANK_CARD)
|
||||
"PaymentMethod.yooMoney" -> paymentMethodTypes.add(PaymentMethodType.YOO_MONEY)
|
||||
"PaymentMethod.sberbank" -> paymentMethodTypes.add(PaymentMethodType.SBERBANK)
|
||||
"PaymentMethod.googlePay" -> paymentMethodTypes.add(PaymentMethodType.GOOGLE_PAY)
|
||||
}
|
||||
}
|
||||
return paymentMethodTypes
|
||||
}
|
||||
|
||||
private fun GooglePayParameters(data: Map<String, Object>): GooglePayParameters {
|
||||
val flutterGooglePayParameters = data["googlePayParameters"] as ArrayList<String>
|
||||
val googlePayParameters: MutableSet<GooglePayCardNetwork> = mutableSetOf()
|
||||
|
||||
for(type in flutterGooglePayParameters){
|
||||
when (type) {
|
||||
"GooglePayCardNetwork.AMEX" -> googlePayParameters.add(GooglePayCardNetwork.AMEX)
|
||||
"GooglePayCardNetwork.DISCOVER" -> googlePayParameters.add(GooglePayCardNetwork.DISCOVER)
|
||||
"GooglePayCardNetwork.JCB" -> googlePayParameters.add(GooglePayCardNetwork.JCB)
|
||||
"GooglePayCardNetwork.MASTERCARD" -> googlePayParameters.add(GooglePayCardNetwork.MASTERCARD)
|
||||
"GooglePayCardNetwork.VISA" -> googlePayParameters.add(GooglePayCardNetwork.VISA)
|
||||
"GooglePayCardNetwork.INTERAC" -> googlePayParameters.add(GooglePayCardNetwork.INTERAC)
|
||||
"GooglePayCardNetwork.OTHER" -> googlePayParameters.add(GooglePayCardNetwork.OTHER)
|
||||
}
|
||||
}
|
||||
return GooglePayParameters(googlePayParameters)
|
||||
}
|
||||
|
||||
private fun SavedBankCardPaymentParameters(data: Map<String, Object>): SavedBankCardPaymentParameters {
|
||||
val amountMap: HashMap<String, Object> = data["amount"] as HashMap<String, Object>
|
||||
val amount = Amount(BigDecimal(amountMap["value"] as Double), Currency.getInstance(amountMap["currency"] as String))
|
||||
val title = data["title"] as String
|
||||
val subtitle = data["subtitle"] as String
|
||||
val clientApplicationKey = data["clientApplicationKey"] as String
|
||||
val shopId = data["shopId"] as String
|
||||
val paymentId = data["paymentMethodId"] as String
|
||||
val savePaymentMethod: SavePaymentMethod = SavePaymentMethod(data)
|
||||
|
||||
return SavedBankCardPaymentParameters(
|
||||
amount = amount,
|
||||
title = title,
|
||||
subtitle = subtitle,
|
||||
clientApplicationKey = clientApplicationKey,
|
||||
shopId = shopId,
|
||||
paymentMethodId = paymentId,
|
||||
savePaymentMethod = savePaymentMethod
|
||||
)
|
||||
}
|
||||
|
||||
private fun SavePaymentMethod(data: Map<String, Object>): SavePaymentMethod {
|
||||
return when (data["savePaymentMethod"] as String) {
|
||||
"SavePaymentMethod.on" -> SavePaymentMethod.ON
|
||||
"SavePaymentMethod.off" -> SavePaymentMethod.OFF
|
||||
else -> {
|
||||
SavePaymentMethod.USER_SELECTS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun HostParameters(data: Map<String, Object>): HostParameters {
|
||||
val hostParametersData = data["hostParameters"] as? HashMap<String, Object>
|
||||
return if (hostParametersData != null) {
|
||||
HostParameters(
|
||||
hostParametersData["apiHost"] as String,
|
||||
hostParametersData["paymentAuthApiHost"] as String,
|
||||
hostParametersData["authApiHost"] as String,
|
||||
hostParametersData["configHost"] as String,
|
||||
)
|
||||
} else {
|
||||
HostParameters()
|
||||
}
|
||||
}
|
||||
|
||||
private fun UiParameters(data: Map<String, Object>): UiParameters {
|
||||
val customizationSettings = data["customizationSettings"] as HashMap<String, Object>
|
||||
val showLogo = customizationSettings["showYooKassaLogo"] as Boolean
|
||||
val dataColor = customizationSettings["mainScheme"] as HashMap<String, Object>
|
||||
|
||||
val alpha = dataColor["alpha"] as Int
|
||||
val red = dataColor["red"] as Int
|
||||
val blue = dataColor["blue"] as Int
|
||||
val green = dataColor["green"] as Int
|
||||
|
||||
return UiParameters(showLogo, ColorScheme(Color.argb(alpha, red, green, blue)))
|
||||
}
|
||||
|
||||
private fun MockConfiguration(data: Map<String, Object>): MockConfiguration? {
|
||||
val testModeSettings = data["testModeSettings"] as? HashMap<String, Object>
|
||||
if (testModeSettings == null) return null
|
||||
|
||||
val paymentAuthPassed = testModeSettings["paymentAuthorizationPassed"] as Boolean
|
||||
val completeWithError = testModeSettings["enablePaymentError"] as Boolean
|
||||
val linkedCardsCount = testModeSettings["cardsCount"] as Int
|
||||
val serviceFeeMap: HashMap<String, Object> = testModeSettings["charge"] as HashMap<String, Object>
|
||||
val serviceFee = Amount(BigDecimal(serviceFeeMap["value"] as Double), Currency.getInstance(serviceFeeMap["currency"] as String))
|
||||
|
||||
return MockConfiguration(completeWithError, paymentAuthPassed, linkedCardsCount, serviceFee)
|
||||
}
|
46
example/.gitignore
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# Miscellaneous
|
||||
*.class
|
||||
*.log
|
||||
*.pyc
|
||||
*.swp
|
||||
.DS_Store
|
||||
.atom/
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
|
||||
# IntelliJ related
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
|
||||
# The .vscode folder contains launch configuration and tasks you configure in
|
||||
# VS Code which you may wish to be included in version control, so this line
|
||||
# is commented out by default.
|
||||
#.vscode/
|
||||
|
||||
# Flutter/Dart/Pub related
|
||||
**/doc/api/
|
||||
**/ios/Flutter/.last_build_id
|
||||
.dart_tool/
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
.packages
|
||||
.pub-cache/
|
||||
.pub/
|
||||
/build/
|
||||
|
||||
# Web related
|
||||
lib/generated_plugin_registrant.dart
|
||||
|
||||
# Symbolication related
|
||||
app.*.symbols
|
||||
|
||||
# Obfuscation related
|
||||
app.*.map.json
|
||||
|
||||
# Android Studio will place build artifacts here
|
||||
/android/app/debug
|
||||
/android/app/profile
|
||||
/android/app/release
|
10
example/.metadata
Normal file
@ -0,0 +1,10 @@
|
||||
# This file tracks properties of this Flutter project.
|
||||
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||
#
|
||||
# This file should be version controlled and should not be manually edited.
|
||||
|
||||
version:
|
||||
revision: 18116933e77adc82f80866c928266a5b4f1ed645
|
||||
channel: stable
|
||||
|
||||
project_type: app
|
3
example/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# yookassa_payments_flutter_example
|
||||
|
||||
Demonstrates how to use the yookassa_payments_flutter plugin.
|
29
example/analysis_options.yaml
Normal file
@ -0,0 +1,29 @@
|
||||
# This file configures the analyzer, which statically analyzes Dart code to
|
||||
# check for errors, warnings, and lints.
|
||||
#
|
||||
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
|
||||
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
|
||||
# invoked from the command line by running `flutter analyze`.
|
||||
|
||||
# The following line activates a set of recommended lints for Flutter apps,
|
||||
# packages, and plugins designed to encourage good coding practices.
|
||||
include: package:flutter_lints/flutter.yaml
|
||||
|
||||
linter:
|
||||
# The lint rules applied to this project can be customized in the
|
||||
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
|
||||
# included above or to enable additional rules. A list of all available lints
|
||||
# and their documentation is published at
|
||||
# https://dart-lang.github.io/linter/lints/index.html.
|
||||
#
|
||||
# Instead of disabling a lint rule for the entire project in the
|
||||
# section below, it can also be suppressed for a single line of code
|
||||
# or a specific dart file by using the `// ignore: name_of_lint` and
|
||||
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
|
||||
# producing the lint.
|
||||
rules:
|
||||
# avoid_print: false # Uncomment to disable the `avoid_print` rule
|
||||
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
||||
|
||||
# Additional information about this file can be found at
|
||||
# https://dart.dev/guides/language/analysis-options
|
13
example/android/.gitignore
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
gradle-wrapper.jar
|
||||
/.gradle
|
||||
/captures/
|
||||
/gradlew
|
||||
/gradlew.bat
|
||||
/local.properties
|
||||
GeneratedPluginRegistrant.java
|
||||
|
||||
# Remember to never publicly share your keystore.
|
||||
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
|
||||
key.properties
|
||||
**/*.keystore
|
||||
**/*.jks
|
70
example/android/app/build.gradle
Normal file
@ -0,0 +1,70 @@
|
||||
def localProperties = new Properties()
|
||||
def localPropertiesFile = rootProject.file('local.properties')
|
||||
if (localPropertiesFile.exists()) {
|
||||
localPropertiesFile.withReader('UTF-8') { reader ->
|
||||
localProperties.load(reader)
|
||||
}
|
||||
}
|
||||
|
||||
def flutterRoot = localProperties.getProperty('flutter.sdk')
|
||||
if (flutterRoot == null) {
|
||||
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
||||
}
|
||||
|
||||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
||||
if (flutterVersionCode == null) {
|
||||
flutterVersionCode = '1'
|
||||
}
|
||||
|
||||
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
||||
if (flutterVersionName == null) {
|
||||
flutterVersionName = '1.0'
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion 31
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "ru.yoomoney.yookassa_payments_flutter_example"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 31
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
|
||||
resValue "string", "ym_app_scheme", "yookassapaymentsexample"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source '../..'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
}
|
47
example/android/app/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,47 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="ru.yoomoney.yookassa_payments_flutter_example">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<application
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:exported="true"
|
||||
android:hardwareAccelerated="true"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter UI. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme" />
|
||||
<!-- Displays an Android View that continues showing the launch screen
|
||||
Drawable until Flutter paints its first frame, then this splash
|
||||
screen fades out. A splash screen is useful to avoid any visual
|
||||
gap between the end of Android's launch screen and the painting of
|
||||
Flutter's first frame. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.SplashScreenDrawable"
|
||||
android:resource="@drawable/launch_background" />
|
||||
<meta-data
|
||||
android:name="com.google.android.gms.wallet.api.enabled"
|
||||
android:value="true" />
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
</application>
|
||||
</manifest>
|
@ -0,0 +1,6 @@
|
||||
package ru.yoomoney.yookassa_payments_flutter_example
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
class MainActivity: FlutterActivity() {
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="?android:colorBackground" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@android:color/white" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
BIN
example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 544 B |
BIN
example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 442 B |
BIN
example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 721 B |
BIN
example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
18
example/android/app/src/main/res/values-night/styles.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
Flutter draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
18
example/android/app/src/main/res/values/styles.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
Flutter draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
29
example/android/build.gradle
Normal file
@ -0,0 +1,29 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.5.0'
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.0.3'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.buildDir = '../build'
|
||||
subprojects {
|
||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||
project.evaluationDependsOn(':app')
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
3
example/android/gradle.properties
Normal file
@ -0,0 +1,3 @@
|
||||
org.gradle.jvmargs=-Xmx1536M
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
6
example/android/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
#Fri Jun 23 08:50:38 CEST 2017
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
|
11
example/android/settings.gradle
Normal file
@ -0,0 +1,11 @@
|
||||
include ':app'
|
||||
|
||||
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
|
||||
def properties = new Properties()
|
||||
|
||||
assert localPropertiesFile.exists()
|
||||
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
|
||||
|
||||
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
||||
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
|
35
example/ios/.gitignore
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
**/dgph
|
||||
*.mode1v3
|
||||
*.mode2v3
|
||||
*.moved-aside
|
||||
*.pbxuser
|
||||
*.perspectivev3
|
||||
**/*sync/
|
||||
.sconsign.dblite
|
||||
.tags*
|
||||
**/.vagrant/
|
||||
**/DerivedData/
|
||||
Pods/**
|
||||
Icon?
|
||||
**/Pods/
|
||||
**/.symlinks/
|
||||
profile
|
||||
xcuserdata
|
||||
**/.generated/
|
||||
Flutter/App.framework
|
||||
Flutter/Flutter.framework
|
||||
Flutter/Flutter.podspec
|
||||
Flutter/Generated.xcconfig
|
||||
Flutter/ephemeral/
|
||||
Flutter/app.flx
|
||||
Flutter/app.zip
|
||||
Flutter/flutter_assets/
|
||||
Flutter/flutter_export_environment.sh
|
||||
ServiceDefinitions.json
|
||||
Runner/GeneratedPluginRegistrant.*
|
||||
|
||||
# Exceptions to above rules.
|
||||
!default.mode1v3
|
||||
!default.mode2v3
|
||||
!default.pbxuser
|
||||
!default.perspectivev3
|
26
example/ios/Flutter/AppFrameworkInfo.plist
Normal file
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>App</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.flutter.flutter.app</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>App</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
</dict>
|
||||
</plist>
|
2
example/ios/Flutter/Debug.xcconfig
Normal file
@ -0,0 +1,2 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include "Generated.xcconfig"
|
2
example/ios/Flutter/Release.xcconfig
Normal file
@ -0,0 +1,2 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||
#include "Generated.xcconfig"
|
47
example/ios/Podfile
Normal file
@ -0,0 +1,47 @@
|
||||
platform :ios, '10.0'
|
||||
|
||||
source 'https://github.com/CocoaPods/Specs.git'
|
||||
source 'https://git.yoomoney.ru/scm/sdk/cocoa-pod-specs.git'
|
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
|
||||
project 'Runner', {
|
||||
'Debug' => :debug,
|
||||
'Profile' => :release,
|
||||
'Release' => :release,
|
||||
}
|
||||
|
||||
def flutter_root
|
||||
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
|
||||
unless File.exist?(generated_xcode_build_settings_path)
|
||||
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
|
||||
end
|
||||
|
||||
File.foreach(generated_xcode_build_settings_path) do |line|
|
||||
matches = line.match(/FLUTTER_ROOT\=(.*)/)
|
||||
return matches[1].strip if matches
|
||||
end
|
||||
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
|
||||
end
|
||||
|
||||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
|
||||
|
||||
flutter_ios_podfile_setup
|
||||
|
||||
target 'Runner' do
|
||||
use_frameworks!
|
||||
use_modular_headers!
|
||||
|
||||
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
|
||||
end
|
||||
|
||||
post_install do |installer|
|
||||
installer.pods_project.targets.each do |target|
|
||||
flutter_additional_ios_build_settings(target)
|
||||
|
||||
target.build_configurations.each do |config|
|
||||
config.build_settings["ONLY_ACTIVE_ARCH"] = "YES"
|
||||
end
|
||||
end
|
||||
end
|
78
example/ios/Podfile.lock
Normal file
@ -0,0 +1,78 @@
|
||||
PODS:
|
||||
- Flutter (3.0.0)
|
||||
- FunctionalSwift (1.8.0)
|
||||
- MoneyAuth (3.4.0):
|
||||
- FunctionalSwift
|
||||
- ThreatMetrixAdapter
|
||||
- YooMoneyCoreApi
|
||||
- ThreatMetrixAdapter (3.3.3)
|
||||
- TMXProfiling (1.0.1)
|
||||
- TMXProfilingConnections (1.0.1)
|
||||
- YandexMobileMetrica/Dynamic (4.2.0):
|
||||
- YandexMobileMetrica/Dynamic/Core (= 4.2.0)
|
||||
- YandexMobileMetrica/Dynamic/Crashes (= 4.2.0)
|
||||
- YandexMobileMetrica/Dynamic/Core (4.2.0)
|
||||
- YandexMobileMetrica/Dynamic/Crashes (4.2.0):
|
||||
- YandexMobileMetrica/Dynamic/Core
|
||||
- yookassa_payments_flutter (0.0.1):
|
||||
- Flutter
|
||||
- YooKassaPayments (= 6.8.0)
|
||||
- YooKassaPayments (6.8.0):
|
||||
- MoneyAuth (~> 3.4.0)
|
||||
- ThreatMetrixAdapter (~> 3.3.3)
|
||||
- TMXProfiling (= 1.0.1)
|
||||
- TMXProfilingConnections (= 1.0.1)
|
||||
- YandexMobileMetrica/Dynamic (>= 3.0)
|
||||
- YooKassaPaymentsApi (~> 2.11.0)
|
||||
- YooKassaWalletApi (~> 2.3.1)
|
||||
- YooMoneyCoreApi (~> 2.1.0)
|
||||
- YooKassaPaymentsApi (2.11.0):
|
||||
- FunctionalSwift
|
||||
- YooMoneyCoreApi
|
||||
- YooKassaWalletApi (2.3.1):
|
||||
- FunctionalSwift
|
||||
- YooMoneyCoreApi
|
||||
- YooMoneyCoreApi (2.1.0):
|
||||
- FunctionalSwift (~> 1.8.0)
|
||||
|
||||
DEPENDENCIES:
|
||||
- Flutter (from `Flutter`)
|
||||
- yookassa_payments_flutter (from `.symlinks/plugins/yookassa_payments_flutter/ios`)
|
||||
|
||||
SPEC REPOS:
|
||||
https://git.yoomoney.ru/scm/sdk/cocoa-pod-specs.git:
|
||||
- FunctionalSwift
|
||||
- MoneyAuth
|
||||
- ThreatMetrixAdapter
|
||||
- TMXProfiling
|
||||
- TMXProfilingConnections
|
||||
- YooKassaPayments
|
||||
- YooKassaPaymentsApi
|
||||
- YooKassaWalletApi
|
||||
- YooMoneyCoreApi
|
||||
https://github.com/CocoaPods/Specs.git:
|
||||
- YandexMobileMetrica
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
Flutter:
|
||||
:path: Flutter
|
||||
yookassa_payments_flutter:
|
||||
:path: ".symlinks/plugins/yookassa_payments_flutter/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Flutter: 6f378e544fdb3c2db75671011442c5eaf902d3c4
|
||||
FunctionalSwift: b65b0a7ddde7f11a11e794f79a1e8009724ed0bd
|
||||
MoneyAuth: 8f2e4968132e0d187c1f33b6a99f998220c22135
|
||||
ThreatMetrixAdapter: 683cc07cd1faee65c14292f7d748d56b92ff34c9
|
||||
TMXProfiling: a3b9808d62abf72227a366f2cbdca414ee38a023
|
||||
TMXProfilingConnections: e3984a86c3c338f13af682bb77a6d18474289b79
|
||||
YandexMobileMetrica: f5f9c605eaaba33ff6ab2b6bc3259035ca60ed87
|
||||
yookassa_payments_flutter: d3cefc2d375b816278cb1f22a85a74adfda274b8
|
||||
YooKassaPayments: 6e725f147d2dc30b1427518e72d6115e227c48a2
|
||||
YooKassaPaymentsApi: 1b2ea9cadc898717f6216dd0e84dbabd5294dfb4
|
||||
YooKassaWalletApi: ea6fd080bd4663c66fe5db0f37aafb999282048c
|
||||
YooMoneyCoreApi: ddf9ea035b9a3f8d0563b4da8e55652fa07040d3
|
||||
|
||||
PODFILE CHECKSUM: b2e848e40e05488c9273432fb90c6c5918bb082f
|
||||
|
||||
COCOAPODS: 1.11.3
|
471
example/ios/Runner.xcodeproj/project.pbxproj
Normal file
@ -0,0 +1,471 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 51;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
BAEDD6C9220D1ABA0429DC05 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08BAA017D1C1DD8F2E26E61B /* Pods_Runner.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
08BAA017D1C1DD8F2E26E61B /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
0F432271E158C4356E30E297 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
6AF9C6944A49F0D9AC28EF18 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
A95B0811275AB8E600BAE8AB /* TMXProfilingConnections.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = TMXProfilingConnections.xcframework; path = Frameworks/TMXProfilingConnections.xcframework; sourceTree = "<group>"; };
|
||||
A95B0815275AB8F400BAE8AB /* TMXProfiling.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = TMXProfiling.xcframework; path = Frameworks/TMXProfiling.xcframework; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
BAEDD6C9220D1ABA0429DC05 /* Pods_Runner.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
0A9E0AECE28BA26A565C74FA /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6AF9C6944A49F0D9AC28EF18 /* Pods-Runner.debug.xcconfig */,
|
||||
0F432271E158C4356E30E297 /* Pods-Runner.release.xcconfig */,
|
||||
);
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2B777917365CBF507928ADBB /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A95B0815275AB8F400BAE8AB /* TMXProfiling.xcframework */,
|
||||
A95B0811275AB8E600BAE8AB /* TMXProfilingConnections.xcframework */,
|
||||
08BAA017D1C1DD8F2E26E61B /* Pods_Runner.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */,
|
||||
);
|
||||
name = Flutter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146E51CF9000F007C117D = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9740EEB11CF90186004384FC /* Flutter */,
|
||||
97C146F01CF9000F007C117D /* Runner */,
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
0A9E0AECE28BA26A565C74FA /* Pods */,
|
||||
2B777917365CBF507928ADBB /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146EF1CF9000F007C117D /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146EE1CF9000F007C117D /* Runner.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146F01CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||
97C147021CF9000F007C117D /* Info.plist */,
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
|
||||
);
|
||||
path = Runner;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
97C146ED1CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
73C3CA7DD996445733801D0C /* [CP] Check Pods Manifest.lock */,
|
||||
9740EEB61CF901F6004384FC /* Run Script */,
|
||||
97C146EA1CF9000F007C117D /* Sources */,
|
||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||
97C146EC1CF9000F007C117D /* Resources */,
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||
5A51D23740C73B8FBFF86A21 /* [CP] Embed Pods Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Runner;
|
||||
productName = Runner;
|
||||
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
97C146E61CF9000F007C117D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1300;
|
||||
ORGANIZATIONNAME = "";
|
||||
TargetAttributes = {
|
||||
97C146ED1CF9000F007C117D = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
LastSwiftMigration = 1100;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 97C146E51CF9000F007C117D;
|
||||
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
97C146ED1CF9000F007C117D /* Runner */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
97C146EC1CF9000F007C117D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Thin Binary";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||
};
|
||||
5A51D23740C73B8FBFF86A21 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
73C3CA7DD996445733801D0C /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
97C146EA1CF9000F007C117D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C146FB1CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C147001CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
97C147031CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = ru.yoomoney.yookassa_payments_flutter_example;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147041CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = ru.yoomoney.yookassa_payments_flutter_example;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
97C147061CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "ru.yoomoney.yookassa-payments-flutter-exampe";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147071CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
BUILD_LIBRARY_FOR_DISTRIBUTION = NO;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "ru.yoomoney.yookassa-payments-flutter-exampe";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147031CF9000F007C117D /* Debug */,
|
||||
97C147041CF9000F007C117D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147061CF9000F007C117D /* Debug */,
|
||||
97C147071CF9000F007C117D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
||||
}
|
7
example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1300"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Profile"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
10
example/ios/Runner.xcworkspace/contents.xcworkspacedata
generated
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Pods/Pods.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
40
example/ios/Runner/AppDelegate.swift
Normal file
@ -0,0 +1,40 @@
|
||||
import UIKit
|
||||
import Flutter
|
||||
import YooKassaPayments
|
||||
|
||||
var result: FlutterResult?
|
||||
|
||||
@UIApplicationMain
|
||||
@objc class AppDelegate: FlutterAppDelegate {
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||
) -> Bool {
|
||||
GeneratedPluginRegistrant.register(with: self)
|
||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
}
|
||||
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
open url: URL,
|
||||
sourceApplication: String?,
|
||||
annotation: Any
|
||||
) -> Bool {
|
||||
return YKSdk.shared.handleOpen(
|
||||
url: url,
|
||||
sourceApplication: sourceApplication
|
||||
)
|
||||
}
|
||||
|
||||
@available(iOS 9.0, *)
|
||||
override func application(
|
||||
_ app: UIApplication,
|
||||
open url: URL,
|
||||
options: [UIApplication.OpenURLOptionsKey: Any] = [:]
|
||||
) -> Bool {
|
||||
return YKSdk.shared.handleOpen(
|
||||
url: url,
|
||||
sourceApplication: options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String
|
||||
)
|
||||
}
|
||||
}
|
@ -0,0 +1,122 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "Icon-App-1024x1024@1x.png",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 564 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 3.5 KiB |
23
example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
vendored
Normal file
After Width: | Height: | Size: 68 B |
BIN
example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
vendored
Normal file
After Width: | Height: | Size: 68 B |
BIN
example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
vendored
Normal file
After Width: | Height: | Size: 68 B |
5
example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
# Launch Screen Assets
|
||||
|
||||
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
|
||||
|
||||
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
|
@ -0,0 +1,122 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "Icon-App-1024x1024@1x.png",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 564 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 3.5 KiB |
23
example/ios/Runner/Assets.xcassets/devLaunchImage.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
example/ios/Runner/Assets.xcassets/devLaunchImage.imageset/LaunchImage.png
vendored
Normal file
After Width: | Height: | Size: 68 B |
BIN
example/ios/Runner/Assets.xcassets/devLaunchImage.imageset/LaunchImage@2x.png
vendored
Normal file
After Width: | Height: | Size: 68 B |
BIN
example/ios/Runner/Assets.xcassets/devLaunchImage.imageset/LaunchImage@3x.png
vendored
Normal file
After Width: | Height: | Size: 68 B |
5
example/ios/Runner/Assets.xcassets/devLaunchImage.imageset/README.md
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
# Launch Screen Assets
|
||||
|
||||
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
|
||||
|
||||
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
|
@ -0,0 +1,122 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "Icon-App-1024x1024@1x.png",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 564 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.7 KiB |