feat: 增加ios支付&ui修改

This commit is contained in:
2025-12-09 05:51:32 -08:00
parent dc5a5fc78a
commit ca913eb38f
12 changed files with 463 additions and 365 deletions
Executable → Regular
+56 -7
View File
@@ -16,9 +16,6 @@ PODS:
- flutter_udid (0.0.1):
- Flutter
- SAMKeychain
- in_app_purchase_storekit (0.0.1):
- Flutter
- FlutterMacOS
- OrderedSet (6.0.3)
- package_info_plus (0.4.5):
- Flutter
@@ -31,6 +28,42 @@ PODS:
- SAMKeychain (1.5.3)
- share_plus (0.0.1):
- Flutter
- Stripe (23.27.6):
- StripeApplePay (= 23.27.6)
- StripeCore (= 23.27.6)
- StripePayments (= 23.27.6)
- StripePaymentsUI (= 23.27.6)
- StripeUICore (= 23.27.6)
- stripe_ios (0.0.1):
- Flutter
- Stripe (~> 23.27.0)
- StripeApplePay (~> 23.27.0)
- StripeFinancialConnections (~> 23.27.0)
- StripePayments (~> 23.27.0)
- StripePaymentSheet (~> 23.27.0)
- StripePaymentsUI (~> 23.27.0)
- StripeApplePay (23.27.6):
- StripeCore (= 23.27.6)
- StripeCore (23.27.6)
- StripeFinancialConnections (23.27.6):
- StripeCore (= 23.27.6)
- StripeUICore (= 23.27.6)
- StripePayments (23.27.6):
- StripeCore (= 23.27.6)
- StripePayments/Stripe3DS2 (= 23.27.6)
- StripePayments/Stripe3DS2 (23.27.6):
- StripeCore (= 23.27.6)
- StripePaymentSheet (23.27.6):
- StripeApplePay (= 23.27.6)
- StripeCore (= 23.27.6)
- StripePayments (= 23.27.6)
- StripePaymentsUI (= 23.27.6)
- StripePaymentsUI (23.27.6):
- StripeCore (= 23.27.6)
- StripePayments (= 23.27.6)
- StripeUICore (= 23.27.6)
- StripeUICore (23.27.6):
- StripeCore (= 23.27.6)
- url_launcher_ios (0.0.1):
- Flutter
- webview_flutter_wkwebview (0.0.1):
@@ -44,11 +77,11 @@ DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_inappwebview_ios (from `.symlinks/plugins/flutter_inappwebview_ios/ios`)
- flutter_udid (from `.symlinks/plugins/flutter_udid/ios`)
- in_app_purchase_storekit (from `.symlinks/plugins/in_app_purchase_storekit/darwin`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- share_plus (from `.symlinks/plugins/share_plus/ios`)
- stripe_ios (from `.symlinks/plugins/stripe_ios/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/darwin`)
@@ -58,6 +91,14 @@ SPEC REPOS:
- OrderedSet
- ReachabilitySwift
- SAMKeychain
- Stripe
- StripeApplePay
- StripeCore
- StripeFinancialConnections
- StripePayments
- StripePaymentSheet
- StripePaymentsUI
- StripeUICore
EXTERNAL SOURCES:
connectivity_plus:
@@ -70,8 +111,6 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_inappwebview_ios/ios"
flutter_udid:
:path: ".symlinks/plugins/flutter_udid/ios"
in_app_purchase_storekit:
:path: ".symlinks/plugins/in_app_purchase_storekit/darwin"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation:
@@ -80,6 +119,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/permission_handler_apple/ios"
share_plus:
:path: ".symlinks/plugins/share_plus/ios"
stripe_ios:
:path: ".symlinks/plugins/stripe_ios/ios"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
webview_flutter_wkwebview:
@@ -92,7 +133,6 @@ SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_inappwebview_ios: 6f63631e2c62a7c350263b13fa5427aedefe81d4
flutter_udid: b2417673f287ee62817a1de3d1643f47b9f508ab
in_app_purchase_storekit: a1ce04056e23eecc666b086040239da7619cd783
OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
@@ -100,6 +140,15 @@ SPEC CHECKSUMS:
ReachabilitySwift: 32793e867593cfc1177f5d16491e3a197d2fccda
SAMKeychain: 483e1c9f32984d50ca961e26818a534283b4cd5c
share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5
Stripe: 9fec845645e39f371e6898926d096fd9c2feb5a5
stripe_ios: 03c617acee72e48a2d055d096a4b0ed2afebb256
StripeApplePay: 5f017e8dfe259fafbab70137776189deef754bb2
StripeCore: 01ec57f0dddfe742054dc6a322f811426c25313d
StripeFinancialConnections: 56698cb6274bf89fb8c76b934f6156f368e97765
StripePayments: 6adf11faf1b7038e77aa97019410305c6adca79d
StripePaymentSheet: 3eaf870c4388e44b0cc37e4c69d00b6957fd8bd7
StripePaymentsUI: 59ccddeacad592b09fa67e8d641340820ddb4751
StripeUICore: 879bbf5889265db13f52fac8aad7a176ba62481f
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
webview_flutter_wkwebview: a4af96a051138e28e29f60101d094683b9f82188
+15 -2
View File
@@ -1,7 +1,7 @@
import UIKit
import Flutter
import Libcore
import PassKit
@main
@objc class AppDelegate: FlutterAppDelegate {
@@ -12,9 +12,22 @@ import Libcore
setupFileManager()
registerHandlers()
GeneratedPluginRegistrant.register(with: self)
// Apple Pay
debugApplePaySupport()
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
func debugApplePaySupport() {
// 使 Apple Pay
let canPay = PKPaymentAuthorizationController.canMakePayments()
print("💳 Can make payments: \(canPay)")
// 使
let canPayWithNetworks = PKPaymentAuthorizationController.canMakePayments(
usingNetworks: [.visa, .masterCard, .amex]
)
print("💳 Can pay with Visa/Master/Amex: \(canPayWithNetworks)")
}
func setupFileManager() {
try? FileManager.default.createDirectory(at: FilePath.workingDirectory, withIntermediateDirectories: true)
FileManager.default.changeCurrentDirectoryPath(FilePath.sharedDirectory.path)
+4
View File
@@ -4,6 +4,10 @@
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.in-app-payments</key>
<array>
<string>merchant.com.taw.hifastvpn</string>
</array>
<key>com.apple.developer.networking.networkextension</key>
<array>
<string>packet-tunnel-provider</string>
+4
View File
@@ -4,6 +4,10 @@
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.in-app-payments</key>
<array>
<string>merchant.com.taw.hifastvpn</string>
</array>
<key>com.apple.developer.networking.networkextension</key>
<array>
<string>packet-tunnel-provider</string>