Skip to content

Commit

Permalink
Merge branch 'develop' into 'master'
Browse files Browse the repository at this point in the history
New release 2.0.0

See merge request frontend/ios-sdk!31
  • Loading branch information
Николай Капустин committed Sep 14, 2023
2 parents 34b6a0c + 231cc15 commit 5c57486
Show file tree
Hide file tree
Showing 52 changed files with 1,301 additions and 400 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build:
runs-on: macOS-11
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- name: Install Cocoapods
Expand All @@ -17,6 +17,6 @@ jobs:
export LIB_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
set -eo pipefail
pod lib lint --allow-warnings
pod trunk push OgonRuSDK.podspec --allow-warnings
pod trunk push GPBonusSDK.podspec --allow-warnings
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
23 changes: 22 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,27 @@ derived_data
.idea

# CocoaPods
Pods
Pods/

.DS_Store

.DS_Store
.vscode/

build/
*.ipa
*.app.dSym.zip
*.xcarchive

*.log

*.xcworkspace
*.xcworkspace/*
*.xcuserstate

.swiftpm/config/registries.json
.swiftpm/xcode/xcuserdata
.swiftpm/xcode/package.xcworkspace
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

.netrc
15 changes: 15 additions & 0 deletions GPBonusSDK.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Pod::Spec.new do |spec|
spec.name = "GPBonusSDK"
spec.version = ENV['LIB_VERSION'] || "2.0.0"
spec.summary = "GazpromBonus widget integration lib"
spec.homepage = "https://github.com/SetPartnerstv/ios-sdk"
spec.license = { :type => "MIT", :file => "LICENSE" }
spec.author = "SetPartnerstv"
spec.platform = :ios, "11.0"
spec.source = { :git => "https://github.com/SetPartnerstv/ios-sdk.git", :tag => "#{spec.version}" }
spec.source_files = "sdk/**/*.{swift,h,m}"
spec.requires_arc = true
spec.swift_version = "5.0"
spec.dependency "SwiftProtobuf", "~> 1.14.0"
spec.frameworks = ["UIKit", "WebKit"]
end
15 changes: 0 additions & 15 deletions OgonRuSDK.podspec

This file was deleted.

14 changes: 14 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"pins" : [
{
"identity" : "swift-protobuf",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf.git",
"state" : {
"revision" : "cf62cdaea48b77f1a631e5cb3aeda6047c2cba1d",
"version" : "1.23.0"
}
}
],
"version" : 2
}
29 changes: 29 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// swift-tools-version: 5.8
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "GPBonusSDK",
platforms: [.iOS(.v12)],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "GPBonusSDK",
targets: ["GPBonusSDK"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "https://github.com/apple/swift-protobuf.git", from: "1.6.0")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "GPBonusSDK",
dependencies: [.product(name: "SwiftProtobuf", package: "swift-protobuf")],
path: "sdk/"
//exclude:["Podfile", "Podfile.lock"]
)
]
)
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment the next line to define a global platform for your project
platform :ios, '11.0'
platform :ios, '12.0'

target 'sdk' do
# Comment the next line if you don't want to use dynamic frameworks
Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 83673be9a8bf482e1b93951c70e677a0e1acfb8e

COCOAPODS: 1.11.2
COCOAPODS: 1.12.1
13 changes: 3 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Описание проекта

Библиотека интеграции виджета с WebView для использования в приложениях партнеров и собственном приложении "Огонь".
Библиотека интеграции виджета с WebView для использования в приложениях партнеров и собственном приложении "Газпром Бонус".


## Установка зависимостей
Expand All @@ -10,12 +10,5 @@
* установить зависимости из CocoaPods: `pod install`


## Сборка

Universal build:

```sh
sh build.sh
```

