From 15e2dc070eb8fcdb222231403030868ece1934ff Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com> Date: Wed, 6 Dec 2023 09:31:20 +0100 Subject: [PATCH] Fix app lifecycle code snippet for iOS (#64) --- README.md | 8 +++++++- example/android/app/build.gradle | 2 +- example/android/app/src/main/AndroidManifest.xml | 3 ++- example/ios/Runner/Info.plist | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9832020..c4d5d23 100644 --- a/README.md +++ b/README.md @@ -107,13 +107,19 @@ Remember that the application lifecycle events won't have any special context se YOUR_API_KEY_GOES_HERE com.posthog.posthog.POSTHOG_HOST https://app.posthog.com - com.posthog.posthog.TRACK_APPLICATION_LIFECYCLE_EVENTS + com.posthog.posthog.CAPTURE_APPLICATION_LIFECYCLE_EVENTS [...] ``` +For `debug` mode on iOS, you can use the following snippet: + +```dart +PostHog().debug(true); +``` + ### Web ```html diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 621e2d5..d0c30c0 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -36,7 +36,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.posthog.posthog_flutter_example" - minSdkVersion 19 + minSdkVersion 23 versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 89d805a..4b16ce4 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -35,9 +35,10 @@ on if you wish the library to take care of it for you. Remember that the application lifecycle events won't have any special context set for you by the time it is initialized. --> - + +