Skip to content

adding new swift plugin docs for 1flow #5369

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 2 commits into from
Sep 20, 2023
Merged

adding new swift plugin docs for 1flow #5369

merged 2 commits into from
Sep 20, 2023

Conversation

tcgilbert
Copy link
Contributor

Proposed changes

1flow is launching a swift plugin, creating the page on their behalf

Merge timing

asap

@tcgilbert tcgilbert requested a review from a team as a code owner September 19, 2023 13:27
@tcgilbert tcgilbert requested review from rchinn1 and removed request for a team September 19, 2023 13:27
Comment on lines 17 to 57
## Adding the dependency

### Through Xcode

In the Xcode `File` menu, click `Add Packages`. You'll see a dialog where you can search for Swift packages. In the search field, enter the URL to this repository.
```
https://github.com/1Flow-Inc/segment-1flow-ios.git
```


You'll then have the option to pin to a version, or specific branch, as well as which project in your workspace to add it to. Once you've made your selections, click the `Add Package` button.

### Through Package.swift

Open your Package.swift file and add the following to the `dependencies` section:

```
.package(
name: "Segment",
url: "https://github.com/1Flow-Inc/segment-1flow-ios.git",
from: "1.0.0"
),
```

## Using the Plugin in your App

Open the file where you setup and configure the Analytics-Swift library. Add this plugin to the list of imports.

```
import Segment
import SegmentOneFlow // <-- Add this line
```

Just under your Analytics-Swift library setup, call `analytics.add(plugin: ...)` to add an instance of the plugin to the Analytics timeline.

```
let analytics = Analytics(configuration: Configuration(writeKey: "<YOUR WRITE KEY>")
.flushAt(3)
.trackApplicationLifecycleEvents(true))
analytics.add(plugin: OneFlowDestination())
```
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rohantryskybox I have added this page as we provide each swift plugin a unique page. Can you confirm these setup instructions are accurate for your plugin?

For more context, this is in line with the setup instructions shown for all the other swift plugins:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tcgilbert
This looks good.
Thanks

@rchinn1 rchinn1 added the content-update updates to content that are not new features, includes grammar fixes, added notes label Sep 19, 2023
Copy link
Contributor

@rchinn1 rchinn1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but will wait for an answer to the open question to merge this

@rchinn1 rchinn1 merged commit dc8625c into develop Sep 20, 2023
@rchinn1 rchinn1 deleted the thomas/1flow-swift branch September 20, 2023 23:56
@github-actions
Copy link
Contributor

Thank you for your contribution! Your pull request is merged, but may take a day or two to appear on the site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content-update updates to content that are not new features, includes grammar fixes, added notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants