File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,39 @@ Note: Segment _strongly_ recommends that you use a dynamic framework to manage y
69
69
github "segmentio/analytics-ios"
70
70
` ` `
71
71
72
+ ### Swift Package Manager (SPM )
73
+
74
+ To add analytics- ios via Swift Package Mangaer, it is possible to add it one of two ways:
75
+
76
+ #### Xcode
77
+ ! [Xcode Add SPM Package](https: // user-images.githubusercontent.com/917994/119199146-69765200-ba3f-11eb-9173-93cfb5f3cabd.png)
78
+
79
+ ! [ChoosePackageRepository](https: // user-images.githubusercontent.com/917994/119199143-68ddbb80-ba3f-11eb-9bf2-5dc11c208abd.png)
80
+
81
+ ! [ChoosePackageOptions](https: // user-images.githubusercontent.com/917994/119199139-67ac8e80-ba3f-11eb-9941-fc541030f3df.png)
82
+
83
+
84
+ #### Package .swift
85
+ ` ` `
86
+ import PackageDescription
87
+
88
+ let package = Package(
89
+ name: "MyApplication",
90
+ dependencies: [
91
+ // Add a package containing Analytics as the name along with the git url
92
+ .package(
93
+ name: "Segment",
94
+ url: "[email protected] :segmentio/analytics-ios.git"
95
+ )
96
+ ],
97
+ targets: [
98
+ name: "MyApplication",
99
+ dependencies: ["Segment"] // Add Analytics as a dependency of your application
100
+ ]
101
+ )
102
+ ` ` `
103
+ Note: Segment recommends that you use Xcode to add your package .
104
+
72
105
## Quickstart
73
106
74
107
Refer to the Quickstart documentation at [https: // segment.com/docs/libraries/ios/quickstart](https://segment.com/docs/libraries/ios/quickstart/).
You can’t perform that action at this time.
0 commit comments