E11
ArtCut/Pro:版本与追踪权限路径
展示编译时差异和一条权限路径,不证明历史归档链接框架、真机同意流程成功或本地修复已上传。
所选节选
来源: VideoEditorPro/VideoEditorPro/App/AppVariant.swift · 1–22
按原始行号展示,所选源码行保持原文。
1 | import Foundation
2 |
3 | enum AppDistribution {
4 | case paid
5 | case freeWithAds
6 | }
7 |
8 | enum AppVariant {
9 | /// The App Store listing for the paid build. Keep this as a universal
10 | /// App Store URL so the storefront can localize the product name.
11 | static let proAppStoreURL = URL(string: "https://apps.apple.com/app/id6790354436")!
12 |
13 | #if ARTCUT_FREE
14 | static let distribution: AppDistribution = .freeWithAds
15 | static let displaysAds = true
16 | static let displayName = "ArtCut"
17 | #else
18 | static let distribution: AppDistribution = .paid
19 | static let displaysAds = false
20 | static let displayName = "ArtCutPro"
21 | #endif
22 | }
- 原始整文件 SHA-256
- 72e091896724be8dca7c2981a23f593c8b3e9a98dd3d4b1f361835180455cf76
- 带行号节选 SHA-256
- 5e59357e3959e55b04ba12ef0a8e229041ee6b9841f6a51ece760ba0c365eb38
来源: VideoEditorPro/VideoEditorPro/Services/TrackingAuthorizationManager.swift · 34–52
按原始行号展示,所选源码行保持原文。
34 | func requestIfNeededBeforeAdRequests() async -> TrackingAuthorizationState {
35 | guard AppVariant.displaysAds else { return .notRequired }
36 |
37 | #if ARTCUT_FREE && canImport(AppTrackingTransparency)
38 | let current = map(status: ATTrackingManager.trackingAuthorizationStatus)
39 | guard current == .notDetermined else { return current }
40 |
41 | if let requestTask {
42 | return await requestTask.value
43 | }
44 |
45 | let task = Task { @MainActor in
46 | try? await Task.sleep(nanoseconds: 650_000_000)
47 | return await withCheckedContinuation { continuation in
48 | ATTrackingManager.requestTrackingAuthorization { status in
49 | continuation.resume(returning: Self.map(status: status))
50 | }
51 | }
52 | }
- 原始整文件 SHA-256
- 06092d42bedd141bd32f96880f2e5acfd368d4e48a79d5b9d6f5039a3a52d982
- 带行号节选 SHA-256
- 9fa52ec7f8eb9066e92101a158c010f6c7b0d9d587246f96b2d30d8728141f8b