Skip to content
Merged
Show file tree
Hide file tree
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
25 changes: 13 additions & 12 deletions src/connections/sources/catalog/libraries/mobile/apple/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 'Analytics-Swift for iOS & Apple'
title: 'Analytics-Swift for iOS and Apple'
strat: swift
redirect_from:
- '/connections/sources/catalog/cloud-apps/swift/'
Expand All @@ -11,33 +11,34 @@ tags:
- swift
- ios
---
With Analytics-Swift, you can send data from iOS, tvOS, iPadOS, WatchOS, macOS and Linux applications to any analytics or marketing tool without having to learn, test, or implement a new API every time. Analytics-Swift is compatible with both Swift and Objective-C applications.
With Analytics-Swift, you can send data from iOS, tvOS, iPadOS, WatchOS, macOS, and Linux applications to any analytics or marketing tool without having to learn, test, or implement a new API every time. Analytics-Swift is compatible with both Swift and Objective-C applications.

> warning ""
> If you're migrating to **Analytics-Swift** from Analytics iOS (Classic), you can skip to the [migration guide](/docs/connections/sources/catalog/libraries/mobile/apple/migration/).

## Benefits of Analytics-Swift

Analytics-Swift provides several key benefits including improvements in stability, performance, and developer experience when compared to Analytics iOS (Classic).

### Performance

Analytics-Swift offers improved performance when compared to Analytics iOS:
- Faster event processing and delivery
- Significantly lower CPU usage
- Small memory & disk usage footprint
- Small memory and disk usage footprint

### Developer Experience
### Developer experience

Analytics-Swift adds several improvements to the overall experience of using the core SDK, as well as improvements to the overall [Plugin Architecture](/docs/connections/sources/catalog/libraries/mobile/swift/swift-plugin-architecture).

- Ability to use Type Safe data structures rather than just dictionaries.
- Simpler syntax and more developer friendly overall.
- More customization options than ever before.

### Device Mode Transformations & Filtering
For the first time ever, developers can filter and transform their users’ events even before the events leave the mobile device. What’s more, these Filters & transformations can be applied dynamically (either through the Segment Dashboard, or Javascript uploaded to the workspace) and do not require any app updates.
### Device Mode Transformations and Filtering
For the first time ever, developers can filter and transform their users’ events even before the events leave the mobile device. What’s more, these Filters & transformations can be applied dynamically (either through the Segment Dashboard, or JavaScript uploaded to the workspace) and do not require any app updates.

