Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,12 @@ jobs:
run: |
flutter create --template=app --platforms=ios /tmp/example
cd /tmp/example
# Pokepay 2.3.0 は iOS 15.0 以上を要求するが、Flutter のテンプレートは
# それより低いデプロイメントターゲットを生成するため引き上げる。
# post_install の上書きも必須: APIKit は 9.0、Flutter pod は 11.0 を
# 宣言しており、Xcode 26 以降はそのままではビルドできない。
sed -i '' -E "s@^#? *platform :ios.*@platform :ios, '15.0'@" ios/Podfile
sed -i '' -E "s@^( *)flutter_additional_ios_build_settings\(target\)@\1flutter_additional_ios_build_settings(target)\n\1target.build_configurations.each { |c| c.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0' }@" ios/Podfile
sed -i '' -E "s@IPHONEOS_DEPLOYMENT_TARGET = [0-9.]+;@IPHONEOS_DEPLOYMENT_TARGET = 15.0;@" ios/Runner.xcodeproj/project.pbxproj
flutter pub add pokepay_sdk --path "$GITHUB_WORKSPACE"
flutter build ios --debug --no-codesign
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2.3.0
* Bumped the iOS `Pokepay` dependency to 2.3.0
* **Raised the minimum iOS deployment target to 15.0.** Apps embedding this plugin must set `platform :ios, '15.0'` in their `ios/Podfile`, add a `post_install` hook raising `IPHONEOS_DEPLOYMENT_TARGET` for all pods, and match it on the `Runner` target -- see the iOS setup section in the README. The hook is required because `APIKit` declares iOS 9.0 and the `Flutter` pod declares 11.0, which Xcode 26 and later refuse to build
* Removed `import Result` from the iOS plugin: `Pokepay` 2.3.0 dropped the `antitypical/Result` dependency, which had been a no-op shim over the standard library's `Result` since Swift 5. No Dart-facing API changed

## 2.2.2
* Fixed a NullPointerException on Android when `requestId` was omitted (null) on `createTransactionWithBill`/`WithCashtray`/`WithCheck`/`WithCpm` and `createTransactionWithJwt` -- a null `requestId` is now passed through to the native SDK instead of being parsed as a UUID
* Added validation for `requestId`: it must be a lowercase RFC 4122 UUID in the 8-4-4-4-12 hexadecimal form, and a malformed value now throws a `ProcessingError` on both platforms. Previously iOS silently dropped a malformed `request_id`, creating a non-idempotent transaction that could double-charge on retry
Expand Down
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
# Pokepay Flutter SDK
## API Document reference
Please refer to [this document](https://docs.pokepay.jp/guidelines/app-sdk/java.html#_client_api)
## Requirements
* iOS 15.0 or later (required by the native `Pokepay` pod as of 2.3.0)
* Android `minSdkVersion` 26 or later

### iOS setup

In your app's `ios/Podfile`, set the platform and raise the deployment target of
every pod. Both are required: `APIKit` (a transitive dependency of `Pokepay`)
declares iOS 9.0 and the `Flutter` pod declares 11.0, and Xcode 26 and later
refuse to build anything below 15.0.

```ruby
platform :ios, '15.0'

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
# Must come after flutter_additional_ios_build_settings, which resets it.
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
end
end
end
```

Also set `IPHONEOS_DEPLOYMENT_TARGET` to 15.0 for the `Runner` target itself
(Xcode: Runner → General → Minimum Deployments).

## Install
1. In the pubspec.yaml of the project, add the following:
```yaml
Expand Down
1 change: 0 additions & 1 deletion ios/Classes/SwiftPokepaySdkPlugin.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Flutter
import UIKit
import APIKit
import Result
import Pokepay
import Foundation

Expand Down
6 changes: 3 additions & 3 deletions ios/pokepay_sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
Pod::Spec.new do |s|
s.name = 'pokepay_sdk'
s.version = '2.2.2'
s.version = '2.3.0'
s.summary = 'Pokepay flutter SDK'
s.description = <<-DESC
Pokepay flutter SDK
Expand All @@ -15,8 +15,8 @@ Pokepay flutter SDK
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.dependency 'Pokepay', '2.2.1'
s.platform = :ios, '12.0'
s.dependency 'Pokepay', '2.3.0'
s.platform = :ios, '15.0'

# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: pokepay_sdk
description: SDK for pokepay
version: 2.2.2
version: 2.3.0
homepage: https://pay.pocket-change.jp/

environment:
Expand Down
Loading