Skip to content

Commit 551283c

Browse files
committed
Phase 2: Add Swift Package Manager support
- Added Package.swift with iOS 14+ target - Configured SPM target with necessary frameworks - Included PrivacyInfo.xcprivacy resource - Supported Swift tools version 5.9
1 parent cdc6186 commit 551283c

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// swift-tools-version: 5.9
2+
import PackageDescription
3+
4+
let package = Package(
5+
name: "permission_handler_apple",
6+
platforms: [
7+
.iOS(.v14)
8+
],
9+
products: [
10+
.library(
11+
name: "permission_handler_apple",
12+
targets: ["permission_handler_apple"]),
13+
],
14+
dependencies: [],
15+
targets: [
16+
.target(
17+
name: "permission_handler_apple",
18+
dependencies: [],
19+
path: "Sources/permission_handler_apple",
20+
resources: [
21+
.copy("Resources/PrivacyInfo.xcprivacy")
22+
],
23+
publicHeadersPath: ".",
24+
cSettings: [
25+
.headerSearchPath("."),
26+
.headerSearchPath("util"),
27+
.headerSearchPath("strategies"),
28+
.define("PERMISSION_HANDLER_APPLE", to: "1")
29+
],
30+
linkerSettings: [
31+
.linkedFramework("Flutter", .when(platforms: [.iOS])),
32+
.linkedFramework("UIKit", .when(platforms: [.iOS])),
33+
.linkedFramework("Foundation"),
34+
.linkedFramework("CoreBluetooth", .when(platforms: [.iOS])),
35+
.linkedFramework("CoreLocation", .when(platforms: [.iOS])),
36+
.linkedFramework("EventKit", .when(platforms: [.iOS])),
37+
.linkedFramework("Photos", .when(platforms: [.iOS])),
38+
.linkedFramework("Contacts", .when(platforms: [.iOS])),
39+
.linkedFramework("AVFoundation", .when(platforms: [.iOS])),
40+
.linkedFramework("MediaPlayer", .when(platforms: [.iOS])),
41+
.linkedFramework("Speech", .when(platforms: [.iOS])),
42+
.linkedFramework("CoreMotion", .when(platforms: [.iOS])),
43+
.linkedFramework("UserNotifications", .when(platforms: [.iOS])),
44+
.linkedFramework("AppTrackingTransparency", .when(platforms: [.iOS]))
45+
]
46+
),
47+
]
48+
)

0 commit comments

Comments
 (0)