Learn more about [Destination Filters](https://github.com/segmentio/DestinationFilters-swift) on Mobile, and [Edge Functions](https://github.com/segmentio/EdgeFn-Swift) on Mobile.
Learn more about [Destination Filters](https://github.com/segmentio/DestinationFilters-swift){:target="_blank"} on Mobile, and [Edge Functions](https://github.com/segmentio/EdgeFn-Swift){:target="_blank"} on Mobile.

## Getting started
> info "Multiple Instances"
Expand All @@ -50,7 +51,7 @@ To get started with the Analytics-Swift mobile library:
2. Search for **Apple** and click **Add source**.

2. Add the Analytics dependency to your application.
Add the Swift package, `git@github.com:segmentio/analytics-swift.git` as a dependency through either of these 2 options:
Add the Swift package, `git@github.com:segmentio/analytics-swift.git` as a dependency through either of these two options:
1. Your package.swift file
2. Xcode
1. Xcode 12: **File > Swift Packages > Add Package Dependency**
Expand Down Expand Up @@ -99,10 +100,10 @@ To get started with the Analytics-Swift mobile library:

These are the options you can apply to configure the client:

Option Name | Description
Option name | Description
----------- | ------------
`writeKey` *required* | This is your Segment write key.
`apiHost` | The default is set to `api.segment.io/v1`. <br> This sets a default API Host to which Segment sends event.
`apiHost` | The default is set to `api.segment.io/v1`. <br> This sets a default API Host to which Segment sends events.
`autoAddSegmentDestination` | The default is set to `true`. <br> This automatically adds the Segment Destination plugin. Set to `false` if you want to add plugins to the Segment Destination.
`cdnHost` | The default is set to `cdn-settings.segment.com/v1`. <br> This sets a default CDN Host from which Segment retrieves settings.
`defaultSettings`| The default is set to `{}`. <br> This is the settings object used as fallback in case of network failure.
Expand All @@ -111,7 +112,7 @@ These are the options you can apply to configure the client:
`trackApplicationLifecycleEvents`| The default is set to `true`. <br> This automatically tracks lifecycle events. Set to `false` to stop tracking lifecycle events.

> info "AppClip Tracking"
> If you are tracking App Clips using iOS or Swift libraries, you may encounter zeros in your device ID. Segment recommends that you set your own device ID in these instances to avoid this issue.
> If you are tracking App Clips using iOS or Swift libraries, you may encounter zeros in your device ID. We recommend that you set your own device ID in these instances to avoid this issue.

### Core tracking methods
Once you've installed the Analytics-Swift library, you can start collecting data through Segment's tracking methods:
Expand Down Expand Up @@ -162,7 +163,7 @@ Analytics-Swift is built with extensibility in mind. Use the tools list below to
If you proxy your events through the `apiHost` config option, you must forward the batched events to `https://api.segment.io/v1/b`. The `https://api.segment.io/v1/batch` endpoint is reserved for events arriving from server-side sending, and proxying to that endpoint for your mobile events may result in unexpected behavior.

> warning ""
> If you are using the Analytics iOS (Classic) SDK, you can find [the documentation here](/docs/connections/sources/catalog/libraries/mobile/ios). Many of the features available in the Analytics-Swift SDK are not available in the Analytics iOS (Classic) SDK.
> If you're using the Analytics iOS (Classic) SDK, you can find [the documentation here](/docs/connections/sources/catalog/libraries/mobile/ios). Many of the features available in the Analytics-Swift SDK aren't available in the Analytics iOS (Classic) SDK.

## Telemetry
The Analytics-Swift SDK collects telemetry data on configuration and usage by default. This includes basic information on SDK setup, plugins and event types used, and basic error details. Segment downsamples the data to minimize traffic and doesn't collect any personally identifiable information (PII) or event data.
Expand Down
2 changes: 1 addition & 1 deletion src/connections/spec/screen.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,6 @@ Segment has reserved some properties with semantic meanings and handles them in

Reserved properties that Segment has standardized:

| **Property** | **Type** | **Description** |
| Property | Type | Description |
|--------------|----------|-------------------------------------------------------------|
| `name` | String | Name of the screen. This is reserved for future use. |
20 changes: 10 additions & 10 deletions src/privacy/data-retention-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
title: Data Retention and Deletion Policy
---

Twilio Segment’s Data Retention and Deletion Policy provides clarity, consistency and compliance across all Segment services and brings Segment’s data retention policy in line with industry standards and regulations. By implementing and enforcing this policy, Segment aims to enhance data governance and ensure that Segment customers can manage their data accurately, efficiently and securely within clearly defined retention periods.
Twilio Segment’s Data Retention and Deletion Policy provides clarity, consistency, and compliance across all Segment services and brings Segment’s data retention policy in line with industry standards and regulations. By implementing and enforcing this policy, Segment aims to enhance data governance and ensure that Segment customers can manage their data accurately, efficiently and securely within clearly defined retention periods.

Segment enforces a strict data retention policy for all:

- **[Active customers](#active-customers):** A Business or Team Tier customer that has an active Segment contract with no outstanding invoices and no locked workspace, or a Free Tier workspace that has had event traffic or user activity in the past 30 days.
- **[Expired customers](#expired-customers):** A Business or Team Tier customer that hasn’t renewed their Segment contract and has their workspace downgraded to Free Tier.
- **[Contracted customers](#contracted-customers):** A Business Tier customer that elects to stop using add-on features like Unify, Unify+, Engage and/or Linked.
- **[Churned customers](#churned-customers):** A Business or Team Tier customer that has either explicitly terminated the contract or has unpaid invoices and has their workspace fully locked out.
- **[Active customers](#active-customers)**: A Business or Team Tier customer that has an active Segment contract with no outstanding invoices and no locked workspace, or a Free Tier workspace that has had event traffic or user activity in the past 30 days.
- **[Expired customers](#expired-customers)**: A Business or Team Tier customer that hasn’t renewed their Segment contract and has their workspace downgraded to Free Tier.
- **[Contracted customers](#contracted-customers)**: A Business Tier customer that elects to stop using add-on features like Unify, Unify+, Engage and/or Linked.
- **[Churned customers](#churned-customers)**: A Business or Team Tier customer that has either explicitly terminated the contract or has unpaid invoices and has their workspace fully locked out.
- **[Unused Free Tier workspace](#unused-free-tier-workspace)**: A workspace on the Free Tier that has not received any Segment event traffic or had any user activity in the last 30 days.

![A flowchart depicting the progression of active and no longer active customers.](images/data-retention-policy-flowchart.png)

## Effective Date
## Effective date
Segment’s enforcement of this data retention policy for active customers begins on:
- **April 15, 2025** for Object Store data
- **August 15, 2025** for Archive event and Profile events data stores
Expand Down Expand Up @@ -60,16 +60,16 @@ Select the default retention period for the workspace in this setting. This valu

With this data retention policy, all data beyond the retention period is unrecoverably deleted from all of Segment and impacts the following:

* [Data Replays](/docs/guides/what-is-replay/) will only be available for data within the retention period. Unify, Engage and Linked customers that replay data to recreate Unify Spaces or Profiles may encounter variations in the number of profiles, as well as in the identifiers, traits and properties associated with the profiles, depending on the data available.
* [Data Replays](/docs/guides/what-is-replay/) will only be available for data within the retention period. Unify, Engage and Linked customers that replay data to recreate Unify spaces or Profiles may encounter variations in the number of profiles, as well as in the identifiers, traits and properties associated with the profiles, depending on the data available.
* Backfill Data is only available for data within the retention period, when sources are connected to your warehouse.
* [Data residency](/docs/guides/regional-segment/) migrations across regions (US and EU) is only available for data within the retention period.
* Additional impacts to Object data:
* [Object API](/docs/connections/sources/catalog/libraries/server/object-api/#set) or [Bulk API](/docs/connections/sources/catalog/libraries/server/object-bulk-api/): Object data not updated within the retention period will be deleted. Any new data will treated as a new record and may not contain any historic properties. To prevent loss of data properties, Segment recommends that you always send full objects with all properties.
* [Object API](/docs/connections/sources/catalog/libraries/server/object-api/#set) or [Bulk API](/docs/connections/sources/catalog/libraries/server/object-bulk-api/): Object data not updated within the retention period will be deleted. Any new data will be treated as a new record and may not contain any historic properties. To prevent loss of data properties, we recommend that you always send full objects with all properties.
* Users and Accounts: Segment aggregates data from Identify and Group events into [Users and Account objects and tables for warehouse destinations](/docs/connections/storage/warehouses/schema/#warehouse-tables) object store records. Any object store records not updated in the last 180 days will be deleted from Segment's object stores. Any new data after object store records are deleted for inactivity is treated as a new object store record. If the source is connected to a Warehouse destination, object store entities are synced into [`<source>.users` and `<source>.accounts` tables](/docs/connections/storage/warehouses/schema/#warehouse-tables), and the existing record in the warehouse will be replaced with the new object store record, resulting in possible loss of attribute data. To prevent loss of attributes, Segment advises customers to migrate to using [Profiles Sync](/docs/unify/profiles-sync/overview/), always send complete Identify and Group calls, or back up your `<source>.users` and `<source>.accounts` tables.
* [Computed traits](/docs/unify/Traits/computed-traits/) is built using the available data within the retention period. Recreating these traits may result in different values based on the available data.
* [Profiles](/docs/unify/), [Engage](/docs/engage/) [Audiences](/docs/engage/audiences/) and [Journeys](/docs/engage/journeys/) that are built using Events will use available data within the retention period. Recreating these may result in different Profiles based on the available data.
* [Real Time Computation](/docs/engage/audiences/#refresh-real-time-audiences-and-traits) (Audiences, Computed Traits, Journeys): When backfilling with historical data, backfill will use available data within the retention period. Once a computation is live, events that are removed due to data retention will not cause Profiles to enter/exit audiences and will not cause computed trait value changes. However, if you edit the definition or disable then re-enable them, this will cause the computation to re-backfill, which will cause Profiles to enter/exit audiences and computed trait value to change.
* [Batch Computation](/docs/engage/audiences/#real-time-compute-compared-to-batch) (Audiences, Computed Traits): Batch computation always computes based on available data, events removed due to data retention will cause Profile to enter/exit an Audience or computed trait values to change.
* [Batch Computation](/docs/engage/audiences/#real-time-compute-compared-to-batch) (Audiences, Computed Traits): Batch computation always computes based on available data, events removed due to data retention will cause a profile to enter/exit an Audience or computed trait values to change.


### What data is not impacted?
Expand Down Expand Up @@ -97,7 +97,7 @@ Expired customers will have:

## Contracted customers

A contracted customer is a Business Tier customer that elects to stop using add-on features like Unify, Unify+, Engage and/or Linked.
A contracted customer is a Business Tier customer that elects to stop using add-on features like Unify, Unify+, Engage, and/or Linked.

Segment enforces a maximum data retention period of up to 90 days for all contracted customers, unless they explicitly request immediate deletion through a [support ticket](/docs/privacy/account-deletion/). All data beyond the retention period is deleted and unrecoverable as described below.

Expand Down
Loading