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
+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>