42e1c2e34b
Swift 侧(协议与 Android UploadPlugin.kt 逐字一致,编译/真机留 G3): - UploadBridge.swift:通道/方法/事件/失败码常量 + registerTask 参数解析 (镜像 UploadProtocol.kt) - UploadEventBus.swift:单调 seq + 终态 ack 缓存重放(镜像 UploadEventBus.kt),iOS 增强——未 ack 终态落盘(系统后台拉起投递的 回调在进程重启后同样重放,技术方案 §6.2 持久化原生回调) - UploadTaskStore.swift:taskId→URLSession taskIdentifier 映射 plist 持久化 (Application Support;对应 Android WorkManager 自持映射) - UploadPlugin.swift:URLSession background (com.photolive.photo_live.uploads)+ delegate 失败分类(2xx→completed+etag / 403→needsRenew / 4xx→HTTP_4XX / 网络→重试上限后 NETWORK,镜像 UploadPutExecutor/UploadWorker)、原生重试(5 次上限、10s 指数退避)、 进度 500ms 节流、queryTask/cancelTask/ackEvents、静默取消 - AppDelegate.swift:implicit engine 通道注册 + 启动重建会话 + handleEventsForBackgroundURLSession completionHandler 暂存 - Info.plist:UIBackgroundModes 有意不声明(background URLSession 无需; 计划措辞按技术方案 §6.2 修正,见 README-ios.md) - project.pbxproj 登记新 Swift 文件;README-ios.md(Xcode 步骤 + G3 验证 清单:实际文件上传/持久化回调窗口/服务端补偿/重启重联校准/强制退出/ 低电量延迟/100 张批量) Dart:NativeTransport 选择矩阵并入 iOS(Platform.isAndroid || isIOS, FORCE_DART_TRANSPORT 覆盖不变)——协议两侧一致,无新通道代码。 flutter analyze 0 issue;flutter test 219 全绿。 Co-Authored-By: Claude Code <noreply@anthropic.com>
89 lines
3.3 KiB
Plaintext
89 lines
3.3 KiB
Plaintext
<?xml version="1.0" encoding="UTF-8"?>
|
||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||
<plist version="1.0">
|
||
<dict>
|
||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||
<true/>
|
||
<key>CFBundleDevelopmentRegion</key>
|
||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||
<key>CFBundleDisplayName</key>
|
||
<string>Photo Live</string>
|
||
<key>CFBundleExecutable</key>
|
||
<string>$(EXECUTABLE_NAME)</string>
|
||
<key>CFBundleIdentifier</key>
|
||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||
<key>CFBundleInfoDictionaryVersion</key>
|
||
<string>6.0</string>
|
||
<key>CFBundleName</key>
|
||
<string>photo_live</string>
|
||
<key>CFBundlePackageType</key>
|
||
<string>APPL</string>
|
||
<key>CFBundleShortVersionString</key>
|
||
<string>$(FLUTTER_BUILD_NAME)</string>
|
||
<key>CFBundleSignature</key>
|
||
<string>????</string>
|
||
<key>CFBundleVersion</key>
|
||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||
<key>LSRequiresIPhoneOS</key>
|
||
<true/>
|
||
<!-- UIBackgroundModes 有意未声明(P3 计划 Task 8 偏差登记):上传采用
|
||
background URLSession(identifier com.photolive.photo_live.uploads),
|
||
传输与完成回调由系统调度,无需 fetch/processing 等后台模式;计划
|
||
原文的「backgroundModes(fetch/processing)」按技术方案 §6.2 与
|
||
Apple 文档修正——多声明反而引入审核 scrutiny。见
|
||
ios/README-ios.md「Background Modes」。 -->
|
||
<!-- 开发/联调允许访问本地网络后端(模拟器宿主回环,Android 侧对应 10.0.2.2);
|
||
生产环境仍走 HTTPS,不放宽整体 ATS。 -->
|
||
<key>NSAppTransportSecurity</key>
|
||
<dict>
|
||
<key>NSAllowsLocalNetworking</key>
|
||
<true/>
|
||
</dict>
|
||
<!-- 相册/相机:image_picker(选图)与 camera(连拍)所需 -->
|
||
<key>NSPhotoLibraryUsageDescription</key>
|
||
<string>需要访问相册以选择要上传的照片。/ Photo library access is required to pick photos for upload.</string>
|
||
<key>NSCameraUsageDescription</key>
|
||
<string>需要使用相机以拍摄并上传照片。/ Camera access is required to take and upload photos.</string>
|
||
<key>UIApplicationSceneManifest</key>
|
||
<dict>
|
||
<key>UIApplicationSupportsMultipleScenes</key>
|
||
<false/>
|
||
<key>UISceneConfigurations</key>
|
||
<dict>
|
||
<key>UIWindowSceneSessionRoleApplication</key>
|
||
<array>
|
||
<dict>
|
||
<key>UISceneClassName</key>
|
||
<string>UIWindowScene</string>
|
||
<key>UISceneConfigurationName</key>
|
||
<string>flutter</string>
|
||
<key>UISceneDelegateClassName</key>
|
||
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
|
||
<key>UISceneStoryboardFile</key>
|
||
<string>Main</string>
|
||
</dict>
|
||
</array>
|
||
</dict>
|
||
</dict>
|
||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||
<true/>
|
||
<key>UILaunchStoryboardName</key>
|
||
<string>LaunchScreen</string>
|
||
<key>UIMainStoryboardFile</key>
|
||
<string>Main</string>
|
||
<key>UISupportedInterfaceOrientations</key>
|
||
<array>
|
||
<string>UIInterfaceOrientationPortrait</string>
|
||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||
</array>
|
||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||
<array>
|
||
<string>UIInterfaceOrientationPortrait</string>
|
||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||
</array>
|
||
</dict>
|
||
</plist>
|