Skip to content
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

chore: add session recording section on flutter docs #8066

Merged
merged 1 commit into from
Mar 18, 2024
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
2 changes: 1 addition & 1 deletion contents/docs/integrate/_snippets/install-android.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ The best way to install the PostHog Android library is with a build system like

All you need to do is add the `posthog-android` module to your App's `build.gradle` or `build.gradle.kts`:

```gradle_kotlin
```gradle_kotlin file=app/build.gradle
dependencies {
implementation("com.posthog:posthog-android:3.+")
}
Expand Down
12 changes: 2 additions & 10 deletions contents/docs/integrate/_snippets/install-flutter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,11 @@ You'll also need to update the minimum Android SDK version to `21` in `android/a
// rest of your config
```

You may also need to ensure you're running on the latest Kotlin version. To do this, go to the [Kotlin website](https://kotlinlang.org/docs/releases.html#release-details) to find the latest version number. Then set this version number in the `build.gradle` in the root of your `android` directory (and not the `build.gradle` located in `android/app`):
Copy link
Member Author

Choose a reason for hiding this comment

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


```gradle_kotlin file=android/build.gradle
buildscript {
ext.kotlin_version = '1.9.22' // use the latest Kotlin version number here
// rest of config
```

#### iOS setup

For iOS, you'll need to have [Cocoapods](https://guides.cocoapods.org/using/getting-started.html) installed. Then add your PostHog configuration to the `Info.plist` file located in the `ios/Runner` directory:

```xml ios/Runner/Info.plist
```xml file=ios/Runner/Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
Expand All @@ -82,7 +74,7 @@ For iOS, you'll need to have [Cocoapods](https://guides.cocoapods.org/using/gett

Then you need to set the minimum platform version to iOS 13.0 in your Podfile:

```yaml ios/Podfile
```yaml file=ios/Podfile
platform :ios, '13.0'

# rest of your config
Expand Down
2 changes: 1 addition & 1 deletion contents/docs/integrate/_snippets/install-java.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Look up the latest version in [com.posthog.java](https://search.maven.org/artifa

All you need to do is add the `posthog` module to your `build.gradle`:

```gradle_kotlin
```gradle_kotlin file=build.gradle
dependencies {
implementation 'com.posthog.java:posthog:1.+'
}
Expand Down
8 changes: 6 additions & 2 deletions contents/docs/libraries/flutter/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ import FlutterInstall from '../../integrate/_snippets/install-flutter.mdx'

## Usage

To use this, add `posthog_flutter` as a [dependency in your pubspec.yaml file](https://pub.dev/packages/posthog_flutter/install).
Copy link
Member Author

Choose a reason for hiding this comment

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


### Example

```dart
Expand Down Expand Up @@ -118,6 +116,12 @@ import FlutterFeatureFlagsCode from '../../integrate/feature-flags-code/_snippet

<FlutterFeatureFlagsCode />

## Session replay

> **Note: ** Session replay is only supported on the [Flutter Web](https://flutter.dev/multi-platform/web) environment.

To set up [session replay](/docs/session-replay) in your project, all you need to do is install the Flutter SDK and enable "Record user sessions" in [your project settings](https://us.posthog.com/settings/project-replay).

## Issues

Please file any issues, bugs, or feature requests in our [GitHub repository](https://github.com/posthog/posthog-flutter/issues/new).
Expand Down
2 changes: 1 addition & 1 deletion contents/tutorials/android-ab-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Our basic set up is now complete. Build and run your app to test that it's worki
First, add the [PostHog Android SDK](/docs/libraries/android) as a dependency in your `Gradle Scripts/build.gradle.kts (Module: app)` file. You can find the latest version on our [GitHub](https://github.com/PostHog/posthog-android/blob/main/CHANGELOG.md). For this tutorial, we use version `3.1.7`.


```gradle_kotlin
```gradle_kotlin file=app/build.gradle
dependencies {
implementation("com.posthog:posthog-android:3.+")
//... other dependencies
Expand Down
2 changes: 1 addition & 1 deletion contents/tutorials/android-analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Our basic set up is now complete. Build and run your app to see it in action.
First, add the [PostHog Android SDK](/docs/libraries/android) as a dependency in your `Gradle Scripts/build.gradle.kts (Module: app)` file. You can find the latest version on our [GitHub](https://github.com/PostHog/posthog-android/). For this tutorial, we use version `3.1.7`.


```gradle_kotlin
```gradle_kotlin file=app/build.gradle
dependencies {
implementation("com.posthog:posthog-android:3.+")
//... other dependencies
Expand Down
2 changes: 1 addition & 1 deletion contents/tutorials/android-feature-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Our basic set up is now complete. Build and run your app to see it in action.
First, add the [PostHog Android SDK](/docs/libraries/android) as a dependency in your `Gradle Scripts/build.gradle.kts (Module: app)` file. You can find the latest version on our [GitHub](https://github.com/PostHog/posthog-android/blob/main/CHANGELOG.md). For this tutorial, we use version `3.1.7`.


```gradle_kotlin
```gradle_kotlin file=app/build.gradle
dependencies {
implementation("com.posthog:posthog-android:3.+")
//... other dependencies
Expand Down
4 changes: 2 additions & 2 deletions contents/tutorials/flutter-ab-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ You'll also need to update the minimum Android SDK version to `21` in `android/a

For iOS, you'll need to have [Cocoapods](https://guides.cocoapods.org/using/getting-started.html) installed. Then add your PostHog configuration with your project API key and instance address to the `Info.plist` file located in the `ios/Runner` directory:

```xml ios/Runner/Info.plist
```xml file=ios/Runner/Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
Expand All @@ -174,7 +174,7 @@ For iOS, you'll need to have [Cocoapods](https://guides.cocoapods.org/using/gett

Then you need to set the minimum platform version to iOS 13.0 in your Podfile:

```yaml ios/Podfile
```yaml file=ios/Podfile
platform :ios, '13.0'

# rest of your config
Expand Down
4 changes: 2 additions & 2 deletions contents/tutorials/flutter-analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ You'll also need to update the minimum Android SDK version to `21` in `android/a

For iOS, you'll need to have [Cocoapods](https://guides.cocoapods.org/using/getting-started.html) installed. Then add your PostHog configuration with your project API key and instance address to the `Info.plist` file located in the `ios/Runner` directory:

```xml ios/Runner/Info.plist
```xml file=ios/Runner/Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
Expand All @@ -288,7 +288,7 @@ For iOS, you'll need to have [Cocoapods](https://guides.cocoapods.org/using/gett

Then you need to set the minimum platform version to iOS 13.0 in your Podfile:

```yaml ios/Podfile
```yaml file=ios/Podfile
platform :ios, '13.0'

# rest of your config
Expand Down
4 changes: 2 additions & 2 deletions contents/tutorials/flutter-feature-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ You'll also need to update the minimum Android SDK version to `21` in `android/a

For iOS, you need to have [Cocoapods](https://guides.cocoapods.org/using/getting-started.html) installed. Then add your PostHog configuration to the `Info.plist` file located in the `ios/Runner` directory:

```xml ios/Runner/Info.plist
```xml file=ios/Runner/Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
Expand All @@ -168,7 +168,7 @@ For iOS, you need to have [Cocoapods](https://guides.cocoapods.org/using/getting

Then you need to set the minimum platform version to iOS 13.0 in your Podfile:

```yaml ios/Podfile
```yaml file=ios/Podfile
platform :ios, '13.0'

# rest of your config
Expand Down
Loading