Артефакты сборки лежат в папке `/build/universal`
## Cocoapods
Репозиторий синхронизуется с [GitHub](https://github.com/SetPartnerstv/ios-sdk) и публикуется в Cocoapods, название пакета `GPBonusSDK`.
42 changes: 0 additions & 42 deletions build.sh

This file was deleted.

33 changes: 17 additions & 16 deletions sdk.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 53;
objects = {

/* Begin PBXBuildFile section */
Expand All @@ -21,7 +21,6 @@
84E9F69A257A6CD000836790 /* build.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = build.sh; sourceTree = "<group>"; };
84EA1AA625762D41002EDA94 /* sdk.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = sdk.framework; sourceTree = BUILT_PRODUCTS_DIR; };
84EA1AA925762D41002EDA94 /* sdk.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = sdk.h; sourceTree = "<group>"; };
84EA1AAA25762D41002EDA94 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
84EA1AB225762E3A002EDA94 /* SDKViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SDKViewController.swift; sourceTree = "<group>"; };
C5AADCA4A5CD6DB65761DF7B /* libPods-sdk.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-sdk.a"; sourceTree = BUILT_PRODUCTS_DIR; };
FD961EA8177C8A0D55CC85AC /* Pods-sdk.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-sdk.release.xcconfig"; path = "Target Support Files/Pods-sdk/Pods-sdk.release.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -81,7 +80,6 @@
8403FE692577A2C300FB71B4 /* model */,
84EA1AB225762E3A002EDA94 /* SDKViewController.swift */,
84EA1AA925762D41002EDA94 /* sdk.h */,
84EA1AAA25762D41002EDA94 /* Info.plist */,
84B66832257937AA005C3E67 /* PaymentHandler.swift */,
);
path = sdk;
Expand Down Expand Up @@ -134,7 +132,8 @@
84EA1A9D25762D41002EDA94 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1220;
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1430;
TargetAttributes = {
84EA1AA525762D41002EDA94 = {
CreatedOnToolsVersion = 12.2;
Expand Down Expand Up @@ -261,7 +260,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -319,7 +318,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand All @@ -337,26 +336,27 @@
baseConfigurationReference = 81C6014399D8F14187527862 /* Pods-sdk.debug.xcconfig */;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 31;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 3V7NW97R8C;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = sdk/Info.plist;
ENABLE_MODULE_VERIFIER = YES;
GENERATE_INFOPLIST_FILE = YES;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.0.9;
PRODUCT_BUNDLE_IDENTIFIER = ru.ogon.sdk;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14";
PRODUCT_BUNDLE_IDENTIFIER = ru.gpbonus.sdk;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SUPPORTS_MACCATALYST = NO;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -370,26 +370,27 @@
baseConfigurationReference = FD961EA8177C8A0D55CC85AC /* Pods-sdk.release.xcconfig */;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 31;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 3V7NW97R8C;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = sdk/Info.plist;
ENABLE_MODULE_VERIFIER = YES;
GENERATE_INFOPLIST_FILE = YES;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.0.9;
PRODUCT_BUNDLE_IDENTIFIER = ru.ogon.sdk;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14";
PRODUCT_BUNDLE_IDENTIFIER = ru.gpbonus.sdk;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SUPPORTS_MACCATALYST = NO;
SWIFT_VERSION = 5.0;
Expand Down
2 changes: 1 addition & 1 deletion sdk.xcodeproj/xcshareddata/xcschemes/sdk.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1220"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Binary file not shown.

This file was deleted.

28 changes: 0 additions & 28 deletions sdk/Info.plist

This file was deleted.

2 changes: 1 addition & 1 deletion sdk/PaymentHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class PaymentHandler : NSObject, PKPaymentAuthorizationControllerDelegate {
return PKPaymentAuthorizationController.canMakePayments()
}

func startPayment(request: Pb_ApplePayPaymentDataRequest) {
func startPayment(request: Pbv1_ApplePayPaymentDataRequest) {
let total = PKPaymentSummaryItem(label: request.total.label, amount: NSDecimalNumber(string: request.total.amount), type: .final)
let paymentRequest = PKPaymentRequest()
paymentRequest.paymentSummaryItems = [total]
Expand Down
Loading

0 comments on commit 5c57486

Please sign in to comment.