Skip to content

Added mention of Swift Package Manager to Quickstart:iOS #2391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ When you create a Source in the Segment web app, it tells the Segment servers th

## Step 2: Install the SDK

The recommended way to install Analytics for iOS is using [Cocoapods](http://cocoapods.org/), since it means you can create a build with specific bundled destinations, and because it makes it simple to install and upgrade.
Segment recommends you install Analytics for iOS by using either [Cocoapods](http://cocoapods.org/) or your Swift Package Manager. These allow you to create a build with specific bundled destinations, and they have a simplified installation and upgrading process.

First, add the `Analytics` dependency to your `Podfile` by adding the following line:

Expand Down Expand Up @@ -94,7 +94,7 @@ Now that the SDK is installed and set up, you’re ready to start making calls.
The `identify` method informs Segment who the current user is. It takes a unique User ID, and any optional traits you know about them. You can read more about it in the [identify reference](/docs/connections/sources/catalog/libraries/mobile/ios#identify).

Here’s what a basic call to `identify` might look like:

{% codeexample %}
{% codeexampletab Swift %}
```swift
Expand Down Expand Up @@ -225,4 +225,3 @@ Analytics.shared().flush()
## What’s Next?

We just walked through the quickest way to get started with Segment using Analytics for iOS. You might also want to check out our full [Analytics for iOS reference](/docs/connections/sources/catalog/libraries/mobile/ios) to see what else is possible, or read about the [Tracking API methods](/docs/connections/sources/catalog/libraries/server/http-api/) to get a sense for the bigger picture.