diff --git a/LiqpayMob.h b/LiqpayMob.h deleted file mode 100644 index b976746..0000000 --- a/LiqpayMob.h +++ /dev/null @@ -1,104 +0,0 @@ -// -// LiqpayMob.h -// LiqpayMob -// -// Created by Test CEB MacBook Pro on 3/22/16. -// Copyright © 2016 PrivatBank. All rights reserved. -// - -#import - -typedef NS_ENUM( NSUInteger, ErrorCode ) { - ErrorCodeIO, // - I/O exception while sending request to server - ErrorCodeInetMissing, // Operation is not possible, because there is no - // Internet connection - ErrorCodeNonUIThread, // You need to call method in NON UI thread - ErrorCodeCheckoutCanceled, // Checkout is canceled without waiting for - // confirmation - ErrorCodeUIThread, // You need to call method in UI thread -}; - -@protocol LiqPayCallBack - -- (UINavigationController *)navigationController; - -- (void)onResponseSuccess:(NSString *)response; - -- (void)onResponseError:(NSError *)errorCode; - -- (UIColor *)getStatusBarColor; - -@end - -@interface LiqpayMob : NSObject - -@property ( nonatomic, weak ) id delegate; - -- (id)initLiqPayWithDelegate:(id)delegate; - -/** - * Create custom request to Liqpay server with parameters. - * You should obtain a privateKey from Liqpay. - * - * @param path Request path (example: status) - * @param params Parameters to generate base64Data - * @param privateKey is privat key your store - * it is recommended to store the private key on your server - * @param delegate Callback will be invoked when the response from the server - * is recived or when error - */ - -- (void)api:(NSString *)path - params:(NSDictionary *)params - privateKey:(NSString *)privateKey - delegate:(id)delegate; - - -/** - * Create custom request to liqpay server with base64 encrypted parameters. - * You should obtain a privateKey from Liqpay and create signature from it. - * - * @param path request path (example: status) - * @param base64Data is besa64 encode result from JSON string - * @param signature is base64 encode result from sha1 binary hash from - * concatenate string ${PRIVATE_KEY}${DATA}${PRIVATE_KEY} - * @param delegate Callback will be invoked when the response from the server - * is recived or when error . - */ -- (void)api:(NSString *)path -paramsBase64:(NSString *)paramsBase64 - signature:(NSString *)signature - delegate:(id)delegate; - -/** - * Receiving payments on a personal checkout Liqpay client->server in WebView. - * You should obtain a privateKey from Liqpay. - * - * @param context Context of the application - * @param params parameters to generate base64Data - * @param privateKey is privat key your store - * it is recommended to store the private key on your server - * @param callBack Callback will be invoked when the response from the server - * is recived or when error - */ -- (void)checkout:(NSDictionary *)params - privateKey:(NSString *)privateKey - delegate:(id)delegate; - -/** - * Receiving payments on a personal checkout Liqpay client->server in WebView. - * You should obtain a privateKey from Liqpay and create signature from it. - * Parameters are base64 encrypted. - * - * @param context Context of the application - * @param base64Data is base64 encode result from JSON string - * @param signature is base64 encode result from sha1 binary hash from - * concatenate string ${PRIVATE_KEY}${DATA}${PRIVATE_KEY} - * @param callBack Callback will be invoked when the response from the server - * is recived or when error . - */ -- (void)checkoutWithParamsBase64:(NSString *)paramsBase64 - signature:(NSString *)signature - delegate:(id)delegate; - -@end diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..8c8c3b1 --- /dev/null +++ b/README.en.md @@ -0,0 +1,90 @@ + +# LiqPay iOS SDK + +The `liqpay_ios.xcframework` framework provides tools to integrate LiqPay payments. +The SDK contains all necessary dependencies and does not require CocoaPods, Carthage, or Swift Package Manager. + +--- + +## Installation + +1. Copy the `liqpay_ios.xcframework` file into your project's directory (e.g.,`Frameworks/`). +2. Add the framework to Xcode: + - Open your project. + - Drag `liqpay_ios.xcframework` into the Project Navigator. + - In the dialog that appears, select: + - ✅ **Copy items if needed** + - ✅ Add to the correct target (e.g., `YourAppTarget`) +3. Navigate to: + ``` + Target → General → Frameworks, Libraries, and Embedded Content + ``` + Ensure the framework is added with the following settings: + - Embed: **Embed & Sign** + +--- + +## Project settings + +In the **Build Settings** of the application target, set the `Runpath Search Paths`: + +``` +@executable_path/Frameworks +``` + +If this setting is missing, add it manually. +This is required for the correct loading of dynamic frameworks on physical devices (iPhone / iPad). + +--- + +## Usage + +In your project's source code, import the framework: + +```swift +import liqpay_ios +``` + +Example of a payment request: + +```swift +let payment = LiqPayPayment( + data: "base64_encoded_data", + signature: "base64_encoded_signature" +) + +payment.payPrivatPay { success, error in + if success { + // Successful payment + } else { + // Error handling + } +} +``` + +--- + +## Architectures + +The framework supports the following architectures: + +- `arm64` (devices) +- `x86_64`, `arm64` (simulators) + +Built with `BUILD_LIBRARY_FOR_DISTRIBUTION = YES` and supports Swift ABI Stability. + +--- + +## Technical Details + +- Static linking of all dependencies +- Provided as `.xcframework` +- Compatible with Xcode 14 and later + +--- + +## Support + +For questions about integration or technical support, please contact the SDK development team or the project's support team. + +[Documentation](https://www.liqpay.ua/doc) diff --git a/README.md b/README.md index b9e6d44..cc476d8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,98 @@ -sdk-ios -======= -LiqPay SDK-IOS +# LiqPay iOS SDK -Documentation https://www.liqpay.ua/documentation/ru +## 🌐 Other Languages + +- [English](README.en.md) + + +Фреймворк `liqpay_ios.xcframework` надає інструменти для інтеграції з LiqPay-платежами. +SDK містить усі необхідні залежності й не потребує використання CocoaPods, Carthage або Swift Package Manager. + +--- + +## Встановлення + +1. Скопіюйте файл `liqpay_ios.xcframework` у каталог вашого проєкту (наприклад, `Frameworks/`). +2. Додайте фреймворк до Xcode: + - Відкрийте ваш проєкт. + - Перетягніть `liqpay_ios.xcframework` до Project Navigator. + - У вікні, що з’явиться, виберіть: + - ✅ **Copy items if needed** + - ✅ Додайте до відповідного Target (наприклад, `YourAppTarget`) +3. Перейдіть до: + ``` + Target → General → Frameworks, Libraries, and Embedded Content + ``` + Переконайтеся, що фреймворк додано з такими налаштуваннями: + - Embed: **Embed & Sign** + +--- + +## Налаштування проєкту + +У **Build Settings** цільового застосунку потрібно вказати параметр `Runpath Search Paths`: + +``` +@executable_path/Frameworks +``` + +Якщо такого параметра немає – додайте його вручну. +Це потрібно для правильного завантаження динамічних фреймворків на реальних пристроях (iPhone / iPad). + +--- + +## Використання + +У вихідному коді вашого проєкту підключіть фреймворк: + +```swift +import liqpay_ios +``` + +Приклад виклику оплати: + +```swift +let payment = LiqPayPayment( + data: "base64_encoded_data", + signature: "base64_encoded_signature" +) + +payment.payPrivatPay { success, error in + if success { + // Успішний платіж + } else { + // Обробка помилки + } +} +``` + +--- + +## Архітектури + +Фреймворк підтримує такі архітектури: + +- `arm64` (пристрої) +- `x86_64`, `arm64` (симулятори) + +Зібрано з використанням `BUILD_LIBRARY_FOR_DISTRIBUTION = YES` та підтримує Swift ABI Stability. + +--- + +## Технічні деталі + +- Статичне лінкування всіх залежностей +- Поширюється як `.xcframework` +- Сумісний з Xcode 14 і вище + +--- + +## Підтримка + +З питань інтеграції та технічної підтримки звертайтеся до команди розробки SDK або до техпідтримки проєкту. + + +[Documentation](https://www.liqpay.ua/doc) + + diff --git a/libLiqpayMob_universal.a b/libLiqpayMob_universal.a deleted file mode 100644 index b443d8c..0000000 Binary files a/libLiqpayMob_universal.a and /dev/null differ diff --git a/liqpay-iOS SDK v0.17.1 23.07.2025.zip b/liqpay-iOS SDK v0.17.1 23.07.2025.zip new file mode 100644 index 0000000..2afb981 Binary files /dev/null and b/liqpay-iOS SDK v0.17.1 23.07.2025.zip differ