diff --git a/.github/workflows/create-release-pr.yml b/.github/workflows/create-release-pr.yml index 614dee71..46c954ee 100644 --- a/.github/workflows/create-release-pr.yml +++ b/.github/workflows/create-release-pr.yml @@ -104,7 +104,7 @@ jobs: # Get versions from target branch (not the release branch) CURRENT_VERSION=$(git show origin/${{ inputs.target_branch }}:pubspec.yaml | grep "^version:" | sed 's/version: //' | tr -d ' ') ANDROID_VERSION=$(git show origin/${{ inputs.target_branch }}:android/build.gradle | sed -n "s/^def oneSignalVersion = ['\"]\([^'\"]*\)['\"].*/\1/p") - IOS_VERSION=$(git show origin/${{ inputs.target_branch }}:ios/onesignal_flutter.podspec | sed -n "s/^[[:space:]]*onesignal_xcframework_version = ['\"]\([^'\"]*\)['\"].*/\1/p") + IOS_VERSION=$(git show origin/${{ inputs.target_branch }}:ios/onesignal_flutter/Package.swift | sed -n 's|.*OneSignal-XCFramework", exact: "\([^"]*\)".*|\1|p') echo "flutter_from=$CURRENT_VERSION" >> $GITHUB_OUTPUT echo "android_from=$ANDROID_VERSION" >> $GITHUB_OUTPUT @@ -148,13 +148,12 @@ jobs: exit 1 fi - # Update onesignal_flutter.podspec with new version - # macOS sed syntax - sed -i '' -E "s|^([[:space:]]*onesignal_xcframework_version = )['\"][^'\"]*['\"]|\\1'${VERSION}'|" ios/onesignal_flutter.podspec - echo "✓ Updated ios/onesignal_flutter.podspec with iOS SDK ${VERSION}" - # Update Package.swift with new version sed -i '' "s|\.package(url: \"https://github.com/OneSignal/OneSignal-XCFramework\", exact: \"[^\"]*\")|.package(url: \"https://github.com/OneSignal/OneSignal-XCFramework\", exact: \"${VERSION}\")|" ios/onesignal_flutter/Package.swift + if ! grep -q "OneSignal-XCFramework\", exact: \"${VERSION}\"" ios/onesignal_flutter/Package.swift; then + echo "::error::Failed to update iOS SDK version in Package.swift to ${VERSION}" + exit 1 + fi echo "✓ Updated ios/onesignal_flutter/Package.swift with iOS SDK ${VERSION}" # Only commit if there are changes @@ -175,10 +174,6 @@ jobs: sed -i '' "s/^version:.*/version: $NEW_VERSION/" pubspec.yaml echo "✓ Updated pubspec.yaml version to ${NEW_VERSION}" - # Update podspec version - sed -i '' "s|s\.version[[:space:]]*=[[:space:]]*'[^']*'|s.version = '${NEW_VERSION}'|" ios/onesignal_flutter.podspec - echo "✓ Updated ios/onesignal_flutter.podspec version to ${NEW_VERSION}" - # Update android build.gradle version sed -i '' "s|^version '[^']*'|version '${NEW_VERSION}'|" android/build.gradle echo "✓ Updated android/build.gradle version to ${NEW_VERSION}" diff --git a/examples/demo-no-location-pods/.env.example b/examples/demo-no-location-pods/.env.example deleted file mode 100644 index 2c398f31..00000000 --- a/examples/demo-no-location-pods/.env.example +++ /dev/null @@ -1 +0,0 @@ -ONESIGNAL_APP_ID=your-onesignal-app-id diff --git a/examples/demo-no-location-pods/.gitignore b/examples/demo-no-location-pods/.gitignore deleted file mode 100644 index b841075b..00000000 --- a/examples/demo-no-location-pods/.gitignore +++ /dev/null @@ -1,48 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.build/ -.buildlog/ -.history -.svn/ -.swiftpm/ -migrate_working_dir/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins-dependencies -.pub-cache/ -.pub/ -/build/ -/coverage/ - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Android Studio will place build artifacts here -/android/app/debug -/android/app/profile -/android/app/release - -# Environment -.env diff --git a/examples/demo-no-location-pods/.metadata b/examples/demo-no-location-pods/.metadata deleted file mode 100644 index 5d301a18..00000000 --- a/examples/demo-no-location-pods/.metadata +++ /dev/null @@ -1,33 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: "924134a44c189315be2148659913dda1671cbe99" - channel: "stable" - -project_type: app - -# Tracks metadata for the flutter migrate command -migration: - platforms: - - platform: root - create_revision: 924134a44c189315be2148659913dda1671cbe99 - base_revision: 924134a44c189315be2148659913dda1671cbe99 - - platform: android - create_revision: 924134a44c189315be2148659913dda1671cbe99 - base_revision: 924134a44c189315be2148659913dda1671cbe99 - - platform: ios - create_revision: 924134a44c189315be2148659913dda1671cbe99 - base_revision: 924134a44c189315be2148659913dda1671cbe99 - - # User provided section - - # List of Local paths (relative to this file) that should be - # ignored by the migrate tool. - # - # Files that are not part of the templates will be ignored by default. - unmanaged_files: - - 'lib/main.dart' - - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/examples/demo-no-location-pods/README.md b/examples/demo-no-location-pods/README.md deleted file mode 100644 index e1ccdab1..00000000 --- a/examples/demo-no-location-pods/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# OneSignal No-Location CocoaPods Demo - -Minimal Flutter app for verifying OneSignal push without linking the native -location module. This variant uses CocoaPods for iOS dependencies. - -## Why This Exists - -Some apps use OneSignal for push notifications and in-app messages but do not use -`OneSignal.Location`. Linking the native location module can still make app -stores detect location APIs. On iOS, that can lead to App Store Connect warnings -such as `ITMS-90683` and may require location usage descriptions that the app -does not actually need. - -This demo proves the no-location configuration works in a small app: - -- push initialization and notification permission requests still work -- the native location module is excluded from the build -- iOS does not need `NSLocationWhenInUseUsageDescription` or - `NSLocationAlwaysAndWhenInUseUsageDescription` -- Android does not request fine or coarse location permissions - -## Setup - -Copy `.env.example` to `.env` and set your OneSignal app ID: - -```sh -cp .env.example .env -``` - -Then edit `.env`: - -```sh -ONESIGNAL_APP_ID=your-onesignal-app-id -``` - -The `.env` file must exist before the first build because Flutter bundles it as -an app asset. - -## iOS - -Run with the helper script so Flutter resolves native dependencies with -`ONESIGNAL_DISABLE_LOCATION=true`: - -```sh -./run.sh -d ios -``` - -The helper script installs the CocoaPods dependencies before launching the app. -The app does not include `NSLocationWhenInUseUsageDescription` or -`NSLocationAlwaysAndWhenInUseUsageDescription`. - -The iOS project includes `OneSignalNotificationServiceExtension` and -`OneSignalWidgetExtension` targets like the main demo. On iOS 16.2 or newer, use -the app's **Start Live Activity** button to launch the sample widget. - -Both extension targets declare `OneSignalXCFramework/OneSignal` and -`OneSignalXCFramework/OneSignalInAppMessages`, matching what the Flutter plugin -resolves when location is disabled. CocoaPods only builds one -`OneSignalXCFramework` when every target requests the same subspec set; -mismatched sets produce duplicate framework outputs and the build error reported -in [GitHub issue #1173](https://github.com/OneSignal/OneSignal-Flutter-SDK/issues/1173). - -To test the bundled notification action icons, follow -[Testing iOS Action Button Icons](../ios-action-button-icons.md). - -## Android - -Run with the same helper script: - -```sh -./run.sh -d android -``` - -The Android manifest does not request fine or coarse location permissions. diff --git a/examples/demo-no-location-pods/analysis_options.yaml b/examples/demo-no-location-pods/analysis_options.yaml deleted file mode 100644 index 0d87f43e..00000000 --- a/examples/demo-no-location-pods/analysis_options.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -analyzer: - exclude: - - build/** - - android/** - - ios/** -include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at https://dart.dev/lints. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/examples/demo-no-location-pods/android/.gitignore b/examples/demo-no-location-pods/android/.gitignore deleted file mode 100644 index be3943c9..00000000 --- a/examples/demo-no-location-pods/android/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java -.cxx/ - -# Remember to never publicly share your keystore. -# See https://flutter.dev/to/reference-keystore -key.properties -**/*.keystore -**/*.jks diff --git a/examples/demo-no-location-pods/android/app/build.gradle.kts b/examples/demo-no-location-pods/android/app/build.gradle.kts deleted file mode 100644 index e8600850..00000000 --- a/examples/demo-no-location-pods/android/app/build.gradle.kts +++ /dev/null @@ -1,44 +0,0 @@ -plugins { - id("com.android.application") - // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. - id("dev.flutter.flutter-gradle-plugin") -} - -android { - namespace = "com.onesignal.sdkdemo" - compileSdk = flutter.compileSdkVersion - ndkVersion = flutter.ndkVersion - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - - defaultConfig { - applicationId = "com.onesignal.sdkdemo" - // You can update the following values to match your application needs. - // For more information, see: https://flutter.dev/to/review-gradle-config. - minSdk = flutter.minSdkVersion - targetSdk = flutter.targetSdkVersion - versionCode = flutter.versionCode - versionName = flutter.versionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig = signingConfigs.getByName("debug") - } - } -} - -kotlin { - compilerOptions { - jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17 - } -} - -flutter { - source = "../.." -} diff --git a/examples/demo-no-location-pods/android/app/src/debug/AndroidManifest.xml b/examples/demo-no-location-pods/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 399f6981..00000000 --- a/examples/demo-no-location-pods/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/demo-no-location-pods/android/app/src/main/AndroidManifest.xml b/examples/demo-no-location-pods/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 042268c3..00000000 --- a/examples/demo-no-location-pods/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/demo-no-location-pods/android/app/src/main/kotlin/com/onesignal/sdkdemo/MainActivity.kt b/examples/demo-no-location-pods/android/app/src/main/kotlin/com/onesignal/sdkdemo/MainActivity.kt deleted file mode 100644 index 86870d73..00000000 --- a/examples/demo-no-location-pods/android/app/src/main/kotlin/com/onesignal/sdkdemo/MainActivity.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.onesignal.sdkdemo - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity : FlutterActivity() diff --git a/examples/demo-no-location-pods/android/app/src/main/res/drawable-v21/launch_background.xml b/examples/demo-no-location-pods/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index f74085f3..00000000 --- a/examples/demo-no-location-pods/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/examples/demo-no-location-pods/android/app/src/main/res/drawable/launch_background.xml b/examples/demo-no-location-pods/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f8..00000000 --- a/examples/demo-no-location-pods/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/examples/demo-no-location-pods/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/demo-no-location-pods/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b..00000000 Binary files a/examples/demo-no-location-pods/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/examples/demo-no-location-pods/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/demo-no-location-pods/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79..00000000 Binary files a/examples/demo-no-location-pods/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/examples/demo-no-location-pods/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/demo-no-location-pods/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d43914..00000000 Binary files a/examples/demo-no-location-pods/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/demo-no-location-pods/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/demo-no-location-pods/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d3..00000000 Binary files a/examples/demo-no-location-pods/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/demo-no-location-pods/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/demo-no-location-pods/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372ee..00000000 Binary files a/examples/demo-no-location-pods/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/demo-no-location-pods/android/app/src/main/res/values-night/styles.xml b/examples/demo-no-location-pods/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 06952be7..00000000 --- a/examples/demo-no-location-pods/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/examples/demo-no-location-pods/android/app/src/main/res/values/styles.xml b/examples/demo-no-location-pods/android/app/src/main/res/values/styles.xml deleted file mode 100644 index cb1ef880..00000000 --- a/examples/demo-no-location-pods/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/examples/demo-no-location-pods/android/app/src/profile/AndroidManifest.xml b/examples/demo-no-location-pods/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 399f6981..00000000 --- a/examples/demo-no-location-pods/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/demo-no-location-pods/android/build.gradle.kts b/examples/demo-no-location-pods/android/build.gradle.kts deleted file mode 100644 index dbee657b..00000000 --- a/examples/demo-no-location-pods/android/build.gradle.kts +++ /dev/null @@ -1,24 +0,0 @@ -allprojects { - repositories { - google() - mavenCentral() - } -} - -val newBuildDir: Directory = - rootProject.layout.buildDirectory - .dir("../../build") - .get() -rootProject.layout.buildDirectory.value(newBuildDir) - -subprojects { - val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) - project.layout.buildDirectory.value(newSubprojectBuildDir) -} -subprojects { - project.evaluationDependsOn(":app") -} - -tasks.register("clean") { - delete(rootProject.layout.buildDirectory) -} diff --git a/examples/demo-no-location-pods/android/gradle.properties b/examples/demo-no-location-pods/android/gradle.properties deleted file mode 100644 index e96108cf..00000000 --- a/examples/demo-no-location-pods/android/gradle.properties +++ /dev/null @@ -1,6 +0,0 @@ -org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError -android.useAndroidX=true -# This newDsl flag was added by the Flutter template -android.newDsl=false -# This builtInKotlin flag was added by the Flutter template -android.builtInKotlin=false diff --git a/examples/demo-no-location-pods/android/gradle/wrapper/gradle-wrapper.properties b/examples/demo-no-location-pods/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 2d428bfb..00000000 --- a/examples/demo-no-location-pods/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-all.zip diff --git a/examples/demo-no-location-pods/android/settings.gradle.kts b/examples/demo-no-location-pods/android/settings.gradle.kts deleted file mode 100644 index c21f0c5b..00000000 --- a/examples/demo-no-location-pods/android/settings.gradle.kts +++ /dev/null @@ -1,26 +0,0 @@ -pluginManagement { - val flutterSdkPath = - run { - val properties = java.util.Properties() - file("local.properties").inputStream().use { properties.load(it) } - val flutterSdkPath = properties.getProperty("flutter.sdk") - require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } - flutterSdkPath - } - - includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") - - repositories { - google() - mavenCentral() - gradlePluginPortal() - } -} - -plugins { - id("dev.flutter.flutter-plugin-loader") version "1.0.0" - id("com.android.application") version "9.0.1" apply false - id("org.jetbrains.kotlin.android") version "2.3.20" apply false -} - -include(":app") diff --git a/examples/demo-no-location-pods/ios/.gitignore b/examples/demo-no-location-pods/ios/.gitignore deleted file mode 100644 index 7a7f9873..00000000 --- a/examples/demo-no-location-pods/ios/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -**/dgph -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/ephemeral/ -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/examples/demo-no-location-pods/ios/Flutter/AppFrameworkInfo.plist b/examples/demo-no-location-pods/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 391a902b..00000000 --- a/examples/demo-no-location-pods/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - - diff --git a/examples/demo-no-location-pods/ios/Flutter/Debug.xcconfig b/examples/demo-no-location-pods/ios/Flutter/Debug.xcconfig deleted file mode 100644 index ec97fc6f..00000000 --- a/examples/demo-no-location-pods/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" -#include "Generated.xcconfig" diff --git a/examples/demo-no-location-pods/ios/Flutter/Release.xcconfig b/examples/demo-no-location-pods/ios/Flutter/Release.xcconfig deleted file mode 100644 index c4855bfe..00000000 --- a/examples/demo-no-location-pods/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" -#include "Generated.xcconfig" diff --git a/examples/demo-no-location-pods/ios/OneSignalNotificationServiceExtension/Info.plist b/examples/demo-no-location-pods/ios/OneSignalNotificationServiceExtension/Info.plist deleted file mode 100644 index 57421ebf..00000000 --- a/examples/demo-no-location-pods/ios/OneSignalNotificationServiceExtension/Info.plist +++ /dev/null @@ -1,13 +0,0 @@ - - - - - NSExtension - - NSExtensionPointIdentifier - com.apple.usernotifications.service - NSExtensionPrincipalClass - $(PRODUCT_MODULE_NAME).NotificationService - - - diff --git a/examples/demo-no-location-pods/ios/OneSignalNotificationServiceExtension/NotificationService.swift b/examples/demo-no-location-pods/ios/OneSignalNotificationServiceExtension/NotificationService.swift deleted file mode 100644 index d39912d3..00000000 --- a/examples/demo-no-location-pods/ios/OneSignalNotificationServiceExtension/NotificationService.swift +++ /dev/null @@ -1,25 +0,0 @@ -import UserNotifications -import OneSignalExtension - -class NotificationService: UNNotificationServiceExtension { - var contentHandler: ((UNNotificationContent) -> Void)? - var receivedRequest: UNNotificationRequest! - var bestAttemptContent: UNMutableNotificationContent? - - override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) { - self.receivedRequest = request - self.contentHandler = contentHandler - self.bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent) - - if let bestAttemptContent = bestAttemptContent { - OneSignalExtension.didReceiveNotificationExtensionRequest(self.receivedRequest, with: bestAttemptContent, withContentHandler: self.contentHandler) - } - } - - override func serviceExtensionTimeWillExpire() { - if let contentHandler = contentHandler, let bestAttemptContent = bestAttemptContent { - OneSignalExtension.serviceExtensionTimeWillExpireRequest(self.receivedRequest, with: self.bestAttemptContent) - contentHandler(bestAttemptContent) - } - } -} diff --git a/examples/demo-no-location-pods/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements b/examples/demo-no-location-pods/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements deleted file mode 100644 index 68ed0e50..00000000 --- a/examples/demo-no-location-pods/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements +++ /dev/null @@ -1,10 +0,0 @@ - - - - - com.apple.security.application-groups - - group.com.onesignal.sdkdemo.onesignal - - - diff --git a/examples/demo-no-location-pods/ios/OneSignalWidget/Info.plist b/examples/demo-no-location-pods/ios/OneSignalWidget/Info.plist deleted file mode 100644 index 78d358a5..00000000 --- a/examples/demo-no-location-pods/ios/OneSignalWidget/Info.plist +++ /dev/null @@ -1,29 +0,0 @@ - - - - - CFBundleDisplayName - OneSignalWidgetExtension - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - $(MARKETING_VERSION) - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSSupportsLiveActivities - - NSExtension - - NSExtensionPointIdentifier - com.apple.widgetkit-extension - - - diff --git a/examples/demo-no-location-pods/ios/OneSignalWidget/OneSignalWidgetBundle.swift b/examples/demo-no-location-pods/ios/OneSignalWidget/OneSignalWidgetBundle.swift deleted file mode 100644 index eef16a52..00000000 --- a/examples/demo-no-location-pods/ios/OneSignalWidget/OneSignalWidgetBundle.swift +++ /dev/null @@ -1,9 +0,0 @@ -import WidgetKit -import SwiftUI - -@main -struct OneSignalWidgetBundle: WidgetBundle { - var body: some Widget { - OneSignalWidgetLiveActivity() - } -} diff --git a/examples/demo-no-location-pods/ios/OneSignalWidget/OneSignalWidgetLiveActivity.swift b/examples/demo-no-location-pods/ios/OneSignalWidget/OneSignalWidgetLiveActivity.swift deleted file mode 100644 index ad4b9cd2..00000000 --- a/examples/demo-no-location-pods/ios/OneSignalWidget/OneSignalWidgetLiveActivity.swift +++ /dev/null @@ -1,140 +0,0 @@ -import ActivityKit -import WidgetKit -import SwiftUI -import OneSignalLiveActivities - -@available(iOS 16.2, *) -struct OneSignalWidgetLiveActivity: Widget { - private func statusIcon(for status: String) -> String { - switch status { - case "on_the_way": return "box.truck.fill" - case "delivered": return "checkmark.circle.fill" - default: return "bag.fill" - } - } - - private func statusColor(for status: String) -> Color { - switch status { - case "on_the_way": return .blue - case "delivered": return .green - default: return .orange - } - } - - private func statusLabel(for status: String) -> String { - switch status { - case "on_the_way": return "On the Way" - case "delivered": return "Delivered" - default: return "Preparing" - } - } - - var body: some WidgetConfiguration { - ActivityConfiguration(for: DefaultLiveActivityAttributes.self) { context in - let orderNumber = context.attributes.data["orderNumber"]?.asString() ?? "Order" - let status = context.state.data["status"]?.asString() ?? "preparing" - let message = context.state.data["message"]?.asString() ?? "Your order is being prepared" - let eta = context.state.data["estimatedTime"]?.asString() ?? "" - - VStack(spacing: 10) { - HStack { - Text(orderNumber) - .font(.caption) - .foregroundColor(.gray) - Spacer() - if !eta.isEmpty { - Text(eta) - .font(.caption) - .foregroundColor(.white.opacity(0.7)) - } - } - - HStack(spacing: 12) { - Image(systemName: statusIcon(for: status)) - .font(.title2) - .foregroundColor(statusColor(for: status)) - - VStack(alignment: .leading, spacing: 2) { - Text(statusLabel(for: status)) - .font(.headline) - .foregroundColor(.white) - Text(message) - .font(.subheadline) - .foregroundColor(.white.opacity(0.8)) - .lineLimit(1) - } - Spacer() - } - - DeliveryProgressBar(status: status) - } - .padding() - .activityBackgroundTint(Color(red: 0.11, green: 0.13, blue: 0.19)) - .activitySystemActionForegroundColor(.white) - } dynamicIsland: { context in - let status = context.state.data["status"]?.asString() ?? "preparing" - let message = context.state.data["message"]?.asString() ?? "Preparing" - let eta = context.state.data["estimatedTime"]?.asString() ?? "" - - return DynamicIsland { - DynamicIslandExpandedRegion(.leading) { - Image(systemName: statusIcon(for: status)) - .font(.title2) - .foregroundColor(statusColor(for: status)) - } - DynamicIslandExpandedRegion(.center) { - Text(statusLabel(for: status)) - .font(.headline) - } - DynamicIslandExpandedRegion(.trailing) { - if !eta.isEmpty { - Text(eta) - .font(.caption) - .foregroundColor(.secondary) - } - } - DynamicIslandExpandedRegion(.bottom) { - Text(message) - .font(.caption) - .foregroundColor(.secondary) - } - } compactLeading: { - Image(systemName: statusIcon(for: status)) - .foregroundColor(statusColor(for: status)) - } compactTrailing: { - Text(statusLabel(for: status)) - .font(.caption) - } minimal: { - Image(systemName: statusIcon(for: status)) - .foregroundColor(statusColor(for: status)) - } - } - } -} - -@available(iOS 16.2, *) -struct DeliveryProgressBar: View { - let status: String - - private var progress: CGFloat { - switch status { - case "on_the_way": return 0.6 - case "delivered": return 1.0 - default: return 0.25 - } - } - - var body: some View { - GeometryReader { geo in - ZStack(alignment: .leading) { - RoundedRectangle(cornerRadius: 3) - .fill(Color.white.opacity(0.2)) - .frame(height: 6) - RoundedRectangle(cornerRadius: 3) - .fill(progress >= 1.0 ? Color.green : Color.blue) - .frame(width: geo.size.width * progress, height: 6) - } - } - .frame(height: 6) - } -} diff --git a/examples/demo-no-location-pods/ios/Podfile b/examples/demo-no-location-pods/ios/Podfile deleted file mode 100644 index ed3711bf..00000000 --- a/examples/demo-no-location-pods/ios/Podfile +++ /dev/null @@ -1,51 +0,0 @@ -platform :ios, '15.0' - -# CocoaPods analytics sends network stats synchronously affecting flutter build latency. -ENV['COCOAPODS_DISABLE_STATS'] = 'true' - -project 'Runner', { - 'Debug' => :debug, - 'Profile' => :release, - 'Release' => :release, -} - -def flutter_root - generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) - unless File.exist?(generated_xcode_build_settings_path) - raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" - end - - File.foreach(generated_xcode_build_settings_path) do |line| - matches = line.match(/FLUTTER_ROOT\=(.*)/) - return matches[1].strip if matches - end - raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" -end - -require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) - -flutter_ios_podfile_setup - -target 'Runner' do - use_frameworks! - - flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) -end - -target 'OneSignalNotificationServiceExtension' do - use_frameworks! - pod 'OneSignalXCFramework/OneSignal', '>= 5.0.0', '< 6.0' - pod 'OneSignalXCFramework/OneSignalInAppMessages', '>= 5.0.0', '< 6.0' -end - -target 'OneSignalWidgetExtension' do - use_frameworks! - pod 'OneSignalXCFramework/OneSignal', '>= 5.0.0', '< 6.0' - pod 'OneSignalXCFramework/OneSignalInAppMessages', '>= 5.0.0', '< 6.0' -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_ios_build_settings(target) - end -end diff --git a/examples/demo-no-location-pods/ios/Podfile.lock b/examples/demo-no-location-pods/ios/Podfile.lock deleted file mode 100644 index 20ec4769..00000000 --- a/examples/demo-no-location-pods/ios/Podfile.lock +++ /dev/null @@ -1,69 +0,0 @@ -PODS: - - Flutter (1.0.0) - - onesignal_flutter (5.8.0): - - Flutter - - OneSignalXCFramework/OneSignal (= 5.8.1) - - OneSignalXCFramework/OneSignalInAppMessages (= 5.8.1) - - OneSignalXCFramework/OneSignal (5.8.1): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalExtension - - OneSignalXCFramework/OneSignalLiveActivities - - OneSignalXCFramework/OneSignalNotifications - - OneSignalXCFramework/OneSignalOSCore - - OneSignalXCFramework/OneSignalOutcomes - - OneSignalXCFramework/OneSignalUser - - OneSignalXCFramework/OneSignalCore (5.8.1) - - OneSignalXCFramework/OneSignalExtension (5.8.1): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalOSCore - - OneSignalXCFramework/OneSignalOutcomes - - OneSignalXCFramework/OneSignalInAppMessages (5.8.1): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalNotifications - - OneSignalXCFramework/OneSignalOSCore - - OneSignalXCFramework/OneSignalOutcomes - - OneSignalXCFramework/OneSignalUser - - OneSignalXCFramework/OneSignalLiveActivities (5.8.1): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalOSCore - - OneSignalXCFramework/OneSignalUser - - OneSignalXCFramework/OneSignalNotifications (5.8.1): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalExtension - - OneSignalXCFramework/OneSignalOSCore - - OneSignalXCFramework/OneSignalOutcomes - - OneSignalXCFramework/OneSignalOSCore (5.8.1): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalOutcomes (5.8.1): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalOSCore - - OneSignalXCFramework/OneSignalUser (5.8.1): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalNotifications - - OneSignalXCFramework/OneSignalOSCore - - OneSignalXCFramework/OneSignalOutcomes - -DEPENDENCIES: - - Flutter (from `Flutter`) - - onesignal_flutter (from `.symlinks/plugins/onesignal_flutter/ios`) - - OneSignalXCFramework/OneSignal (< 6.0, >= 5.0.0) - - OneSignalXCFramework/OneSignalInAppMessages (< 6.0, >= 5.0.0) - -SPEC REPOS: - trunk: - - OneSignalXCFramework - -EXTERNAL SOURCES: - Flutter: - :path: Flutter - onesignal_flutter: - :path: ".symlinks/plugins/onesignal_flutter/ios" - -SPEC CHECKSUMS: - Flutter: 71a624a5bc0c04062bf19101d501e466baf2fb47 - onesignal_flutter: d6ce1684d2a5273a1868816e84d55332cbbd0bf3 - OneSignalXCFramework: 51f314691a5326cb1440d49d0ec32213997be4ca - -PODFILE CHECKSUM: 53e0479e16f5d91d7b3ce67f14944b1cf482f909 - -COCOAPODS: 1.17.0 diff --git a/examples/demo-no-location-pods/ios/Runner.xcodeproj/project.pbxproj b/examples/demo-no-location-pods/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 952d5386..00000000 --- a/examples/demo-no-location-pods/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1040 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 192FBDE3E5FC9B1E6BB19FBC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 49248215A15C404DA16328DF /* Foundation.framework */; }; - 22345C06CA4949C3C8AA069B /* template-share-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 2E9555FD21E8DFCB65A890A7 /* template-share-icon.png */; }; - 2DFB8DA296AF02A4B363AA3B /* OneSignalWidgetBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6539668DF6C89BFDC76FCB84 /* OneSignalWidgetBundle.swift */; }; - 2F288C153791A53B901B7A25 /* Pods_OneSignalWidgetExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E6B16C9B4C335CDE40E0449F /* Pods_OneSignalWidgetExtension.framework */; }; - 3B1B085652E2F6FCF2E0453E /* OneSignalWidgetExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = FECE8682DCDD3961E46E889A /* OneSignalWidgetExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 48EB723A5B83580AF84A2299 /* OneSignalNotificationServiceExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = E3401F727234AB87ECBFAE5C /* OneSignalNotificationServiceExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - 50A35513A30BBE84344DF9E1 /* OneSignalWidgetLiveActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 283263A4CCECBE70BE46C806 /* OneSignalWidgetLiveActivity.swift */; }; - 5EE48FCB903022F3E60E22DD /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 579EE555FAC49FE764750AB8 /* SwiftUI.framework */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 7884E8682EC3CC0700C636F2 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */; }; - 8E8A1FA052CF751D7EF03EA3 /* template-bookmark-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 702B7644E4D762408F8A9BE5 /* template-bookmark-icon.png */; }; - 920F75D10B5ACDBBCEBCA71D /* Pods_OneSignalNotificationServiceExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E0685C57CD35C510FF6DA5C1 /* Pods_OneSignalNotificationServiceExtension.framework */; }; - 96003FFCA81AF7F0D02FF192 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63245B01345B8BE3A1902785 /* WidgetKit.framework */; }; - 9709DAE0290094C4ED9C37AF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 49248215A15C404DA16328DF /* Foundation.framework */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - C0241F15C546B89B6A35090F /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = A47701A9BFD5F78B37CB0E87 /* NotificationService.swift */; }; - E395919D263D3A7EE996872F /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B5FC8CF448F5485AF9CA242F /* Pods_Runner.framework */; }; - EC3E995823EDCDFAD7622F57 /* template-bookmark-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 702B7644E4D762408F8A9BE5 /* template-bookmark-icon.png */; }; - F656A2DEE91710B22FFFDDEA /* template-share-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 2E9555FD21E8DFCB65A890A7 /* template-share-icon.png */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 1E7C49B39CBC46EC70FE1E06 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 97C146E61CF9000F007C117D /* Project object */; - proxyType = 1; - remoteGlobalIDString = BB40F0DEB7972F762F263805; - remoteInfo = OneSignalWidgetExtension; - }; - 96CD0CC6756A005F84F6ADCE /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 97C146E61CF9000F007C117D /* Project object */; - proxyType = 1; - remoteGlobalIDString = E2CFC6DE18326F4E2BF3E230; - remoteInfo = OneSignalNotificationServiceExtension; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 1CBABA7864747CE5602247B4 /* Embed Foundation Extensions */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 13; - files = ( - 48EB723A5B83580AF84A2299 /* OneSignalNotificationServiceExtension.appex in Embed Foundation Extensions */, - 3B1B085652E2F6FCF2E0453E /* OneSignalWidgetExtension.appex in Embed Foundation Extensions */, - ); - name = "Embed Foundation Extensions"; - runOnlyForDeploymentPostprocessing = 0; - }; - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 283263A4CCECBE70BE46C806 /* OneSignalWidgetLiveActivity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = OneSignalWidgetLiveActivity.swift; sourceTree = ""; }; - 2A5D002B7EAC6DFD6AACEFF6 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 2E9555FD21E8DFCB65A890A7 /* template-share-icon.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; path = "template-share-icon.png"; sourceTree = ""; }; - 35CC497FDF78C6584F9271C3 /* Pods-OneSignalNotificationServiceExtension.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OneSignalNotificationServiceExtension.profile.xcconfig"; path = "Target Support Files/Pods-OneSignalNotificationServiceExtension/Pods-OneSignalNotificationServiceExtension.profile.xcconfig"; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 40066B592891CD9D37812A6C /* OneSignalNotificationServiceExtension.entitlements */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.entitlements; path = OneSignalNotificationServiceExtension.entitlements; sourceTree = ""; }; - 49248215A15C404DA16328DF /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 4DC3401F88F1161CD1E96525 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; - 579EE555FAC49FE764750AB8 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; }; - 63245B01345B8BE3A1902785 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; }; - 6539668DF6C89BFDC76FCB84 /* OneSignalWidgetBundle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = OneSignalWidgetBundle.swift; sourceTree = ""; }; - 702B7644E4D762408F8A9BE5 /* template-bookmark-icon.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; path = "template-bookmark-icon.png"; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - A396C20E431AF84E316A6591 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - A47701A9BFD5F78B37CB0E87 /* NotificationService.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = NotificationService.swift; sourceTree = ""; }; - B40000000000000000000001 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; - B5FC8CF448F5485AF9CA242F /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - B8B80A19197CCF54C1F4876D /* Pods-OneSignalWidgetExtension.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OneSignalWidgetExtension.profile.xcconfig"; path = "Target Support Files/Pods-OneSignalWidgetExtension/Pods-OneSignalWidgetExtension.profile.xcconfig"; sourceTree = ""; }; - C66A7BF31491C89D995E5767 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; - C8845B8D79E4BB1D1F728DEE /* Pods-OneSignalWidgetExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OneSignalWidgetExtension.release.xcconfig"; path = "Target Support Files/Pods-OneSignalWidgetExtension/Pods-OneSignalWidgetExtension.release.xcconfig"; sourceTree = ""; }; - D44D983903606604AF6077BF /* Pods-OneSignalNotificationServiceExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OneSignalNotificationServiceExtension.release.xcconfig"; path = "Target Support Files/Pods-OneSignalNotificationServiceExtension/Pods-OneSignalNotificationServiceExtension.release.xcconfig"; sourceTree = ""; }; - D867C76CA79CEEE7CE1290AD /* Pods-OneSignalNotificationServiceExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OneSignalNotificationServiceExtension.debug.xcconfig"; path = "Target Support Files/Pods-OneSignalNotificationServiceExtension/Pods-OneSignalNotificationServiceExtension.debug.xcconfig"; sourceTree = ""; }; - DC06F836228D05C2FB213A82 /* Pods-OneSignalWidgetExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OneSignalWidgetExtension.debug.xcconfig"; path = "Target Support Files/Pods-OneSignalWidgetExtension/Pods-OneSignalWidgetExtension.debug.xcconfig"; sourceTree = ""; }; - E0685C57CD35C510FF6DA5C1 /* Pods_OneSignalNotificationServiceExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_OneSignalNotificationServiceExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E3401F727234AB87ECBFAE5C /* OneSignalNotificationServiceExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = OneSignalNotificationServiceExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; - E6B16C9B4C335CDE40E0449F /* Pods_OneSignalWidgetExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_OneSignalWidgetExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - EAC96A5F394589624DBDE652 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - FECE8682DCDD3961E46E889A /* OneSignalWidgetExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = OneSignalWidgetExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 15A2FF9CCA60D2D8696B7A39 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 192FBDE3E5FC9B1E6BB19FBC /* Foundation.framework in Frameworks */, - 96003FFCA81AF7F0D02FF192 /* WidgetKit.framework in Frameworks */, - 5EE48FCB903022F3E60E22DD /* SwiftUI.framework in Frameworks */, - 2F288C153791A53B901B7A25 /* Pods_OneSignalWidgetExtension.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - E395919D263D3A7EE996872F /* Pods_Runner.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B598A574F40EBF131B15B859 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 9709DAE0290094C4ED9C37AF /* Foundation.framework in Frameworks */, - 920F75D10B5ACDBBCEBCA71D /* Pods_OneSignalNotificationServiceExtension.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 26F7996664105136C8CF2AC4 /* Pods */ = { - isa = PBXGroup; - children = ( - 4DC3401F88F1161CD1E96525 /* Pods-Runner.debug.xcconfig */, - EAC96A5F394589624DBDE652 /* Pods-Runner.release.xcconfig */, - C66A7BF31491C89D995E5767 /* Pods-Runner.profile.xcconfig */, - D44D983903606604AF6077BF /* Pods-OneSignalNotificationServiceExtension.release.xcconfig */, - D867C76CA79CEEE7CE1290AD /* Pods-OneSignalNotificationServiceExtension.debug.xcconfig */, - 35CC497FDF78C6584F9271C3 /* Pods-OneSignalNotificationServiceExtension.profile.xcconfig */, - C8845B8D79E4BB1D1F728DEE /* Pods-OneSignalWidgetExtension.release.xcconfig */, - DC06F836228D05C2FB213A82 /* Pods-OneSignalWidgetExtension.debug.xcconfig */, - B8B80A19197CCF54C1F4876D /* Pods-OneSignalWidgetExtension.profile.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; - 567D098F950FFE32E8BA7A52 /* OneSignalWidget */ = { - isa = PBXGroup; - children = ( - 283263A4CCECBE70BE46C806 /* OneSignalWidgetLiveActivity.swift */, - 6539668DF6C89BFDC76FCB84 /* OneSignalWidgetBundle.swift */, - A396C20E431AF84E316A6591 /* Info.plist */, - ); - name = OneSignalWidget; - path = OneSignalWidget; - sourceTree = ""; - }; - 76DAEEBD3DA799DF41C6D639 /* iOS */ = { - isa = PBXGroup; - children = ( - 49248215A15C404DA16328DF /* Foundation.framework */, - ); - name = iOS; - sourceTree = ""; - }; - 84F4C401F5B02DAF3355BFC5 /* OneSignalNotificationServiceExtension */ = { - isa = PBXGroup; - children = ( - A47701A9BFD5F78B37CB0E87 /* NotificationService.swift */, - 2A5D002B7EAC6DFD6AACEFF6 /* Info.plist */, - 40066B592891CD9D37812A6C /* OneSignalNotificationServiceExtension.entitlements */, - ); - name = OneSignalNotificationServiceExtension; - path = OneSignalNotificationServiceExtension; - sourceTree = ""; - }; - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - 26F7996664105136C8CF2AC4 /* Pods */, - AFF97DB41F0B352C557F5493 /* Frameworks */, - 84F4C401F5B02DAF3355BFC5 /* OneSignalNotificationServiceExtension */, - 567D098F950FFE32E8BA7A52 /* OneSignalWidget */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - E3401F727234AB87ECBFAE5C /* OneSignalNotificationServiceExtension.appex */, - FECE8682DCDD3961E46E889A /* OneSignalWidgetExtension.appex */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - B40000000000000000000001 /* Runner.entitlements */, - 702B7644E4D762408F8A9BE5 /* template-bookmark-icon.png */, - 2E9555FD21E8DFCB65A890A7 /* template-share-icon.png */, - ); - path = Runner; - sourceTree = ""; - }; - AFF97DB41F0B352C557F5493 /* Frameworks */ = { - isa = PBXGroup; - children = ( - B5FC8CF448F5485AF9CA242F /* Pods_Runner.framework */, - 76DAEEBD3DA799DF41C6D639 /* iOS */, - E0685C57CD35C510FF6DA5C1 /* Pods_OneSignalNotificationServiceExtension.framework */, - 63245B01345B8BE3A1902785 /* WidgetKit.framework */, - 579EE555FAC49FE764750AB8 /* SwiftUI.framework */, - E6B16C9B4C335CDE40E0449F /* Pods_OneSignalWidgetExtension.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 212833E821E654F6BE137F47 /* [CP] Check Pods Manifest.lock */, - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 1CBABA7864747CE5602247B4 /* Embed Foundation Extensions */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 4E699A5A8ABA2B75E1430F38 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 96E8C77E4A55C1E1A5A5A46A /* PBXTargetDependency */, - AB57CFCF2AE7EB9A539E0016 /* PBXTargetDependency */, - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; - BB40F0DEB7972F762F263805 /* OneSignalWidgetExtension */ = { - isa = PBXNativeTarget; - buildConfigurationList = ADD28ABA1C1D97B4BEE407DF /* Build configuration list for PBXNativeTarget "OneSignalWidgetExtension" */; - buildPhases = ( - 272F255C8E402E4A9D456123 /* [CP] Check Pods Manifest.lock */, - 4E244F5C4B45F907A5FFA5C5 /* Sources */, - 15A2FF9CCA60D2D8696B7A39 /* Frameworks */, - A9700EE6CB8658A8C3B1E9E3 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = OneSignalWidgetExtension; - productName = OneSignalWidgetExtension; - productReference = FECE8682DCDD3961E46E889A /* OneSignalWidgetExtension.appex */; - productType = "com.apple.product-type.app-extension"; - }; - E2CFC6DE18326F4E2BF3E230 /* OneSignalNotificationServiceExtension */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9B6235E20A03F811D3FA70AA /* Build configuration list for PBXNativeTarget "OneSignalNotificationServiceExtension" */; - buildPhases = ( - E43AE83A57EF1730E2FF99DE /* [CP] Check Pods Manifest.lock */, - 03A1C3A6E94EC269310445AD /* Sources */, - B598A574F40EBF131B15B859 /* Frameworks */, - 6470587E4016DEB5192F45EB /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = OneSignalNotificationServiceExtension; - productName = OneSignalNotificationServiceExtension; - productReference = E3401F727234AB87ECBFAE5C /* OneSignalNotificationServiceExtension.appex */; - productType = "com.apple.product-type.app-extension"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - LastUpgradeCheck = 1510; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 331C8080294A63A400263BE5 = { - CreatedOnToolsVersion = 14.0; - TestTargetID = 97C146ED1CF9000F007C117D; - }; - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - E2CFC6DE18326F4E2BF3E230 /* OneSignalNotificationServiceExtension */, - BB40F0DEB7972F762F263805 /* OneSignalWidgetExtension */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 6470587E4016DEB5192F45EB /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8E8A1FA052CF751D7EF03EA3 /* template-bookmark-icon.png in Resources */, - F656A2DEE91710B22FFFDDEA /* template-share-icon.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - EC3E995823EDCDFAD7622F57 /* template-bookmark-icon.png in Resources */, - 22345C06CA4949C3C8AA069B /* template-share-icon.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A9700EE6CB8658A8C3B1E9E3 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 212833E821E654F6BE137F47 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 272F255C8E402E4A9D456123 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-OneSignalWidgetExtension-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 4E699A5A8ABA2B75E1430F38 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; - E43AE83A57EF1730E2FF99DE /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-OneSignalNotificationServiceExtension-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 03A1C3A6E94EC269310445AD /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - C0241F15C546B89B6A35090F /* NotificationService.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4E244F5C4B45F907A5FFA5C5 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 50A35513A30BBE84344DF9E1 /* OneSignalWidgetLiveActivity.swift in Sources */, - 2DFB8DA296AF02A4B363AA3B /* OneSignalWidgetBundle.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - 7884E8682EC3CC0700C636F2 /* SceneDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 96E8C77E4A55C1E1A5A5A46A /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = OneSignalNotificationServiceExtension; - target = E2CFC6DE18326F4E2BF3E230 /* OneSignalNotificationServiceExtension */; - targetProxy = 96CD0CC6756A005F84F6ADCE /* PBXContainerItemProxy */; - }; - AB57CFCF2AE7EB9A539E0016 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = OneSignalWidgetExtension; - target = BB40F0DEB7972F762F263805 /* OneSignalWidgetExtension */; - targetProxy = 1E7C49B39CBC46EC70FE1E06 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 0389C4725276B159B301580C /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D44D983903606604AF6077BF /* Pods-OneSignalNotificationServiceExtension.release.xcconfig */; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = DL8TF3X4K3; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.NSE; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = DL8TF3X4K3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 2F95A28274752EE402A6CB52 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 35CC497FDF78C6584F9271C3 /* Pods-OneSignalNotificationServiceExtension.profile.xcconfig */; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = DL8TF3X4K3; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.NSE; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = DL8TF3X4K3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = DL8TF3X4K3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - AF07FF3AF1559A077E4DC14F /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DC06F836228D05C2FB213A82 /* Pods-OneSignalWidgetExtension.debug.xcconfig */; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = DL8TF3X4K3; - GENERATE_INFOPLIST_FILE = NO; - INFOPLIST_FILE = OneSignalWidget/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 16.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.LA; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - C36CA5C9336EDA2E1B539FF2 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D867C76CA79CEEE7CE1290AD /* Pods-OneSignalNotificationServiceExtension.debug.xcconfig */; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = DL8TF3X4K3; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.NSE; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - CDE521C8B8277F60F2E1A597 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = C8845B8D79E4BB1D1F728DEE /* Pods-OneSignalWidgetExtension.release.xcconfig */; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = DL8TF3X4K3; - GENERATE_INFOPLIST_FILE = NO; - INFOPLIST_FILE = OneSignalWidget/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 16.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.LA; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - D1883143FFC03809D18E0059 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B8B80A19197CCF54C1F4876D /* Pods-OneSignalWidgetExtension.profile.xcconfig */; - buildSettings = { - APPLICATION_EXTENSION_API_ONLY = YES; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_WEAK = NO; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = DL8TF3X4K3; - GENERATE_INFOPLIST_FILE = NO; - INFOPLIST_FILE = OneSignalWidget/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 16.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.LA; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 9B6235E20A03F811D3FA70AA /* Build configuration list for PBXNativeTarget "OneSignalNotificationServiceExtension" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0389C4725276B159B301580C /* Release */, - C36CA5C9336EDA2E1B539FF2 /* Debug */, - 2F95A28274752EE402A6CB52 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - ADD28ABA1C1D97B4BEE407DF /* Build configuration list for PBXNativeTarget "OneSignalWidgetExtension" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CDE521C8B8277F60F2E1A597 /* Release */, - AF07FF3AF1559A077E4DC14F /* Debug */, - D1883143FFC03809D18E0059 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/examples/demo-no-location-pods/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/demo-no-location-pods/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6..00000000 --- a/examples/demo-no-location-pods/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/demo-no-location-pods/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/demo-no-location-pods/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/examples/demo-no-location-pods/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/demo-no-location-pods/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/demo-no-location-pods/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/examples/demo-no-location-pods/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/demo-no-location-pods/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/demo-no-location-pods/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index 5db441f5..00000000 --- a/examples/demo-no-location-pods/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/demo-no-location-pods/ios/Runner.xcworkspace/contents.xcworkspacedata b/examples/demo-no-location-pods/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc14..00000000 --- a/examples/demo-no-location-pods/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/examples/demo-no-location-pods/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/demo-no-location-pods/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/examples/demo-no-location-pods/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/demo-no-location-pods/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/demo-no-location-pods/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/examples/demo-no-location-pods/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/demo-no-location-pods/ios/Runner/AppDelegate.swift b/examples/demo-no-location-pods/ios/Runner/AppDelegate.swift deleted file mode 100644 index c30b367e..00000000 --- a/examples/demo-no-location-pods/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,16 +0,0 @@ -import Flutter -import UIKit - -@main -@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } - - func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) { - GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry) - } -} diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab..00000000 --- a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada47..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 7353c41e..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 797d452e..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index 6ed2d933..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cd7b009..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index fe730945..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index 321773cd..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 797d452e..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index 502f463a..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index 0ec30343..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png deleted file mode 100644 index 388750c5..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png deleted file mode 100644 index 5ede07ab..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png deleted file mode 100644 index 9edc8622..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png deleted file mode 100644 index 7a6e7e45..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index 0ec30343..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index e9f5fea2..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png deleted file mode 100644 index 7da0bc3d..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png deleted file mode 100644 index be7bd5a1..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index 84ac32ae..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 8953cba0..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index 0467bf12..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2f..00000000 --- a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b..00000000 --- a/examples/demo-no-location-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/examples/demo-no-location-pods/ios/Runner/Base.lproj/LaunchScreen.storyboard b/examples/demo-no-location-pods/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7..00000000 --- a/examples/demo-no-location-pods/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/demo-no-location-pods/ios/Runner/Base.lproj/Main.storyboard b/examples/demo-no-location-pods/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516..00000000 --- a/examples/demo-no-location-pods/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/demo-no-location-pods/ios/Runner/Info.plist b/examples/demo-no-location-pods/ios/Runner/Info.plist deleted file mode 100644 index 0a020eed..00000000 --- a/examples/demo-no-location-pods/ios/Runner/Info.plist +++ /dev/null @@ -1,72 +0,0 @@ - - - - - CADisableMinimumFrameDurationOnPhone - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - OneSignal No Location - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - demo_no_location - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - NSSupportsLiveActivities - - UIApplicationSceneManifest - - UIApplicationSupportsMultipleScenes - - UISceneConfigurations - - UIWindowSceneSessionRoleApplication - - - UISceneClassName - UIWindowScene - UISceneConfigurationName - flutter - UISceneDelegateClassName - $(PRODUCT_MODULE_NAME).SceneDelegate - UISceneStoryboardFile - Main - - - - - UIApplicationSupportsIndirectInputEvents - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/examples/demo-no-location-pods/ios/Runner/Runner-Bridging-Header.h b/examples/demo-no-location-pods/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a56..00000000 --- a/examples/demo-no-location-pods/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/examples/demo-no-location-pods/ios/Runner/Runner.entitlements b/examples/demo-no-location-pods/ios/Runner/Runner.entitlements deleted file mode 100644 index 903def2a..00000000 --- a/examples/demo-no-location-pods/ios/Runner/Runner.entitlements +++ /dev/null @@ -1,8 +0,0 @@ - - - - - aps-environment - development - - diff --git a/examples/demo-no-location-pods/ios/Runner/SceneDelegate.swift b/examples/demo-no-location-pods/ios/Runner/SceneDelegate.swift deleted file mode 100644 index b9ce8ea2..00000000 --- a/examples/demo-no-location-pods/ios/Runner/SceneDelegate.swift +++ /dev/null @@ -1,6 +0,0 @@ -import Flutter -import UIKit - -class SceneDelegate: FlutterSceneDelegate { - -} diff --git a/examples/demo-no-location-pods/ios/Runner/template-bookmark-icon.png b/examples/demo-no-location-pods/ios/Runner/template-bookmark-icon.png deleted file mode 100644 index 99281835..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/template-bookmark-icon.png and /dev/null differ diff --git a/examples/demo-no-location-pods/ios/Runner/template-share-icon.png b/examples/demo-no-location-pods/ios/Runner/template-share-icon.png deleted file mode 100644 index 2457e187..00000000 Binary files a/examples/demo-no-location-pods/ios/Runner/template-share-icon.png and /dev/null differ diff --git a/examples/demo-no-location-pods/lib/main.dart b/examples/demo-no-location-pods/lib/main.dart deleted file mode 100644 index 9a36a462..00000000 --- a/examples/demo-no-location-pods/lib/main.dart +++ /dev/null @@ -1,469 +0,0 @@ -import 'dart:convert'; - -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_dotenv/flutter_dotenv.dart'; -import 'package:http/http.dart' as http; -import 'package:onesignal_flutter/onesignal_flutter.dart'; - -const _defaultOneSignalAppId = 'YOUR-ONESIGNAL-APP-ID'; -const _brandRed = Color(0xFFE54B4D); - -late final String _oneSignalAppId; - -Future main() async { - WidgetsFlutterBinding.ensureInitialized(); - - try { - await dotenv.load(fileName: '.env'); - } catch (_) { - debugPrint('.env file not found, using defaults'); - } - - final envAppId = dotenv.env['ONESIGNAL_APP_ID']?.trim(); - _oneSignalAppId = - envAppId != null && envAppId.isNotEmpty - ? envAppId - : _defaultOneSignalAppId; - - SystemChrome.setSystemUIOverlayStyle( - const SystemUiOverlayStyle( - statusBarColor: _brandRed, - statusBarIconBrightness: Brightness.light, - statusBarBrightness: Brightness.dark, - ), - ); - runApp(const NoLocationDemoApp()); -} - -class NoLocationDemoApp extends StatelessWidget { - const NoLocationDemoApp({super.key}); - - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'OneSignal No-Location Demo', - debugShowCheckedModeBanner: false, - theme: ThemeData( - colorScheme: ColorScheme.fromSeed(seedColor: _brandRed), - scaffoldBackgroundColor: const Color(0xFFF8F9FA), - useMaterial3: true, - ), - home: const NoLocationDemoScreen(), - ); - } -} - -class NoLocationDemoScreen extends StatefulWidget { - const NoLocationDemoScreen({super.key}); - - @override - State createState() => _NoLocationDemoScreenState(); -} - -class _NoLocationDemoScreenState extends State { - bool? _hasNotificationPermission; - String? _pushSubscriptionId; - bool _requestingPermission = false; - bool _sending = false; - bool _startingLiveActivity = false; - late final OnPushSubscriptionChangeObserver _pushSubscriptionObserver; - late final OnNotificationPermissionChangeObserver _permissionObserver; - - bool get _isPlaceholderAppId => - _oneSignalAppId.toLowerCase().startsWith('your-'); - - @override - void initState() { - super.initState(); - _pushSubscriptionObserver = (state) { - debugPrint('Push subscription state: ${state.jsonRepresentation()}'); - if (!mounted) return; - setState(() { - _pushSubscriptionId = state.current.id; - }); - }; - _permissionObserver = (permission) { - debugPrint('Permission changed: $permission'); - if (!mounted) return; - setState(() { - _hasNotificationPermission = permission; - }); - }; - OneSignal.User.pushSubscription.addObserver(_pushSubscriptionObserver); - OneSignal.Notifications.addPermissionObserver(_permissionObserver); - _initializeOneSignal(); - } - - @override - void dispose() { - OneSignal.User.pushSubscription.removeObserver(_pushSubscriptionObserver); - OneSignal.Notifications.removePermissionObserver(_permissionObserver); - super.dispose(); - } - - Future _initializeOneSignal() async { - OneSignal.Debug.setLogLevel(OSLogLevel.verbose); - - try { - await OneSignal.initialize(_oneSignalAppId); - await OneSignal.LiveActivities.setupDefault( - options: LiveActivitySetupOptions( - enablePushToStart: true, - enablePushToUpdate: true, - ), - ); - _refreshPushState(); - } catch (error) { - debugPrint('OneSignal initialization failed: $error'); - } - } - - void _refreshPushState() { - if (!mounted) return; - setState(() { - _hasNotificationPermission = OneSignal.Notifications.permission; - _pushSubscriptionId = OneSignal.User.pushSubscription.id; - }); - } - - Future _requestNotificationPermission() async { - setState(() { - _requestingPermission = true; - }); - - try { - final granted = await OneSignal.Notifications.requestPermission(false); - if (!mounted) return; - setState(() { - _hasNotificationPermission = granted; - _pushSubscriptionId = OneSignal.User.pushSubscription.id; - }); - } catch (error) { - _showMessage('Permission request failed: $error'); - } finally { - if (mounted) { - setState(() { - _requestingPermission = false; - }); - } - } - } - - Future _testLocationPermissionRequest() async { - try { - await OneSignal.Location.requestPermission(); - debugPrint('OneSignal.Location.requestPermission did not throw.'); - } catch (error) { - debugPrint('OneSignal.Location.requestPermission failed: $error'); - } - } - - Future _startLiveActivity() async { - setState(() { - _startingLiveActivity = true; - }); - - try { - final activityId = - 'no-location-demo-${DateTime.now().millisecondsSinceEpoch}'; - await OneSignal.LiveActivities.startDefault( - activityId, - {'orderNumber': 'ORD-1234'}, - { - 'status': 'preparing', - 'message': 'Your order is being prepared', - 'estimatedTime': '15 min', - }, - ); - _showMessage('Started Live Activity: $activityId'); - } catch (error) { - _showMessage('Failed to start Live Activity: $error'); - } finally { - if (mounted) { - setState(() { - _startingLiveActivity = false; - }); - } - } - } - - Future _sendTestNotification() async { - if (_isPlaceholderAppId) { - _showMessage('Set ONESIGNAL_APP_ID in .env before sending a test push.'); - return; - } - - if (_hasNotificationPermission != true) { - _showMessage( - 'Request notification permission before sending a test push.', - ); - return; - } - - final pushSubscriptionId = _pushSubscriptionId; - if (pushSubscriptionId == null || pushSubscriptionId.isEmpty) { - _showMessage('Allow notifications, then wait for a push ID.'); - return; - } - - setState(() { - _sending = true; - }); - - try { - final response = await http.post( - Uri.parse('https://onesignal.com/api/v1/notifications'), - headers: const { - 'Accept': 'application/vnd.onesignal.v1+json', - 'Content-Type': 'application/json', - }, - body: jsonEncode({ - 'app_id': _oneSignalAppId, - 'include_subscription_ids': [pushSubscriptionId], - 'android_group': 'demo-group', - 'headings': {'en': 'OneSignal No-Location Demo'}, - 'contents': { - 'en': - 'This test push was sent without linking the location module.', - }, - 'big_picture': - 'https://media.onesignal.com/automated_push_templates/ratings_template.png', - 'ios_attachments': { - 'image': - 'https://media.onesignal.com/automated_push_templates/ratings_template.png', - }, - }), - ); - - if (response.statusCode < 200 || response.statusCode >= 300) { - _showMessage('Send failed: ${response.body}'); - } - } catch (error) { - _showMessage('Send failed: $error'); - } finally { - if (mounted) { - setState(() { - _sending = false; - }); - } - } - } - - void _showMessage(String message) { - if (!mounted) return; - ScaffoldMessenger.of( - context, - ).showSnackBar(SnackBar(content: Text(message))); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - backgroundColor: _brandRed, - foregroundColor: Colors.white, - systemOverlayStyle: const SystemUiOverlayStyle( - statusBarColor: _brandRed, - statusBarIconBrightness: Brightness.light, - statusBarBrightness: Brightness.dark, - ), - title: const Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text('OneSignal'), - Text( - 'No-Location Demo', - style: TextStyle(fontSize: 14, fontWeight: FontWeight.w400), - ), - ], - ), - ), - body: ListView( - padding: const EdgeInsets.symmetric(vertical: 16), - children: [ - _Section( - title: 'App', - child: _InfoRow(label: 'App ID', value: _oneSignalAppId), - ), - _Section( - title: 'Push', - child: Column( - children: [ - _InfoRow(label: 'Permission', value: _permissionText), - const Divider(height: 17), - _InfoRow(label: 'Push ID', value: _pushSubscriptionId ?? '-'), - const Divider(height: 17), - _PrimaryButton( - label: 'REQUEST PERMISSION', - isLoading: _requestingPermission, - onPressed: _requestNotificationPermission, - ), - const SizedBox(height: 8), - _PrimaryButton( - label: 'SEND TEST NOTIFICATION', - isLoading: _sending, - onPressed: _sendTestNotification, - ), - ], - ), - ), - if (defaultTargetPlatform == TargetPlatform.iOS) - _Section( - title: 'Live Activity', - child: _PrimaryButton( - label: 'START LIVE ACTIVITY', - isLoading: _startingLiveActivity, - onPressed: _startLiveActivity, - ), - ), - _Section( - title: 'Location Module', - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - const Text( - 'This demo initializes OneSignal and requests notification ' - 'permission only when you tap the button above. Native build ' - 'flags exclude the location module. The location test call may ' - 'not log a Dart error; check Android Logcat or Xcode logs for ' - 'native diagnostics.', - style: TextStyle(color: Color(0xFF616161), fontSize: 16), - ), - const SizedBox(height: 12), - OutlinedButton( - style: OutlinedButton.styleFrom( - foregroundColor: _brandRed, - side: const BorderSide(color: _brandRed), - minimumSize: const Size.fromHeight(48), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), - ), - ), - onPressed: _testLocationPermissionRequest, - child: const Text('TEST LOCATION REQUEST'), - ), - ], - ), - ), - ], - ), - ); - } - - String get _permissionText { - final permission = _hasNotificationPermission; - if (permission == null) return 'Unknown'; - return permission ? 'Granted' : 'Not granted'; - } -} - -class _Section extends StatelessWidget { - const _Section({required this.title, required this.child}); - - final String title; - final Widget child; - - @override - Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.fromLTRB(16, 0, 16, 24), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.only(left: 4, bottom: 8), - child: Text( - title.toUpperCase(), - style: const TextStyle( - color: Color(0xFF616161), - fontSize: 12, - fontWeight: FontWeight.w700, - letterSpacing: 0.5, - ), - ), - ), - DecoratedBox( - decoration: BoxDecoration( - color: Colors.white, - border: Border.all(color: const Color(0x1A000000), width: 2), - borderRadius: BorderRadius.circular(12), - ), - child: Padding(padding: const EdgeInsets.all(12), child: child), - ), - ], - ), - ); - } -} - -class _InfoRow extends StatelessWidget { - const _InfoRow({required this.label, required this.value}); - - final String label; - final String value; - - @override - Widget build(BuildContext context) { - return Row( - children: [ - Text( - label, - style: const TextStyle(color: Color(0xFF757575), fontSize: 14), - ), - const SizedBox(width: 8), - Expanded( - child: Text( - value, - maxLines: 1, - overflow: TextOverflow.ellipsis, - textAlign: TextAlign.right, - style: const TextStyle( - color: Color(0xFF616161), - fontFamily: 'monospace', - fontSize: 12, - ), - ), - ), - ], - ); - } -} - -class _PrimaryButton extends StatelessWidget { - const _PrimaryButton({ - required this.label, - required this.isLoading, - required this.onPressed, - }); - - final String label; - final bool isLoading; - final VoidCallback onPressed; - - @override - Widget build(BuildContext context) { - return ElevatedButton( - style: ElevatedButton.styleFrom( - backgroundColor: _brandRed, - foregroundColor: Colors.white, - disabledBackgroundColor: _brandRed.withAlpha(128), - disabledForegroundColor: Colors.white, - minimumSize: const Size.fromHeight(48), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), - ), - onPressed: isLoading ? null : onPressed, - child: - isLoading - ? const SizedBox.square( - dimension: 20, - child: CircularProgressIndicator( - color: Colors.white, - strokeWidth: 2, - ), - ) - : Text(label), - ); - } -} diff --git a/examples/demo-no-location-pods/pubspec.yaml b/examples/demo-no-location-pods/pubspec.yaml deleted file mode 100644 index ded51749..00000000 --- a/examples/demo-no-location-pods/pubspec.yaml +++ /dev/null @@ -1,27 +0,0 @@ -name: demo_no_location_pods -description: OneSignal Flutter SDK CocoaPods no-location demo app -publish_to: 'none' -version: 1.0.0+1 - -environment: - sdk: ^3.7.0 - -dependencies: - flutter: - sdk: flutter - onesignal_flutter: - path: ../../ - flutter_dotenv: ^5.2.1 - http: ^1.2.0 - -dev_dependencies: - flutter_test: - sdk: flutter - flutter_lints: ^5.0.0 - -flutter: - config: - enable-swift-package-manager: false - uses-material-design: true - assets: - - .env diff --git a/examples/demo-no-location-pods/run.sh b/examples/demo-no-location-pods/run.sh deleted file mode 100755 index 7e9f86a2..00000000 --- a/examples/demo-no-location-pods/run.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -ONESIGNAL_DISABLE_LOCATION=true flutter run "$@" diff --git a/examples/demo-pods/.env.example b/examples/demo-pods/.env.example deleted file mode 100644 index d789fef7..00000000 --- a/examples/demo-pods/.env.example +++ /dev/null @@ -1,6 +0,0 @@ -ONESIGNAL_APP_ID=your-onesignal-app-id -ONESIGNAL_API_KEY=your-onesignal-api-key - -# Optional: Android Notification Channel ID for the WITH SOUND test notification. -# Create one in your OneSignal dashboard under Settings > Android Notification Categories. -ONESIGNAL_ANDROID_CHANNEL_ID= diff --git a/examples/demo-pods/.gitignore b/examples/demo-pods/.gitignore deleted file mode 100644 index b841075b..00000000 --- a/examples/demo-pods/.gitignore +++ /dev/null @@ -1,48 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.build/ -.buildlog/ -.history -.svn/ -.swiftpm/ -migrate_working_dir/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins-dependencies -.pub-cache/ -.pub/ -/build/ -/coverage/ - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Android Studio will place build artifacts here -/android/app/debug -/android/app/profile -/android/app/release - -# Environment -.env diff --git a/examples/demo-pods/.metadata b/examples/demo-pods/.metadata deleted file mode 100644 index a046c411..00000000 --- a/examples/demo-pods/.metadata +++ /dev/null @@ -1,33 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: "f6ff1529fd6d8af5f706051d9251ac9231c83407" - channel: "stable" - -project_type: app - -# Tracks metadata for the flutter migrate command -migration: - platforms: - - platform: root - create_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 - base_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 - - platform: android - create_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 - base_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 - - platform: ios - create_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 - base_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 - - # User provided section - - # List of Local paths (relative to this file) that should be - # ignored by the migrate tool. - # - # Files that are not part of the templates will be ignored by default. - unmanaged_files: - - 'lib/main.dart' - - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/examples/demo-pods/README.md b/examples/demo-pods/README.md deleted file mode 100644 index 02f3dc06..00000000 --- a/examples/demo-pods/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# OneSignal Flutter SDK Demo - -A demo app showcasing all OneSignal Flutter SDK features including push notifications, in-app messaging, user management, tags, triggers, outcomes, and more. - -## Prerequisites - -- Flutter with Dart 3.7+ -- Android emulator or iOS simulator (or a physical device) -- For iOS: Xcode with a valid signing configuration - -## Setup - -```bash -flutter pub get -``` - -For iOS, install CocoaPods dependencies: - -```bash -cd ios && pod install && cd .. -``` - -## Run - -```bash -flutter run -d -``` - -The `../run-android.sh` and `../run-ios.sh` helper scripts launch `examples/demo`, not this app. - -To test the bundled iOS notification action icons, follow -[Testing iOS Action Button Icons](../ios-action-button-icons.md). - -## Configuration - -Copy the example environment file and fill in your values: - -```bash -cp .env.example .env -``` - -Set your OneSignal credentials in `.env`: - -``` -ONESIGNAL_APP_ID=your-onesignal-app-id -ONESIGNAL_API_KEY=your-onesignal-api-key -``` - -The `.env` file must exist before the first build because Flutter bundles it as an app asset. The app throws at startup when `ONESIGNAL_APP_ID` is empty. - -## Build Guide - -See [../build.md](../build.md) for the full set of prompts and requirements used to build this app. diff --git a/examples/demo-pods/analysis_options.yaml b/examples/demo-pods/analysis_options.yaml deleted file mode 100644 index 0d87f43e..00000000 --- a/examples/demo-pods/analysis_options.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -analyzer: - exclude: - - build/** - - android/** - - ios/** -include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at https://dart.dev/lints. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/examples/demo-pods/android/.gitignore b/examples/demo-pods/android/.gitignore deleted file mode 100644 index be3943c9..00000000 --- a/examples/demo-pods/android/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java -.cxx/ - -# Remember to never publicly share your keystore. -# See https://flutter.dev/to/reference-keystore -key.properties -**/*.keystore -**/*.jks diff --git a/examples/demo-pods/android/app/build.gradle.kts b/examples/demo-pods/android/app/build.gradle.kts deleted file mode 100644 index 9bb102fc..00000000 --- a/examples/demo-pods/android/app/build.gradle.kts +++ /dev/null @@ -1,45 +0,0 @@ -plugins { - id("com.android.application") - // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. - id("dev.flutter.flutter-gradle-plugin") -} - -android { - namespace = "com.onesignal.sdkdemo" - compileSdk = flutter.compileSdkVersion - ndkVersion = flutter.ndkVersion - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId = "com.onesignal.sdkdemo" - // You can update the following values to match your application needs. - // For more information, see: https://flutter.dev/to/review-gradle-config. - minSdk = flutter.minSdkVersion - targetSdk = flutter.targetSdkVersion - versionCode = flutter.versionCode - versionName = flutter.versionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig = signingConfigs.getByName("debug") - } - } -} - -kotlin { - compilerOptions { - jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17 - } -} - -flutter { - source = "../.." -} diff --git a/examples/demo-pods/android/app/src/debug/AndroidManifest.xml b/examples/demo-pods/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 399f6981..00000000 --- a/examples/demo-pods/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/demo-pods/android/app/src/main/AndroidManifest.xml b/examples/demo-pods/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index dca75d49..00000000 --- a/examples/demo-pods/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/demo-pods/android/app/src/main/kotlin/com/onesignal/sdkdemo/MainActivity.kt b/examples/demo-pods/android/app/src/main/kotlin/com/onesignal/sdkdemo/MainActivity.kt deleted file mode 100644 index 86870d73..00000000 --- a/examples/demo-pods/android/app/src/main/kotlin/com/onesignal/sdkdemo/MainActivity.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.onesignal.sdkdemo - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity : FlutterActivity() diff --git a/examples/demo-pods/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png b/examples/demo-pods/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png deleted file mode 100644 index 9ed9f91c..00000000 Binary files a/examples/demo-pods/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/examples/demo-pods/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png b/examples/demo-pods/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png deleted file mode 100644 index 639bc1f7..00000000 Binary files a/examples/demo-pods/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/examples/demo-pods/android/app/src/main/res/drawable-v21/launch_background.xml b/examples/demo-pods/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index f74085f3..00000000 --- a/examples/demo-pods/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/examples/demo-pods/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png b/examples/demo-pods/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png deleted file mode 100644 index db57e205..00000000 Binary files a/examples/demo-pods/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/examples/demo-pods/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png b/examples/demo-pods/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png deleted file mode 100644 index 0f9c2897..00000000 Binary files a/examples/demo-pods/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/examples/demo-pods/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png b/examples/demo-pods/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png deleted file mode 100644 index f278b388..00000000 Binary files a/examples/demo-pods/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/examples/demo-pods/android/app/src/main/res/drawable/launch_background.xml b/examples/demo-pods/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f8..00000000 --- a/examples/demo-pods/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/examples/demo-pods/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/examples/demo-pods/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml deleted file mode 100644 index c79c58a3..00000000 --- a/examples/demo-pods/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - diff --git a/examples/demo-pods/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/demo-pods/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index 1e8ecc72..00000000 Binary files a/examples/demo-pods/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/examples/demo-pods/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/demo-pods/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index d2c144f1..00000000 Binary files a/examples/demo-pods/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/examples/demo-pods/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/demo-pods/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 680b2f0b..00000000 Binary files a/examples/demo-pods/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/demo-pods/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/demo-pods/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 8b1ef4b6..00000000 Binary files a/examples/demo-pods/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/demo-pods/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/demo-pods/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 6062e282..00000000 Binary files a/examples/demo-pods/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/examples/demo-pods/android/app/src/main/res/raw/vine_boom.wav b/examples/demo-pods/android/app/src/main/res/raw/vine_boom.wav deleted file mode 100644 index 626bd5cc..00000000 Binary files a/examples/demo-pods/android/app/src/main/res/raw/vine_boom.wav and /dev/null differ diff --git a/examples/demo-pods/android/app/src/main/res/values-night/styles.xml b/examples/demo-pods/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 06952be7..00000000 --- a/examples/demo-pods/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/examples/demo-pods/android/app/src/main/res/values/colors.xml b/examples/demo-pods/android/app/src/main/res/values/colors.xml deleted file mode 100644 index f42ada65..00000000 --- a/examples/demo-pods/android/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - #FFFFFF - diff --git a/examples/demo-pods/android/app/src/main/res/values/styles.xml b/examples/demo-pods/android/app/src/main/res/values/styles.xml deleted file mode 100644 index cb1ef880..00000000 --- a/examples/demo-pods/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/examples/demo-pods/android/app/src/profile/AndroidManifest.xml b/examples/demo-pods/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 399f6981..00000000 --- a/examples/demo-pods/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/examples/demo-pods/android/build.gradle.kts b/examples/demo-pods/android/build.gradle.kts deleted file mode 100644 index dbee657b..00000000 --- a/examples/demo-pods/android/build.gradle.kts +++ /dev/null @@ -1,24 +0,0 @@ -allprojects { - repositories { - google() - mavenCentral() - } -} - -val newBuildDir: Directory = - rootProject.layout.buildDirectory - .dir("../../build") - .get() -rootProject.layout.buildDirectory.value(newBuildDir) - -subprojects { - val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) - project.layout.buildDirectory.value(newSubprojectBuildDir) -} -subprojects { - project.evaluationDependsOn(":app") -} - -tasks.register("clean") { - delete(rootProject.layout.buildDirectory) -} diff --git a/examples/demo-pods/android/gradle.properties b/examples/demo-pods/android/gradle.properties deleted file mode 100644 index 3fda55e0..00000000 --- a/examples/demo-pods/android/gradle.properties +++ /dev/null @@ -1,10 +0,0 @@ -org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError -org.gradle.parallel=true -org.gradle.caching=true -org.gradle.configureondemand=true -android.useAndroidX=true -android.nonTransitiveRClass=true -# This newDsl flag was added by the Flutter template -android.newDsl=false -# This builtInKotlin flag was added by the Flutter template -android.builtInKotlin=false diff --git a/examples/demo-pods/android/gradle/wrapper/gradle-wrapper.properties b/examples/demo-pods/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index a20f2c46..00000000 --- a/examples/demo-pods/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-all.zip diff --git a/examples/demo-pods/android/settings.gradle.kts b/examples/demo-pods/android/settings.gradle.kts deleted file mode 100644 index b28021a9..00000000 --- a/examples/demo-pods/android/settings.gradle.kts +++ /dev/null @@ -1,26 +0,0 @@ -pluginManagement { - val flutterSdkPath = - run { - val properties = java.util.Properties() - file("local.properties").inputStream().use { properties.load(it) } - val flutterSdkPath = properties.getProperty("flutter.sdk") - require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } - flutterSdkPath - } - - includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") - - repositories { - google() - mavenCentral() - gradlePluginPortal() - } -} - -plugins { - id("dev.flutter.flutter-plugin-loader") version "1.0.0" - id("com.android.application") version "9.1.0" apply false - id("org.jetbrains.kotlin.android") version "2.4.0" apply false -} - -include(":app") diff --git a/examples/demo-pods/assets/onesignal_logo.svg b/examples/demo-pods/assets/onesignal_logo.svg deleted file mode 100644 index 8bb8d138..00000000 --- a/examples/demo-pods/assets/onesignal_logo.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/demo-pods/assets/onesignal_logo_icon_padded.png b/examples/demo-pods/assets/onesignal_logo_icon_padded.png deleted file mode 100644 index 4ff809f4..00000000 Binary files a/examples/demo-pods/assets/onesignal_logo_icon_padded.png and /dev/null differ diff --git a/examples/demo-pods/ios/.gitignore b/examples/demo-pods/ios/.gitignore deleted file mode 100644 index 7a7f9873..00000000 --- a/examples/demo-pods/ios/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -**/dgph -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/ephemeral/ -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/examples/demo-pods/ios/Flutter/AppFrameworkInfo.plist b/examples/demo-pods/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 391a902b..00000000 --- a/examples/demo-pods/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - - diff --git a/examples/demo-pods/ios/Flutter/Debug.xcconfig b/examples/demo-pods/ios/Flutter/Debug.xcconfig deleted file mode 100644 index ec97fc6f..00000000 --- a/examples/demo-pods/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" -#include "Generated.xcconfig" diff --git a/examples/demo-pods/ios/Flutter/Release.xcconfig b/examples/demo-pods/ios/Flutter/Release.xcconfig deleted file mode 100644 index c4855bfe..00000000 --- a/examples/demo-pods/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" -#include "Generated.xcconfig" diff --git a/examples/demo-pods/ios/OneSignalNotificationServiceExtension/Info.plist b/examples/demo-pods/ios/OneSignalNotificationServiceExtension/Info.plist deleted file mode 100644 index 57421ebf..00000000 --- a/examples/demo-pods/ios/OneSignalNotificationServiceExtension/Info.plist +++ /dev/null @@ -1,13 +0,0 @@ - - - - - NSExtension - - NSExtensionPointIdentifier - com.apple.usernotifications.service - NSExtensionPrincipalClass - $(PRODUCT_MODULE_NAME).NotificationService - - - diff --git a/examples/demo-pods/ios/OneSignalNotificationServiceExtension/NotificationService.swift b/examples/demo-pods/ios/OneSignalNotificationServiceExtension/NotificationService.swift deleted file mode 100644 index d39912d3..00000000 --- a/examples/demo-pods/ios/OneSignalNotificationServiceExtension/NotificationService.swift +++ /dev/null @@ -1,25 +0,0 @@ -import UserNotifications -import OneSignalExtension - -class NotificationService: UNNotificationServiceExtension { - var contentHandler: ((UNNotificationContent) -> Void)? - var receivedRequest: UNNotificationRequest! - var bestAttemptContent: UNMutableNotificationContent? - - override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) { - self.receivedRequest = request - self.contentHandler = contentHandler - self.bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent) - - if let bestAttemptContent = bestAttemptContent { - OneSignalExtension.didReceiveNotificationExtensionRequest(self.receivedRequest, with: bestAttemptContent, withContentHandler: self.contentHandler) - } - } - - override func serviceExtensionTimeWillExpire() { - if let contentHandler = contentHandler, let bestAttemptContent = bestAttemptContent { - OneSignalExtension.serviceExtensionTimeWillExpireRequest(self.receivedRequest, with: self.bestAttemptContent) - contentHandler(bestAttemptContent) - } - } -} diff --git a/examples/demo-pods/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements b/examples/demo-pods/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements deleted file mode 100644 index 68ed0e50..00000000 --- a/examples/demo-pods/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements +++ /dev/null @@ -1,10 +0,0 @@ - - - - - com.apple.security.application-groups - - group.com.onesignal.sdkdemo.onesignal - - - diff --git a/examples/demo-pods/ios/OneSignalWidget/Info.plist b/examples/demo-pods/ios/OneSignalWidget/Info.plist deleted file mode 100644 index 78d358a5..00000000 --- a/examples/demo-pods/ios/OneSignalWidget/Info.plist +++ /dev/null @@ -1,29 +0,0 @@ - - - - - CFBundleDisplayName - OneSignalWidgetExtension - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - $(MARKETING_VERSION) - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSSupportsLiveActivities - - NSExtension - - NSExtensionPointIdentifier - com.apple.widgetkit-extension - - - diff --git a/examples/demo-pods/ios/OneSignalWidget/OneSignalWidgetBundle.swift b/examples/demo-pods/ios/OneSignalWidget/OneSignalWidgetBundle.swift deleted file mode 100644 index eef16a52..00000000 --- a/examples/demo-pods/ios/OneSignalWidget/OneSignalWidgetBundle.swift +++ /dev/null @@ -1,9 +0,0 @@ -import WidgetKit -import SwiftUI - -@main -struct OneSignalWidgetBundle: WidgetBundle { - var body: some Widget { - OneSignalWidgetLiveActivity() - } -} diff --git a/examples/demo-pods/ios/OneSignalWidget/OneSignalWidgetLiveActivity.swift b/examples/demo-pods/ios/OneSignalWidget/OneSignalWidgetLiveActivity.swift deleted file mode 100644 index f4a95f75..00000000 --- a/examples/demo-pods/ios/OneSignalWidget/OneSignalWidgetLiveActivity.swift +++ /dev/null @@ -1,142 +0,0 @@ -import ActivityKit -import WidgetKit -import SwiftUI -import OneSignalLiveActivities - -@available(iOS 16.2, *) -struct OneSignalWidgetLiveActivity: Widget { - - private func statusIcon(for status: String) -> String { - switch status { - case "on_the_way": return "box.truck.fill" - case "delivered": return "checkmark.circle.fill" - default: return "bag.fill" - } - } - - private func statusColor(for status: String) -> Color { - switch status { - case "on_the_way": return .blue - case "delivered": return .green - default: return .orange - } - } - - private func statusLabel(for status: String) -> String { - switch status { - case "on_the_way": return "On the Way" - case "delivered": return "Delivered" - default: return "Preparing" - } - } - - var body: some WidgetConfiguration { - ActivityConfiguration(for: DefaultLiveActivityAttributes.self) { context in - let orderNumber = context.attributes.data["orderNumber"]?.asString() ?? "Order" - let status = context.state.data["status"]?.asString() ?? "preparing" - let message = context.state.data["message"]?.asString() ?? "Your order is being prepared" - let eta = context.state.data["estimatedTime"]?.asString() ?? "" - - VStack(spacing: 10) { - HStack { - Text(orderNumber) - .font(.caption) - .foregroundColor(.gray) - Spacer() - if !eta.isEmpty { - Text(eta) - .font(.caption) - .foregroundColor(.white.opacity(0.7)) - } - } - - HStack(spacing: 12) { - Image(systemName: statusIcon(for: status)) - .font(.title2) - .foregroundColor(statusColor(for: status)) - - VStack(alignment: .leading, spacing: 2) { - Text(statusLabel(for: status)) - .font(.headline) - .foregroundColor(.white) - Text(message) - .font(.subheadline) - .foregroundColor(.white.opacity(0.8)) - .lineLimit(1) - } - Spacer() - } - - DeliveryProgressBar(status: status) - } - .padding() - .activityBackgroundTint(Color(red: 0.11, green: 0.13, blue: 0.19)) - .activitySystemActionForegroundColor(.white) - - } dynamicIsland: { context in - let status = context.state.data["status"]?.asString() ?? "preparing" - let message = context.state.data["message"]?.asString() ?? "Preparing" - let eta = context.state.data["estimatedTime"]?.asString() ?? "" - - return DynamicIsland { - DynamicIslandExpandedRegion(.leading) { - Image(systemName: statusIcon(for: status)) - .font(.title2) - .foregroundColor(statusColor(for: status)) - } - DynamicIslandExpandedRegion(.center) { - Text(statusLabel(for: status)) - .font(.headline) - } - DynamicIslandExpandedRegion(.trailing) { - if !eta.isEmpty { - Text(eta) - .font(.caption) - .foregroundColor(.secondary) - } - } - DynamicIslandExpandedRegion(.bottom) { - Text(message) - .font(.caption) - .foregroundColor(.secondary) - } - } compactLeading: { - Image(systemName: statusIcon(for: status)) - .foregroundColor(statusColor(for: status)) - } compactTrailing: { - Text(statusLabel(for: status)) - .font(.caption) - } minimal: { - Image(systemName: statusIcon(for: status)) - .foregroundColor(statusColor(for: status)) - } - } - } -} - -@available(iOS 16.2, *) -struct DeliveryProgressBar: View { - let status: String - - private var progress: CGFloat { - switch status { - case "on_the_way": return 0.6 - case "delivered": return 1.0 - default: return 0.25 - } - } - - var body: some View { - GeometryReader { geo in - ZStack(alignment: .leading) { - RoundedRectangle(cornerRadius: 3) - .fill(Color.white.opacity(0.2)) - .frame(height: 6) - RoundedRectangle(cornerRadius: 3) - .fill(progress >= 1.0 ? Color.green : Color.blue) - .frame(width: geo.size.width * progress, height: 6) - } - } - .frame(height: 6) - } -} diff --git a/examples/demo-pods/ios/Podfile b/examples/demo-pods/ios/Podfile deleted file mode 100644 index edf23a7f..00000000 --- a/examples/demo-pods/ios/Podfile +++ /dev/null @@ -1,50 +0,0 @@ -# Uncomment this line to define a global platform for your project -platform :ios, '15.0' - -# CocoaPods analytics sends network stats synchronously affecting flutter build latency. -ENV['COCOAPODS_DISABLE_STATS'] = 'true' - -project 'Runner', { - 'Debug' => :debug, - 'Profile' => :release, - 'Release' => :release, -} - -def flutter_root - generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) - unless File.exist?(generated_xcode_build_settings_path) - raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" - end - - File.foreach(generated_xcode_build_settings_path) do |line| - matches = line.match(/FLUTTER_ROOT\=(.*)/) - return matches[1].strip if matches - end - raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" -end - -require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) - -flutter_ios_podfile_setup - -target 'Runner' do - use_frameworks! - - flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) -end - -target 'OneSignalNotificationServiceExtension' do - use_frameworks! - pod 'OneSignalXCFramework', '>= 5.0.0', '< 6.0' -end - -target 'OneSignalWidgetExtension' do - use_frameworks! - pod 'OneSignalXCFramework', '>= 5.0.0', '< 6.0' -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_ios_build_settings(target) - end -end diff --git a/examples/demo-pods/ios/Podfile.lock b/examples/demo-pods/ios/Podfile.lock deleted file mode 100644 index 9d21089a..00000000 --- a/examples/demo-pods/ios/Podfile.lock +++ /dev/null @@ -1,91 +0,0 @@ -PODS: - - Flutter (1.0.0) - - onesignal_flutter (5.8.0): - - Flutter - - OneSignalXCFramework (= 5.8.1) - - OneSignalXCFramework (5.8.1): - - OneSignalXCFramework/OneSignalComplete (= 5.8.1) - - OneSignalXCFramework/OneSignal (5.8.1): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalExtension - - OneSignalXCFramework/OneSignalLiveActivities - - OneSignalXCFramework/OneSignalNotifications - - OneSignalXCFramework/OneSignalOSCore - - OneSignalXCFramework/OneSignalOutcomes - - OneSignalXCFramework/OneSignalUser - - OneSignalXCFramework/OneSignalComplete (5.8.1): - - OneSignalXCFramework/OneSignal - - OneSignalXCFramework/OneSignalInAppMessages - - OneSignalXCFramework/OneSignalLocation - - OneSignalXCFramework/OneSignalCore (5.8.1) - - OneSignalXCFramework/OneSignalExtension (5.8.1): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalOSCore - - OneSignalXCFramework/OneSignalOutcomes - - OneSignalXCFramework/OneSignalInAppMessages (5.8.1): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalNotifications - - OneSignalXCFramework/OneSignalOSCore - - OneSignalXCFramework/OneSignalOutcomes - - OneSignalXCFramework/OneSignalUser - - OneSignalXCFramework/OneSignalLiveActivities (5.8.1): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalOSCore - - OneSignalXCFramework/OneSignalUser - - OneSignalXCFramework/OneSignalLocation (5.8.1): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalNotifications - - OneSignalXCFramework/OneSignalOSCore - - OneSignalXCFramework/OneSignalUser - - OneSignalXCFramework/OneSignalNotifications (5.8.1): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalExtension - - OneSignalXCFramework/OneSignalOSCore - - OneSignalXCFramework/OneSignalOutcomes - - OneSignalXCFramework/OneSignalOSCore (5.8.1): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalOutcomes (5.8.1): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalOSCore - - OneSignalXCFramework/OneSignalUser (5.8.1): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalNotifications - - OneSignalXCFramework/OneSignalOSCore - - OneSignalXCFramework/OneSignalOutcomes - - shared_preferences_foundation (0.0.1): - - Flutter - - FlutterMacOS - - url_launcher_ios (0.0.1): - - Flutter - -DEPENDENCIES: - - Flutter (from `Flutter`) - - onesignal_flutter (from `.symlinks/plugins/onesignal_flutter/ios`) - - OneSignalXCFramework (< 6.0, >= 5.0.0) - - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) - -SPEC REPOS: - trunk: - - OneSignalXCFramework - -EXTERNAL SOURCES: - Flutter: - :path: Flutter - onesignal_flutter: - :path: ".symlinks/plugins/onesignal_flutter/ios" - shared_preferences_foundation: - :path: ".symlinks/plugins/shared_preferences_foundation/darwin" - url_launcher_ios: - :path: ".symlinks/plugins/url_launcher_ios/ios" - -SPEC CHECKSUMS: - Flutter: 71a624a5bc0c04062bf19101d501e466baf2fb47 - onesignal_flutter: 6c9dd9f578f39a952eb6d395368ba5881eda4413 - OneSignalXCFramework: 51f314691a5326cb1440d49d0ec32213997be4ca - shared_preferences_foundation: a7c3904f2dedb3701dd1903cb152ef5e7df92422 - url_launcher_ios: 7a95fa5b60cc718a708b8f2966718e93db0cef1b - -PODFILE CHECKSUM: 59059e8e3c165bb1371006d1aced354a792e9e01 - -COCOAPODS: 1.17.0 diff --git a/examples/demo-pods/ios/Runner.xcodeproj/project.pbxproj b/examples/demo-pods/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 8fabe253..00000000 --- a/examples/demo-pods/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1066 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 6B31009390502356901C0A97 /* Pods_OneSignalWidgetExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CCC0329396AC13CCF7D63BE7 /* Pods_OneSignalWidgetExtension.framework */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - 9E8040A60FDA0353CA2D6948 /* template-bookmark-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 3A5EEB34F6DCFDE209974132 /* template-bookmark-icon.png */; }; - AABB00110000000000000005 /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = AABB00110000000000000001 /* NotificationService.swift */; }; - B2FEE5FC37F5386D74141E35 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 495D768A06CDFF67EB9ECFBD /* Pods_Runner.framework */; }; - BBCC00220000000000000005 /* OneSignalWidgetLiveActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBCC00220000000000000001 /* OneSignalWidgetLiveActivity.swift */; }; - BBCC00220000000000000006 /* OneSignalWidgetBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBCC00220000000000000002 /* OneSignalWidgetBundle.swift */; }; - BBCC00220000000000000014 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBCC00220000000000000012 /* WidgetKit.framework */; }; - BBCC00220000000000000015 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBCC00220000000000000013 /* SwiftUI.framework */; }; - CCDD00440000000000000002 /* vine_boom.wav in Resources */ = {isa = PBXBuildFile; fileRef = CCDD00440000000000000001 /* vine_boom.wav */; }; - CE359A5617DB32244E4779D0 /* template-share-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 84AE18978C8478FD2CED9139 /* template-share-icon.png */; }; - DCC74E696EB253DBC854FB79 /* Pods_OneSignalNotificationServiceExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA1153E70A142A707DAB6259 /* Pods_OneSignalNotificationServiceExtension.framework */; }; - DDEE00330000000000000002 /* OneSignalNotificationServiceExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = AABB00110000000000000004 /* OneSignalNotificationServiceExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - DDEE00330000000000000003 /* OneSignalWidgetExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = BBCC00220000000000000004 /* OneSignalWidgetExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - EE23C65AB2815C1497028A7C /* template-share-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 84AE18978C8478FD2CED9139 /* template-share-icon.png */; }; - FF37A4A159CCB0EE6A18385C /* template-bookmark-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 3A5EEB34F6DCFDE209974132 /* template-bookmark-icon.png */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - AABB0011000000000000000F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 97C146E61CF9000F007C117D /* Project object */; - proxyType = 1; - remoteGlobalIDString = AABB00110000000000000007; - remoteInfo = OneSignalNotificationServiceExtension; - }; - BBCC00220000000000000010 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 97C146E61CF9000F007C117D /* Project object */; - proxyType = 1; - remoteGlobalIDString = BBCC00220000000000000008; - remoteInfo = OneSignalWidgetExtension; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; - DDEE00330000000000000001 /* Embed Foundation Extensions */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 13; - files = ( - DDEE00330000000000000002 /* OneSignalNotificationServiceExtension.appex in Embed Foundation Extensions */, - DDEE00330000000000000003 /* OneSignalWidgetExtension.appex in Embed Foundation Extensions */, - ); - name = "Embed Foundation Extensions"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 214A4923A7D8B53C727C248F /* Pods-OneSignalWidgetExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OneSignalWidgetExtension.release.xcconfig"; path = "Target Support Files/Pods-OneSignalWidgetExtension/Pods-OneSignalWidgetExtension.release.xcconfig"; sourceTree = ""; }; - 3A5EEB34F6DCFDE209974132 /* template-bookmark-icon.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; path = "template-bookmark-icon.png"; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 463D6688A6D624CAA2FF3A9B /* Pods-OneSignalWidgetExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OneSignalWidgetExtension.debug.xcconfig"; path = "Target Support Files/Pods-OneSignalWidgetExtension/Pods-OneSignalWidgetExtension.debug.xcconfig"; sourceTree = ""; }; - 495D768A06CDFF67EB9ECFBD /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 5AA0C3A86C91DD59331750AB /* Pods-OneSignalNotificationServiceExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OneSignalNotificationServiceExtension.release.xcconfig"; path = "Target Support Files/Pods-OneSignalNotificationServiceExtension/Pods-OneSignalNotificationServiceExtension.release.xcconfig"; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 7B6B6AC2646AE48D486BE87C /* Pods-OneSignalNotificationServiceExtension.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OneSignalNotificationServiceExtension.profile.xcconfig"; path = "Target Support Files/Pods-OneSignalNotificationServiceExtension/Pods-OneSignalNotificationServiceExtension.profile.xcconfig"; sourceTree = ""; }; - 84AE18978C8478FD2CED9139 /* template-share-icon.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; path = "template-share-icon.png"; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 9A867B1FDBE5944DEB6CC4E5 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - AABB00110000000000000001 /* NotificationService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationService.swift; sourceTree = ""; }; - AABB00110000000000000002 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - AABB00110000000000000003 /* OneSignalNotificationServiceExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = OneSignalNotificationServiceExtension.entitlements; sourceTree = ""; }; - AABB00110000000000000004 /* OneSignalNotificationServiceExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = OneSignalNotificationServiceExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; - AE906170E336863974699B98 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; - BBCC00220000000000000001 /* OneSignalWidgetLiveActivity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OneSignalWidgetLiveActivity.swift; sourceTree = ""; }; - BBCC00220000000000000002 /* OneSignalWidgetBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OneSignalWidgetBundle.swift; sourceTree = ""; }; - BBCC00220000000000000003 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - BBCC00220000000000000004 /* OneSignalWidgetExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = OneSignalWidgetExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; - BBCC00220000000000000012 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; }; - BBCC00220000000000000013 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; }; - CCC0329396AC13CCF7D63BE7 /* Pods_OneSignalWidgetExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_OneSignalWidgetExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - CCDD00440000000000000001 /* vine_boom.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = vine_boom.wav; sourceTree = ""; }; - D46D9E2E67DD813A87D3C230 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; - DDEE00330000000000000004 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; - DF4FF096C1198FFEEE5E20EA /* Pods-OneSignalNotificationServiceExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OneSignalNotificationServiceExtension.debug.xcconfig"; path = "Target Support Files/Pods-OneSignalNotificationServiceExtension/Pods-OneSignalNotificationServiceExtension.debug.xcconfig"; sourceTree = ""; }; - ED1A5A3D2AEA3DC7B8B12A7C /* Pods-OneSignalWidgetExtension.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OneSignalWidgetExtension.profile.xcconfig"; path = "Target Support Files/Pods-OneSignalWidgetExtension/Pods-OneSignalWidgetExtension.profile.xcconfig"; sourceTree = ""; }; - FA1153E70A142A707DAB6259 /* Pods_OneSignalNotificationServiceExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_OneSignalNotificationServiceExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - B2FEE5FC37F5386D74141E35 /* Pods_Runner.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - AABB00110000000000000009 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - DCC74E696EB253DBC854FB79 /* Pods_OneSignalNotificationServiceExtension.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBCC0022000000000000000A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BBCC00220000000000000014 /* WidgetKit.framework in Frameworks */, - BBCC00220000000000000015 /* SwiftUI.framework in Frameworks */, - 6B31009390502356901C0A97 /* Pods_OneSignalWidgetExtension.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 05A87DB5EF999057FBF1692F /* Frameworks */ = { - isa = PBXGroup; - children = ( - FA1153E70A142A707DAB6259 /* Pods_OneSignalNotificationServiceExtension.framework */, - CCC0329396AC13CCF7D63BE7 /* Pods_OneSignalWidgetExtension.framework */, - 495D768A06CDFF67EB9ECFBD /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 54FFF5546D86218B1F41ECCA /* Pods */ = { - isa = PBXGroup; - children = ( - DF4FF096C1198FFEEE5E20EA /* Pods-OneSignalNotificationServiceExtension.debug.xcconfig */, - 5AA0C3A86C91DD59331750AB /* Pods-OneSignalNotificationServiceExtension.release.xcconfig */, - 7B6B6AC2646AE48D486BE87C /* Pods-OneSignalNotificationServiceExtension.profile.xcconfig */, - 463D6688A6D624CAA2FF3A9B /* Pods-OneSignalWidgetExtension.debug.xcconfig */, - 214A4923A7D8B53C727C248F /* Pods-OneSignalWidgetExtension.release.xcconfig */, - ED1A5A3D2AEA3DC7B8B12A7C /* Pods-OneSignalWidgetExtension.profile.xcconfig */, - D46D9E2E67DD813A87D3C230 /* Pods-Runner.debug.xcconfig */, - 9A867B1FDBE5944DEB6CC4E5 /* Pods-Runner.release.xcconfig */, - AE906170E336863974699B98 /* Pods-Runner.profile.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - AABB00110000000000000006 /* OneSignalNotificationServiceExtension */, - BBCC00220000000000000007 /* OneSignalWidget */, - BBCC00220000000000000012 /* WidgetKit.framework */, - BBCC00220000000000000013 /* SwiftUI.framework */, - 54FFF5546D86218B1F41ECCA /* Pods */, - 05A87DB5EF999057FBF1692F /* Frameworks */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - AABB00110000000000000004 /* OneSignalNotificationServiceExtension.appex */, - BBCC00220000000000000004 /* OneSignalWidgetExtension.appex */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - DDEE00330000000000000004 /* Runner.entitlements */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - CCDD00440000000000000001 /* vine_boom.wav */, - 3A5EEB34F6DCFDE209974132 /* template-bookmark-icon.png */, - 84AE18978C8478FD2CED9139 /* template-share-icon.png */, - ); - path = Runner; - sourceTree = ""; - }; - AABB00110000000000000006 /* OneSignalNotificationServiceExtension */ = { - isa = PBXGroup; - children = ( - AABB00110000000000000001 /* NotificationService.swift */, - AABB00110000000000000002 /* Info.plist */, - AABB00110000000000000003 /* OneSignalNotificationServiceExtension.entitlements */, - ); - path = OneSignalNotificationServiceExtension; - sourceTree = ""; - }; - BBCC00220000000000000007 /* OneSignalWidget */ = { - isa = PBXGroup; - children = ( - BBCC00220000000000000001 /* OneSignalWidgetLiveActivity.swift */, - BBCC00220000000000000002 /* OneSignalWidgetBundle.swift */, - BBCC00220000000000000003 /* Info.plist */, - ); - path = OneSignalWidget; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 0C1C215635A3CC73066A6FF1 /* [CP] Check Pods Manifest.lock */, - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - DDEE00330000000000000001 /* Embed Foundation Extensions */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - D290C5E570922240D9A4C140 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - AABB00110000000000000010 /* PBXTargetDependency */, - BBCC00220000000000000011 /* PBXTargetDependency */, - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; - AABB00110000000000000007 /* OneSignalNotificationServiceExtension */ = { - isa = PBXNativeTarget; - buildConfigurationList = AABB0011000000000000000E /* Build configuration list for PBXNativeTarget "OneSignalNotificationServiceExtension" */; - buildPhases = ( - 1F9A6A0D36789FF9688AC733 /* [CP] Check Pods Manifest.lock */, - AABB00110000000000000008 /* Sources */, - AABB00110000000000000009 /* Frameworks */, - AABB0011000000000000000A /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = OneSignalNotificationServiceExtension; - productName = OneSignalNotificationServiceExtension; - productReference = AABB00110000000000000004 /* OneSignalNotificationServiceExtension.appex */; - productType = "com.apple.product-type.app-extension"; - }; - BBCC00220000000000000008 /* OneSignalWidgetExtension */ = { - isa = PBXNativeTarget; - buildConfigurationList = BBCC0022000000000000000F /* Build configuration list for PBXNativeTarget "OneSignalWidgetExtension" */; - buildPhases = ( - 2148B329DED180500E86AAD8 /* [CP] Check Pods Manifest.lock */, - BBCC00220000000000000009 /* Sources */, - BBCC0022000000000000000A /* Frameworks */, - BBCC0022000000000000000B /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = OneSignalWidgetExtension; - productName = OneSignalWidgetExtension; - productReference = BBCC00220000000000000004 /* OneSignalWidgetExtension.appex */; - productType = "com.apple.product-type.app-extension"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - LastUpgradeCheck = 1510; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 331C8080294A63A400263BE5 = { - CreatedOnToolsVersion = 14.0; - TestTargetID = 97C146ED1CF9000F007C117D; - }; - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - AABB00110000000000000007 = { - CreatedOnToolsVersion = 15.1; - }; - BBCC00220000000000000008 = { - CreatedOnToolsVersion = 15.1; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - AABB00110000000000000007 /* OneSignalNotificationServiceExtension */, - BBCC00220000000000000008 /* OneSignalWidgetExtension */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - CCDD00440000000000000002 /* vine_boom.wav in Resources */, - 9E8040A60FDA0353CA2D6948 /* template-bookmark-icon.png in Resources */, - CE359A5617DB32244E4779D0 /* template-share-icon.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - AABB0011000000000000000A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - FF37A4A159CCB0EE6A18385C /* template-bookmark-icon.png in Resources */, - EE23C65AB2815C1497028A7C /* template-share-icon.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBCC0022000000000000000B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 0C1C215635A3CC73066A6FF1 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 1F9A6A0D36789FF9688AC733 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-OneSignalNotificationServiceExtension-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 2148B329DED180500E86AAD8 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-OneSignalWidgetExtension-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; - D290C5E570922240D9A4C140 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - AABB00110000000000000008 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - AABB00110000000000000005 /* NotificationService.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BBCC00220000000000000009 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BBCC00220000000000000005 /* OneSignalWidgetLiveActivity.swift in Sources */, - BBCC00220000000000000006 /* OneSignalWidgetBundle.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - AABB00110000000000000010 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = AABB00110000000000000007 /* OneSignalNotificationServiceExtension */; - targetProxy = AABB0011000000000000000F /* PBXContainerItemProxy */; - }; - BBCC00220000000000000011 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = BBCC00220000000000000008 /* OneSignalWidgetExtension */; - targetProxy = BBCC00220000000000000010 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = DL8TF3X4K3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = DL8TF3X4K3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = DL8TF3X4K3; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - AABB0011000000000000000B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DF4FF096C1198FFEEE5E20EA /* Pods-OneSignalNotificationServiceExtension.debug.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = DL8TF3X4K3; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = OneSignalNotificationServiceExtension; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.NSE; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - AABB0011000000000000000C /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5AA0C3A86C91DD59331750AB /* Pods-OneSignalNotificationServiceExtension.release.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = DL8TF3X4K3; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = OneSignalNotificationServiceExtension; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.NSE; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - AABB0011000000000000000D /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7B6B6AC2646AE48D486BE87C /* Pods-OneSignalNotificationServiceExtension.profile.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = DL8TF3X4K3; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = OneSignalNotificationServiceExtension; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 15.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.NSE; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Profile; - }; - BBCC0022000000000000000C /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 463D6688A6D624CAA2FF3A9B /* Pods-OneSignalWidgetExtension.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = AppIcon; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = DL8TF3X4K3; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = OneSignalWidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = OneSignalWidgetExtension; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 16.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.LA; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - BBCC0022000000000000000D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 214A4923A7D8B53C727C248F /* Pods-OneSignalWidgetExtension.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = AppIcon; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = DL8TF3X4K3; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = OneSignalWidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = OneSignalWidgetExtension; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 16.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.LA; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - BBCC0022000000000000000E /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = ED1A5A3D2AEA3DC7B8B12A7C /* Pods-OneSignalWidgetExtension.profile.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AppIcon; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = AppIcon; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = DL8TF3X4K3; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = OneSignalWidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = OneSignalWidgetExtension; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 16.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.sdkdemo.LA; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Profile; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - AABB0011000000000000000E /* Build configuration list for PBXNativeTarget "OneSignalNotificationServiceExtension" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - AABB0011000000000000000B /* Debug */, - AABB0011000000000000000C /* Release */, - AABB0011000000000000000D /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - BBCC0022000000000000000F /* Build configuration list for PBXNativeTarget "OneSignalWidgetExtension" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BBCC0022000000000000000C /* Debug */, - BBCC0022000000000000000D /* Release */, - BBCC0022000000000000000E /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/examples/demo-pods/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/demo-pods/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6..00000000 --- a/examples/demo-pods/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/demo-pods/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/demo-pods/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/examples/demo-pods/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/demo-pods/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/demo-pods/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/examples/demo-pods/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/demo-pods/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/demo-pods/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index 9c12df59..00000000 --- a/examples/demo-pods/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/demo-pods/ios/Runner.xcworkspace/contents.xcworkspacedata b/examples/demo-pods/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc14..00000000 --- a/examples/demo-pods/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/examples/demo-pods/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/demo-pods/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/examples/demo-pods/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/examples/demo-pods/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples/demo-pods/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/examples/demo-pods/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/examples/demo-pods/ios/Runner/AppDelegate.swift b/examples/demo-pods/ios/Runner/AppDelegate.swift deleted file mode 100644 index c30b367e..00000000 --- a/examples/demo-pods/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,16 +0,0 @@ -import Flutter -import UIKit - -@main -@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } - - func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) { - GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry) - } -} diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d0d98aa1..00000000 --- a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1 +0,0 @@ -{"images":[{"size":"20x20","idiom":"iphone","filename":"Icon-App-20x20@2x.png","scale":"2x"},{"size":"20x20","idiom":"iphone","filename":"Icon-App-20x20@3x.png","scale":"3x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@2x.png","scale":"2x"},{"size":"29x29","idiom":"iphone","filename":"Icon-App-29x29@3x.png","scale":"3x"},{"size":"40x40","idiom":"iphone","filename":"Icon-App-40x40@2x.png","scale":"2x"},{"size":"40x40","idiom":"iphone","filename":"Icon-App-40x40@3x.png","scale":"3x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@1x.png","scale":"1x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"Icon-App-60x60@2x.png","scale":"2x"},{"size":"60x60","idiom":"iphone","filename":"Icon-App-60x60@3x.png","scale":"3x"},{"size":"20x20","idiom":"ipad","filename":"Icon-App-20x20@1x.png","scale":"1x"},{"size":"20x20","idiom":"ipad","filename":"Icon-App-20x20@2x.png","scale":"2x"},{"size":"29x29","idiom":"ipad","filename":"Icon-App-29x29@1x.png","scale":"1x"},{"size":"29x29","idiom":"ipad","filename":"Icon-App-29x29@2x.png","scale":"2x"},{"size":"40x40","idiom":"ipad","filename":"Icon-App-40x40@1x.png","scale":"1x"},{"size":"40x40","idiom":"ipad","filename":"Icon-App-40x40@2x.png","scale":"2x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@1x.png","scale":"1x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@2x.png","scale":"2x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@1x.png","scale":"1x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@2x.png","scale":"2x"},{"size":"76x76","idiom":"ipad","filename":"Icon-App-76x76@1x.png","scale":"1x"},{"size":"76x76","idiom":"ipad","filename":"Icon-App-76x76@2x.png","scale":"2x"},{"size":"83.5x83.5","idiom":"ipad","filename":"Icon-App-83.5x83.5@2x.png","scale":"2x"},{"size":"1024x1024","idiom":"ios-marketing","filename":"Icon-App-1024x1024@1x.png","scale":"1x"}],"info":{"version":1,"author":"xcode"}} \ No newline at end of file diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index d4295e38..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 97658bfe..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index b1bf42f9..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index 76b737e0..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index b8ac6697..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d3de94d2..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index f0559d2b..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index b1bf42f9..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index 59124a76..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index dd146ada..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png deleted file mode 100644 index 388750c5..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png deleted file mode 100644 index 5ede07ab..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png deleted file mode 100644 index 9edc8622..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png deleted file mode 100644 index 7a6e7e45..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index dd146ada..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 8e943138..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png deleted file mode 100644 index 4fb86630..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png deleted file mode 100644 index afe9e327..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index e6c88550..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 1826d27a..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index 1757b996..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/examples/demo-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2f..00000000 --- a/examples/demo-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/examples/demo-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/examples/demo-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/examples/demo-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/examples/demo-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b..00000000 --- a/examples/demo-pods/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/examples/demo-pods/ios/Runner/Base.lproj/LaunchScreen.storyboard b/examples/demo-pods/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7..00000000 --- a/examples/demo-pods/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/demo-pods/ios/Runner/Base.lproj/Main.storyboard b/examples/demo-pods/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516..00000000 --- a/examples/demo-pods/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/demo-pods/ios/Runner/Info.plist b/examples/demo-pods/ios/Runner/Info.plist deleted file mode 100644 index baf6116a..00000000 --- a/examples/demo-pods/ios/Runner/Info.plist +++ /dev/null @@ -1,80 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - OneSignal Demo - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - OneSignal Demo - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UIApplicationSceneManifest - - UIApplicationSupportsMultipleScenes - - UISceneConfigurations - - UIWindowSceneSessionRoleApplication - - - UISceneClassName - UIWindowScene - UISceneConfigurationName - flutter - UISceneDelegateClassName - FlutterSceneDelegate - UISceneStoryboardFile - Main - - - - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - NSSupportsLiveActivities - - NSLocationWhenInUseUsageDescription - This app uses your location to personalize notifications and content. - NSLocationAlwaysAndWhenInUseUsageDescription - This app uses your location to personalize notifications and content, even in the background. - CADisableMinimumFrameDurationOnPhone - - UIApplicationSupportsIndirectInputEvents - - UIBackgroundModes - - remote-notification - - - diff --git a/examples/demo-pods/ios/Runner/Runner-Bridging-Header.h b/examples/demo-pods/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a56..00000000 --- a/examples/demo-pods/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/examples/demo-pods/ios/Runner/Runner.entitlements b/examples/demo-pods/ios/Runner/Runner.entitlements deleted file mode 100644 index 6a1199ae..00000000 --- a/examples/demo-pods/ios/Runner/Runner.entitlements +++ /dev/null @@ -1,12 +0,0 @@ - - - - - aps-environment - development - com.apple.security.application-groups - - group.com.onesignal.sdkdemo.onesignal - - - diff --git a/examples/demo-pods/ios/Runner/template-bookmark-icon.png b/examples/demo-pods/ios/Runner/template-bookmark-icon.png deleted file mode 100644 index 99281835..00000000 Binary files a/examples/demo-pods/ios/Runner/template-bookmark-icon.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/template-share-icon.png b/examples/demo-pods/ios/Runner/template-share-icon.png deleted file mode 100644 index 2457e187..00000000 Binary files a/examples/demo-pods/ios/Runner/template-share-icon.png and /dev/null differ diff --git a/examples/demo-pods/ios/Runner/vine_boom.wav b/examples/demo-pods/ios/Runner/vine_boom.wav deleted file mode 100644 index 626bd5cc..00000000 Binary files a/examples/demo-pods/ios/Runner/vine_boom.wav and /dev/null differ diff --git a/examples/demo-pods/lib/main.dart b/examples/demo-pods/lib/main.dart deleted file mode 100644 index 3bcbe801..00000000 --- a/examples/demo-pods/lib/main.dart +++ /dev/null @@ -1,150 +0,0 @@ -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_dotenv/flutter_dotenv.dart'; -import 'package:onesignal_flutter/onesignal_flutter.dart'; -import 'package:provider/provider.dart'; - -import 'screens/home_screen.dart'; -import 'services/onesignal_api_service.dart'; -import 'services/log_service.dart'; -import 'services/preferences_service.dart'; -import 'services/tooltip_helper.dart'; -import 'theme.dart'; -import 'viewmodels/app_viewmodel.dart'; - -Future main() async { - WidgetsFlutterBinding.ensureInitialized(); - - try { - await dotenv.load(fileName: '.env'); - } catch (_) { - debugPrint('.env file not found'); - } - - final prefs = PreferencesService(); - await prefs.init(); - - final envAppId = dotenv.env['ONESIGNAL_APP_ID']; - final appId = envAppId?.trim() ?? ''; - if (appId.isEmpty) { - throw StateError( - 'ONESIGNAL_APP_ID is not set. Add it to examples/demo/.env.', - ); - } - - // Initialize OneSignal SDK - OneSignal.Debug.setLogLevel(OSLogLevel.verbose); - OneSignal.consentRequired(prefs.consentRequired); - OneSignal.consentGiven(prefs.privacyConsent); - await OneSignal.initialize(appId); - - OneSignal.LiveActivities.setupDefault( - options: LiveActivitySetupOptions( - enablePushToStart: true, - enablePushToUpdate: true, - ), - ); - - // Restore cached SDK states after init fully completes - OneSignal.InAppMessages.paused(prefs.iamPaused); - OneSignal.Location.setShared(prefs.locationShared); - - // Register IAM listeners - OneSignal.InAppMessages.addWillDisplayListener((event) { - LogService.show('IAM willDisplay: ${event.message.messageId}'); - }); - OneSignal.InAppMessages.addDidDisplayListener((event) { - LogService.show('IAM didDisplay: ${event.message.messageId}'); - }); - OneSignal.InAppMessages.addWillDismissListener((event) { - LogService.show('IAM willDismiss: ${event.message.messageId}'); - }); - OneSignal.InAppMessages.addDidDismissListener((event) { - LogService.show('IAM didDismiss: ${event.message.messageId}'); - }); - OneSignal.InAppMessages.addClickListener((event) { - LogService.show('IAM click: ${event.message.messageId}'); - }); - - // Register notification listeners - OneSignal.Notifications.addClickListener((event) { - LogService.show( - 'Notification click: ${event.notification.notificationId} ' - '${event.notification.title ?? ''}', - ); - - // Uncomment to see the full event object. - // debugPrint('[OneSignal] click event: ${event.jsonRepresentation()}'); - }); - - OneSignal.Notifications.addForegroundWillDisplayListener((event) { - LogService.show( - 'Notification foregroundWillDisplay: ' - '${event.notification.notificationId} ${event.notification.title ?? ''}', - ); - - // Uncomment to see the full event object. - // debugPrint('[OneSignal] will display event: ${event.notification.jsonRepresentation()}'); - - // Uncomment to test preventing the default display behavior. - // event.preventDefault(); - - // Can be called after preventDefault (within ~25 seconds) to force display. - // event.notification.display(); - - // Example with a delay (assumes preventDefault was called). - // debugPrint('[OneSignal] Forcing notification display in 24 seconds'); - // () async { - // var seconds = 24; - // while (seconds > 0) { - // await Future.delayed(const Duration(seconds: 1)); - // seconds--; - // debugPrint('[OneSignal] Displaying notification in $seconds seconds'); - // } - // event.notification.display(); - // }(); - }); - - // Set up API service - String apiKey = ''; - try { - apiKey = dotenv.env['ONESIGNAL_API_KEY'] ?? ''; - } catch (_) { - debugPrint('[OneSignal] API key not found, continuing without it'); - } - final apiService = - OneSignalApiService() - ..setAppId(appId) - ..setApiKey(apiKey); - - // Fetch tooltips in background - TooltipHelper().init(); - - debugPrint('[OneSignal] Initialized with app ID: $appId'); - - runApp( - ChangeNotifierProvider( - create: (_) { - final vm = AppViewModel(apiService, prefs); - vm.setupObservers(); - vm.loadInitialState(appId); - return vm; - }, - child: const OneSignalDemoApp(), - ), - ); -} - -class OneSignalDemoApp extends StatelessWidget { - const OneSignalDemoApp({super.key}); - - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'OneSignal Demo', - theme: AppTheme.light, - debugShowCheckedModeBanner: false, - home: const HomeScreen(), - ); - } -} diff --git a/examples/demo-pods/lib/models/in_app_message_type.dart b/examples/demo-pods/lib/models/in_app_message_type.dart deleted file mode 100644 index 6aa707de..00000000 --- a/examples/demo-pods/lib/models/in_app_message_type.dart +++ /dev/null @@ -1,15 +0,0 @@ -enum InAppMessageType { - topBanner('Top', 'top_banner'), - bottomBanner('Bottom', 'bottom_banner'), - centerModal('Center', 'center_modal'), - html('HTML', 'html'), - fullScreen('Full', 'full_screen'), - fullBleed('Full Bleed', 'full_bleed'), - carousel('Carousel', 'carousel'), - carouselBleed('Carousel Bleed', 'carousel_bleed'); - - final String label; - final String triggerValue; - - const InAppMessageType(this.label, this.triggerValue); -} diff --git a/examples/demo-pods/lib/models/notification_type.dart b/examples/demo-pods/lib/models/notification_type.dart deleted file mode 100644 index ddaf3ac3..00000000 --- a/examples/demo-pods/lib/models/notification_type.dart +++ /dev/null @@ -1,38 +0,0 @@ -enum NotificationType { - simple( - title: 'Simple Notification', - body: 'This is a simple push notification', - ), - withImage( - title: 'Image Notification', - body: 'This notification includes an image', - bigPicture: - 'https://media.onesignal.com/automated_push_templates/ratings_template.png', - iosAttachments: { - 'image': - 'https://media.onesignal.com/automated_push_templates/ratings_template.png' - }, - ), - withSound( - title: 'Sound Notification', - body: 'This notification plays a custom sound', - iosSound: 'vine_boom.wav', - useAndroidChannel: true, - ); - - final String title; - final String body; - final String? bigPicture; - final Map? iosAttachments; - final String? iosSound; - final bool useAndroidChannel; - - const NotificationType({ - required this.title, - required this.body, - this.bigPicture, - this.iosAttachments, - this.iosSound, - this.useAndroidChannel = false, - }); -} diff --git a/examples/demo-pods/lib/models/user_data.dart b/examples/demo-pods/lib/models/user_data.dart deleted file mode 100644 index b03b46d2..00000000 --- a/examples/demo-pods/lib/models/user_data.dart +++ /dev/null @@ -1,56 +0,0 @@ -class UserData { - final Map aliases; - final Map tags; - final List emails; - final List smsNumbers; - final String? externalId; - - const UserData({ - required this.aliases, - required this.tags, - required this.emails, - required this.smsNumbers, - this.externalId, - }); - - factory UserData.fromJson(Map json) { - final identity = json['identity'] as Map? ?? {}; - final properties = json['properties'] as Map? ?? {}; - final subscriptions = json['subscriptions'] as List? ?? []; - final tagsRaw = properties['tags'] as Map? ?? {}; - - final aliases = {}; - for (final entry in identity.entries) { - if (entry.key != 'external_id' && entry.key != 'onesignal_id') { - aliases[entry.key] = entry.value.toString(); - } - } - - final tags = {}; - for (final entry in tagsRaw.entries) { - tags[entry.key] = entry.value.toString(); - } - - final emails = []; - final smsNumbers = []; - for (final sub in subscriptions) { - if (sub is Map) { - final type = sub['type'] as String?; - final token = sub['token'] as String?; - if (type == 'Email' && token != null) { - emails.add(token); - } else if (type == 'SMS' && token != null) { - smsNumbers.add(token); - } - } - } - - return UserData( - aliases: aliases, - tags: tags, - emails: emails, - smsNumbers: smsNumbers, - externalId: identity['external_id']?.toString(), - ); - } -} diff --git a/examples/demo-pods/lib/screens/home_screen.dart b/examples/demo-pods/lib/screens/home_screen.dart deleted file mode 100644 index fac1ed40..00000000 --- a/examples/demo-pods/lib/screens/home_screen.dart +++ /dev/null @@ -1,166 +0,0 @@ -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; -import 'package:provider/provider.dart'; - -import '../theme.dart'; -import '../services/tooltip_helper.dart'; -import '../viewmodels/app_viewmodel.dart'; -import '../widgets/dialogs.dart'; -import '../widgets/log_view.dart'; -import '../widgets/sections/aliases_section.dart'; -import '../widgets/sections/app_section.dart'; -import '../widgets/sections/user_section.dart'; -import '../widgets/sections/emails_section.dart'; -import '../widgets/sections/in_app_section.dart'; -import '../widgets/sections/live_activities_section.dart'; -import '../widgets/sections/location_section.dart'; -import '../widgets/sections/outcomes_section.dart'; -import '../widgets/sections/push_section.dart'; -import '../widgets/sections/send_iam_section.dart'; -import '../widgets/sections/send_push_section.dart'; -import '../widgets/sections/sms_section.dart'; -import '../widgets/sections/tags_section.dart'; -import '../widgets/sections/custom_events_section.dart'; -import '../widgets/sections/triggers_section.dart'; -import 'secondary_screen.dart'; - -class HomeScreen extends StatefulWidget { - const HomeScreen({super.key}); - - @override - State createState() => _HomeScreenState(); -} - -class _HomeScreenState extends State { - @override - void initState() { - super.initState(); - // Auto-prompt push permission after frame renders - WidgetsBinding.instance.addPostFrameCallback((_) { - context.read().promptPush(); - }); - } - - void _showTooltipDialog(BuildContext context, String key) { - final tooltip = TooltipHelper().getTooltip(key); - if (tooltip != null) { - showDialog( - context: context, - builder: (_) => TooltipDialog(tooltip: tooltip), - ); - } - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - centerTitle: true, - title: Row( - mainAxisSize: MainAxisSize.min, - children: [ - SvgPicture.asset( - 'assets/onesignal_logo.svg', - height: 22, - colorFilter: const ColorFilter.mode( - Colors.white, - BlendMode.srcIn, - ), - ), - const SizedBox(width: 8), - Text( - 'Flutter', - style: Theme.of( - context, - ).textTheme.bodyMedium?.copyWith(color: Colors.white), - ), - ], - ), - ), - body: Column( - children: [ - const LogView(), - Expanded( - child: Semantics( - identifier: 'main_scroll_view', - child: ListView( - padding: const EdgeInsets.only(bottom: 24), - children: [ - const AppSection(), - const UserSection(), - PushSection( - onInfoTap: () => _showTooltipDialog(context, 'push'), - ), - SendPushSection( - onInfoTap: - () => - _showTooltipDialog(context, 'sendPushNotification'), - ), - InAppSection( - onInfoTap: - () => _showTooltipDialog(context, 'inAppMessaging'), - ), - SendIamSection( - onInfoTap: - () => _showTooltipDialog(context, 'sendInAppMessage'), - ), - AliasesSection( - onInfoTap: () => _showTooltipDialog(context, 'aliases'), - ), - EmailsSection( - onInfoTap: () => _showTooltipDialog(context, 'emails'), - ), - SmsSection( - onInfoTap: () => _showTooltipDialog(context, 'sms'), - ), - TagsSection( - onInfoTap: () => _showTooltipDialog(context, 'tags'), - ), - OutcomesSection( - onInfoTap: () => _showTooltipDialog(context, 'outcomes'), - ), - TriggersSection( - onInfoTap: () => _showTooltipDialog(context, 'triggers'), - ), - CustomEventsSection( - onInfoTap: - () => _showTooltipDialog(context, 'customEvents'), - ), - LocationSection( - onInfoTap: () => _showTooltipDialog(context, 'location'), - ), - if (defaultTargetPlatform == TargetPlatform.iOS) - LiveActivitiesSection( - onInfoTap: - () => _showTooltipDialog(context, 'liveActivities'), - ), - const SizedBox(height: 8), - Padding( - padding: const EdgeInsets.symmetric(horizontal: 16), - child: ElevatedButton( - onPressed: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (_) => const SecondaryScreen(), - ), - ); - }, - style: ElevatedButton.styleFrom( - backgroundColor: AppColors.osPrimary, - foregroundColor: Colors.white, - ), - child: const Text('NEXT SCREEN'), - ), - ), - const SizedBox(height: 16), - ], - ), - ), - ), - ], - ), - ); - } -} diff --git a/examples/demo-pods/lib/screens/secondary_screen.dart b/examples/demo-pods/lib/screens/secondary_screen.dart deleted file mode 100644 index d6232e1f..00000000 --- a/examples/demo-pods/lib/screens/secondary_screen.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:flutter/material.dart'; - -class SecondaryScreen extends StatelessWidget { - const SecondaryScreen({super.key}); - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('Secondary Screen'), - centerTitle: true, - ), - body: Center( - child: Text( - 'Secondary Screen', - style: Theme.of(context).textTheme.headlineMedium, - ), - ), - ); - } -} diff --git a/examples/demo-pods/lib/services/log_service.dart b/examples/demo-pods/lib/services/log_service.dart deleted file mode 100644 index 256686dd..00000000 --- a/examples/demo-pods/lib/services/log_service.dart +++ /dev/null @@ -1,50 +0,0 @@ -import 'package:flutter/foundation.dart'; - -class LogEntry { - const LogEntry(this.time, this.message); - - final String time; - final String message; -} - -class LogService { - static const _maxEntries = 100; - - /// Log view entries are kept in memory only, so each launch starts empty. - static final ValueNotifier> entries = ValueNotifier(const []); - - static void info(String message) => _write(message); - - static void show(String message) { - _write(message); - _addToView(message); - } - - static void error(String message) { - _write('ERROR: $message'); - _addToView(message); - } - - static void _write(String message) => debugPrint('[OneSignal] $message'); - - static void _addToView(String message) { - final next = [ - ...entries.value, - LogEntry(_formatTime(DateTime.now()), message), - ]; - entries.value = - next.length > _maxEntries - ? next.sublist(next.length - _maxEntries) - : next; - } - - static void clear() => entries.value = const []; - - static String _formatTime(DateTime date) => [ - date.hour, - date.minute, - date.second, - ].map((part) => part.toString().padLeft(2, '0')).join(':'); - - LogService._(); -} diff --git a/examples/demo-pods/lib/services/onesignal_api_service.dart b/examples/demo-pods/lib/services/onesignal_api_service.dart deleted file mode 100644 index 4568b0e5..00000000 --- a/examples/demo-pods/lib/services/onesignal_api_service.dart +++ /dev/null @@ -1,220 +0,0 @@ -import 'dart:convert'; - -import 'package:flutter/foundation.dart'; -import 'package:flutter_dotenv/flutter_dotenv.dart'; -import 'package:http/http.dart' as http; - -import '../models/notification_type.dart'; -import '../models/user_data.dart'; - -const String _defaultAndroidChannelId = 'b3b015d9-c050-4042-8548-dcc34aa44aa4'; - -String _resolveAndroidChannelId() { - String? envValue; - try { - envValue = dotenv.env['ONESIGNAL_ANDROID_CHANNEL_ID']?.trim(); - } catch (_) { - envValue = null; - } - return (envValue != null && envValue.isNotEmpty) - ? envValue - : _defaultAndroidChannelId; -} - -class OneSignalApiService { - String _appId = ''; - String _apiKey = ''; - - void setAppId(String appId) => _appId = appId; - String get appId => _appId; - - void setApiKey(String apiKey) => _apiKey = apiKey; - bool hasApiKey() => _apiKey.isNotEmpty && _apiKey != 'your_rest_api_key'; - - Future sendNotification( - NotificationType type, - String subscriptionId, - ) async { - final body = { - 'app_id': _appId, - 'include_subscription_ids': [subscriptionId], - 'android_group': 'demo-group', - 'headings': {'en': type.title}, - 'contents': {'en': type.body}, - }; - if (type.bigPicture != null) { - body['big_picture'] = type.bigPicture; - } - if (type.iosAttachments != null) { - body['ios_attachments'] = type.iosAttachments; - } - if (type.iosSound != null) { - body['ios_sound'] = type.iosSound; - } - if (type.useAndroidChannel) { - body['android_channel_id'] = _resolveAndroidChannelId(); - } - - return _postNotification(body); - } - - Future sendCustomNotification( - String title, - String body, - String subscriptionId, - ) async { - final payload = { - 'app_id': _appId, - 'include_subscription_ids': [subscriptionId], - 'android_group': 'demo-group', - 'headings': {'en': title}, - 'contents': {'en': body}, - }; - - return _postNotification(payload); - } - - Future _postNotification(Map payload) async { - const maxAttempts = 5; - int backoffMs(int n) => 2000 * (1 << (n - 1)); - - // Retry while the OneSignal backend hasn't yet indexed the freshly - // created subscription. The /notifications endpoint reports this race in a - // few different shapes, all of which return HTTP 200: - // - {"id":"...","recipients":0} (user just switched, push token not yet attached) - // - {"id":"...","errors":{"invalid_player_ids":[...]}} - // - {"id":"","errors":["All included players are not subscribed"]} - // - {"id":"","errors":[...]} - // Treat any 200 response with no real id, populated errors, or recipients=0 as transient. - for (var attempt = 1; attempt <= maxAttempts; attempt++) { - try { - final response = await http.post( - Uri.parse('https://onesignal.com/api/v1/notifications'), - headers: { - 'Content-Type': 'application/json', - 'Accept': 'application/vnd.onesignal.v1+json', - }, - body: jsonEncode(payload), - ); - - if (response.statusCode < 200 || response.statusCode >= 300) { - debugPrint('Send notification failed: ${response.body}'); - return false; - } - - final decoded = jsonDecode(response.body); - if (_isTransientSendFailure(decoded)) { - if (attempt < maxAttempts) { - await Future.delayed(Duration(milliseconds: backoffMs(attempt))); - continue; - } - debugPrint('Send notification failed: ${response.body}'); - return false; - } - - return true; - } catch (e) { - debugPrint('Send notification error: $e'); - return false; - } - } - - return false; - } - - bool _isTransientSendFailure(dynamic decoded) { - if (decoded is! Map) return false; - final id = decoded['id']; - final errors = decoded['errors']; - final recipients = decoded['recipients']; - final hasErrors = - (errors is List && errors.isNotEmpty) || - (errors is Map && errors.isNotEmpty); - final missingId = id is! String || id.isEmpty; - final zeroRecipients = recipients is num && recipients == 0; - return hasErrors || missingId || zeroRecipients; - } - - Future updateLiveActivity( - String activityId, - Map eventUpdates, - ) async { - try { - final response = await http.post( - Uri.parse( - 'https://api.onesignal.com/apps/$_appId/live_activities/$activityId/notifications', - ), - headers: { - 'Content-Type': 'application/json', - 'Authorization': 'Key $_apiKey', - }, - body: jsonEncode({ - 'event': 'update', - 'event_updates': eventUpdates, - 'name': 'live_activity_update', - 'priority': 10, - }), - ); - - debugPrint( - 'Update live activity response: ${response.statusCode} ${response.body}', - ); - return response.statusCode >= 200 && response.statusCode < 300; - } catch (e) { - debugPrint('Update live activity error: $e'); - return false; - } - } - - Future endLiveActivity(String activityId) async { - try { - final dismissalDate = - DateTime.now().add(const Duration(seconds: 5)).millisecondsSinceEpoch ~/ - 1000; - final response = await http.post( - Uri.parse( - 'https://api.onesignal.com/apps/$_appId/live_activities/$activityId/notifications', - ), - headers: { - 'Content-Type': 'application/json', - 'Authorization': 'Key $_apiKey', - }, - body: jsonEncode({ - 'event': 'end', - 'event_updates': {'message': 'Ended'}, - 'dismissal_date': dismissalDate, - 'name': 'live_activity_end', - }), - ); - - debugPrint( - 'End live activity response: ${response.statusCode} ${response.body}', - ); - return response.statusCode >= 200 && response.statusCode < 300; - } catch (e) { - debugPrint('End live activity error: $e'); - return false; - } - } - - Future fetchUser(String onesignalId) async { - try { - final url = - 'https://api.onesignal.com/apps/$_appId/users/by/onesignal_id/$onesignalId'; - final response = await http.get( - Uri.parse(url), - headers: {'Accept': 'application/json'}, - ); - - if (response.statusCode == 200) { - final json = jsonDecode(response.body) as Map; - return UserData.fromJson(json); - } - debugPrint('Fetch user returned ${response.statusCode}'); - return null; - } catch (e) { - debugPrint('Fetch user error: $e'); - return null; - } - } -} diff --git a/examples/demo-pods/lib/services/preferences_service.dart b/examples/demo-pods/lib/services/preferences_service.dart deleted file mode 100644 index 4df34f7c..00000000 --- a/examples/demo-pods/lib/services/preferences_service.dart +++ /dev/null @@ -1,48 +0,0 @@ -import 'package:shared_preferences/shared_preferences.dart'; - -class PreferencesService { - static const _keyConsentRequired = 'consent_required'; - static const _keyPrivacyConsent = 'privacy_consent'; - static const _keyExternalUserId = 'external_user_id'; - static const _keyLocationShared = 'location_shared'; - static const _keyIamPaused = 'iam_paused'; - static const _keyLanguage = 'language'; - - late final SharedPreferences _prefs; - - Future init() async { - _prefs = await SharedPreferences.getInstance(); - } - - // Consent required - bool get consentRequired => _prefs.getBool(_keyConsentRequired) ?? false; - Future setConsentRequired(bool value) => - _prefs.setBool(_keyConsentRequired, value); - - // Privacy consent - bool get privacyConsent => _prefs.getBool(_keyPrivacyConsent) ?? false; - Future setPrivacyConsent(bool value) => - _prefs.setBool(_keyPrivacyConsent, value); - - // External user ID - String? get externalUserId => _prefs.getString(_keyExternalUserId); - Future setExternalUserId(String? value) { - if (value == null) return _prefs.remove(_keyExternalUserId); - return _prefs.setString(_keyExternalUserId, value); - } - - // Location shared - bool get locationShared => _prefs.getBool(_keyLocationShared) ?? false; - Future setLocationShared(bool value) => - _prefs.setBool(_keyLocationShared, value); - - // In-app messaging paused - bool get iamPaused => _prefs.getBool(_keyIamPaused) ?? false; - Future setIamPaused(bool value) => - _prefs.setBool(_keyIamPaused, value); - - // Language - String get language => _prefs.getString(_keyLanguage) ?? ''; - Future setLanguage(String value) => - _prefs.setString(_keyLanguage, value); -} diff --git a/examples/demo-pods/lib/services/tooltip_helper.dart b/examples/demo-pods/lib/services/tooltip_helper.dart deleted file mode 100644 index 664f8121..00000000 --- a/examples/demo-pods/lib/services/tooltip_helper.dart +++ /dev/null @@ -1,74 +0,0 @@ -import 'dart:convert'; - -import 'package:flutter/foundation.dart'; -import 'package:http/http.dart' as http; - -class TooltipData { - final String title; - final String description; - final List? options; - - const TooltipData({ - required this.title, - required this.description, - this.options, - }); -} - -class TooltipOption { - final String name; - final String description; - - const TooltipOption({required this.name, required this.description}); -} - -class TooltipHelper { - static final TooltipHelper _instance = TooltipHelper._internal(); - factory TooltipHelper() => _instance; - TooltipHelper._internal(); - - Map _tooltips = {}; - bool _initialized = false; - - static const _tooltipUrl = - 'https://raw.githubusercontent.com/OneSignal/sdk-shared/main/demo/tooltip_content.json'; - - Future init() async { - if (_initialized) return; - - try { - final response = await http.get(Uri.parse(_tooltipUrl)); - if (response.statusCode == 200) { - final json = jsonDecode(response.body) as Map; - _tooltips = json.map((key, value) { - final data = value as Map; - List? options; - if (data['options'] != null) { - options = (data['options'] as List).map((o) { - final opt = o as Map; - return TooltipOption( - name: opt['name'] as String? ?? '', - description: opt['description'] as String? ?? '', - ); - }).toList(); - } - return MapEntry( - key, - TooltipData( - title: data['title'] as String? ?? key, - description: data['description'] as String? ?? '', - options: options, - ), - ); - }); - debugPrint('Loaded ${_tooltips.length} tooltips'); - } - } catch (e) { - debugPrint('Failed to load tooltips: $e'); - } - - _initialized = true; - } - - TooltipData? getTooltip(String key) => _tooltips[key]; -} diff --git a/examples/demo-pods/lib/theme.dart b/examples/demo-pods/lib/theme.dart deleted file mode 100644 index ab3491fe..00000000 --- a/examples/demo-pods/lib/theme.dart +++ /dev/null @@ -1,124 +0,0 @@ -import 'package:flutter/material.dart'; - -class AppSpacing { - static const double gap = 8; - static const gapBox = SizedBox(height: gap); - static const cardPadding = EdgeInsets.symmetric(horizontal: 12, vertical: 12); - - AppSpacing._(); -} - -class AppColors { - static const osPrimary = Color(0xFFE54B4D); - static const osSuccess = Color(0xFF34A853); - static const osGrey700 = Color(0xFF616161); - static const osGrey600 = Color(0xFF757575); - static const osGrey500 = Color(0xFF9E9E9E); - static const osLightBackground = Color(0xFFF8F9FA); - static const osCardBackground = Colors.white; - static const osCardBorder = Color(0x1A000000); // rgba(0, 0, 0, 0.1) - static const osDivider = Color(0xFFE8EAED); - static const osWarningBackground = Color(0xFFFFF8E1); - static const osBackdrop = Color(0x8A000000); - static const osLogBackground = Color(0xFF1E1E1E); - static const osLogText = Color(0xFFD4D4D4); - AppColors._(); -} - -class AppTheme { - static ThemeData get light { - return ThemeData( - useMaterial3: true, - colorScheme: ColorScheme.fromSeed( - seedColor: AppColors.osPrimary, - ).copyWith(primary: AppColors.osPrimary), - scaffoldBackgroundColor: AppColors.osLightBackground, - appBarTheme: const AppBarTheme( - backgroundColor: AppColors.osPrimary, - foregroundColor: Colors.white, - elevation: 2, - scrolledUnderElevation: 2, - shadowColor: Colors.black, - ), - cardTheme: CardThemeData( - color: AppColors.osCardBackground, - elevation: 0, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(12), - side: const BorderSide( - color: AppColors.osCardBorder, - width: 2, - ), - ), - margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 6), - ), - elevatedButtonTheme: ElevatedButtonThemeData( - style: ElevatedButton.styleFrom( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), - ), - minimumSize: const Size(double.infinity, 48), - textStyle: const TextStyle(fontWeight: FontWeight.w600), - ), - ), - outlinedButtonTheme: OutlinedButtonThemeData( - style: OutlinedButton.styleFrom( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), - ), - minimumSize: const Size(double.infinity, 48), - textStyle: const TextStyle(fontWeight: FontWeight.w600), - ), - ), - textButtonTheme: TextButtonThemeData( - style: TextButton.styleFrom( - disabledForegroundColor: AppColors.osGrey500, - ), - ), - // Top-anchored: a dialog that moves while open desyncs XCUITest frame - // reporting from the rendered layout. - dialogTheme: const DialogThemeData( - backgroundColor: Colors.white, - alignment: Alignment.topCenter, - ), - dividerColor: AppColors.osDivider, - inputDecorationTheme: InputDecorationTheme( - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(8), - borderSide: const BorderSide(color: AppColors.osGrey700), - ), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(8), - borderSide: const BorderSide(color: AppColors.osGrey700), - ), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.circular(8), - borderSide: const BorderSide(color: AppColors.osPrimary, width: 2), - ), - hintStyle: const TextStyle(color: AppColors.osGrey600), - contentPadding: const EdgeInsets.symmetric( - horizontal: 12, - vertical: 14, - ), - ), - ); - } - - AppTheme._(); -} - -const Duration _toastDuration = Duration(seconds: 3); - -extension AppSnackBar on BuildContext { - void showSnackBar(String message) { - ScaffoldMessenger.of(this) - ..hideCurrentSnackBar() - ..showSnackBar( - SnackBar( - content: Text(message), - duration: _toastDuration, - dismissDirection: DismissDirection.horizontal, - ), - ); - } -} diff --git a/examples/demo-pods/lib/viewmodels/app_viewmodel.dart b/examples/demo-pods/lib/viewmodels/app_viewmodel.dart deleted file mode 100644 index 57ca8ebe..00000000 --- a/examples/demo-pods/lib/viewmodels/app_viewmodel.dart +++ /dev/null @@ -1,632 +0,0 @@ -import 'package:flutter/foundation.dart'; -import 'package:onesignal_flutter/onesignal_flutter.dart'; - -import '../models/in_app_message_type.dart'; -import '../models/notification_type.dart'; -import '../services/log_service.dart'; -import '../services/onesignal_api_service.dart'; -import '../services/preferences_service.dart'; - -List> _mergePairs( - List> prev, - Map next, -) { - final merged = { - for (final e in prev) e.key: e.value, - ...next, - }; - return merged.entries.toList(); -} - -List _mergeUnique(List prev, List next) => - {...prev, ...next}.toList(); - -class AppViewModel extends ChangeNotifier { - final OneSignalApiService _apiService; - final PreferencesService _prefs; - - AppViewModel(this._apiService, this._prefs); - - static const _orderStatuses = [ - { - 'status': 'preparing', - 'message': 'Your order is being prepared', - 'estimatedTime': '15 min', - }, - { - 'status': 'on_the_way', - 'message': 'Driver is heading your way', - 'estimatedTime': '10 min', - }, - {'status': 'delivered', 'message': 'Order delivered!', 'estimatedTime': ''}, - ]; - - // Loading state - bool _isLoading = false; - bool get isLoading => _isLoading; - - // Increments per fetchUserDataFromApi() call so stale results are dropped - // when a newer fetch is already in flight (e.g. cold-start fetch racing the - // user-change observer's fetch right after login). - int _fetchSequence = 0; - - // Last identity pair seen by the User observer. Some native SDK versions - // re-fire the observer on every user model hydration (e.g. after addEmail - // or addTag), so only refetch when the identity actually changes. - String? _observedOnesignalId; - String? _observedExternalId; - - // App state - String _appId = ''; - String get appId => _appId; - - bool _consentRequired = false; - bool get consentRequired => _consentRequired; - - bool _privacyConsentGiven = false; - bool get privacyConsentGiven => _privacyConsentGiven; - - String? _externalUserId; - String? get externalUserId => _externalUserId; - - bool get isLoggedIn => _externalUserId != null; - - String? _oneSignalId; - String? get oneSignalId => _oneSignalId; - - // Push state - String? _pushSubscriptionId; - // The native bridge can hand back an empty string before the subscription - // id is provisioned. Treat that as "no id yet" so the UI's `?? '—'` - // fallback renders the placeholder instead of an empty cell. - String? get pushSubscriptionId => - (_pushSubscriptionId?.isEmpty ?? true) ? null : _pushSubscriptionId; - - bool _pushEnabled = false; - bool get pushEnabled => _pushEnabled; - - bool _hasNotificationPermission = false; - bool get hasNotificationPermission => _hasNotificationPermission; - - String? _pushToken; - - bool get isPushSubscribed => - _pushEnabled && - _hasNotificationPermission && - (_pushToken?.isNotEmpty ?? false); - - // Empty means device default. - String _language = ''; - String get language => _language; - - // IAM state - bool _iamPaused = false; - bool get iamPaused => _iamPaused; - - // Location state - bool _locationShared = false; - bool get locationShared => _locationShared; - - // Live Activity state - String _activityId = 'order-1'; - String get activityId => _activityId; - - String _orderNumber = 'ORD-1234'; - String get orderNumber => _orderNumber; - - int _statusIndex = 0; - - bool _isLaUpdating = false; - bool get isLaUpdating => _isLaUpdating; - - bool get hasApiKey => _apiService.hasApiKey(); - - String get nextStatusLabel { - final nextIndex = (_statusIndex + 1) % _orderStatuses.length; - final status = _orderStatuses[nextIndex]['status']!; - return status.toUpperCase().replaceAll('_', ' '); - } - - // Data lists - List> _aliasesList = []; - List> get aliasesList => - List.unmodifiable(_aliasesList); - - List _emailsList = []; - List get emailsList => List.unmodifiable(_emailsList); - - List _smsNumbersList = []; - List get smsNumbersList => List.unmodifiable(_smsNumbersList); - - List> _tagsList = []; - List> get tagsList => List.unmodifiable(_tagsList); - - List> _triggersList = []; - List> get triggersList => - List.unmodifiable(_triggersList); - - // Initialize - Future loadInitialState(String appId) async { - _appId = appId; - - _consentRequired = _prefs.consentRequired; - _privacyConsentGiven = _prefs.privacyConsent; - _externalUserId = _prefs.externalUserId; - - _iamPaused = _prefs.iamPaused; - _locationShared = _prefs.locationShared; - _language = _prefs.language; - - if (_externalUserId != null) { - OneSignal.login(_externalUserId!); - } - - _pushSubscriptionId = OneSignal.User.pushSubscription.id; - _pushEnabled = OneSignal.User.pushSubscription.optedIn ?? false; - _pushToken = OneSignal.User.pushSubscription.token; - _hasNotificationPermission = OneSignal.Notifications.permission; - - final onesignalId = await OneSignal.User.getOnesignalId(); - _oneSignalId = onesignalId; - _observedOnesignalId ??= onesignalId; - _observedExternalId ??= await OneSignal.User.getExternalId(); - - notifyListeners(); - - if (onesignalId == null) return; - - // fetchUserDataFromApi owns _isLoading + notifyListeners. - await fetchUserDataFromApi(); - } - - // Observers - void setupObservers() { - OneSignal.User.pushSubscription.addObserver((state) { - _pushSubscriptionId = state.current.id; - _pushEnabled = state.current.optedIn; - _pushToken = state.current.token; - - String fmtToken(String? t) { - if (t == null || t.isEmpty) return 'null'; - return t.length > 8 ? '${t.substring(0, 8)}…' : t; - } - - LogService.show( - 'Push subscription changed: ' - 'id=${state.previous.id ?? 'null'} → ${state.current.id ?? 'null'}, ' - 'optedIn=${state.previous.optedIn} → ${state.current.optedIn}, ' - 'token=${fmtToken(state.previous.token)} → ${fmtToken(state.current.token)}', - ); - notifyListeners(); - }); - - OneSignal.Notifications.addPermissionObserver((permission) { - _hasNotificationPermission = permission; - LogService.show('Permission changed: $permission'); - notifyListeners(); - }); - - OneSignal.User.addObserver((state) { - final nextOnesignalId = state.current.onesignalId; - LogService.show( - 'User changed: onesignalId=${nextOnesignalId ?? 'null'}, ' - 'externalId=${state.current.externalId ?? 'null'}', - ); - - final nextExternalId = state.current.externalId; - final identityChanged = - nextOnesignalId != _observedOnesignalId || - nextExternalId != _observedExternalId; - _observedOnesignalId = nextOnesignalId; - _observedExternalId = nextExternalId; - - _oneSignalId = nextOnesignalId; - notifyListeners(); - - if (!identityChanged) return; - - // Drive the post-login fetch from the observer so it runs only once the - // SDK has actually assigned a new onesignalId. Logout clears it to null; - // skip the fetch in that case (logoutUser already clears local lists). - if (nextOnesignalId == null) return; - fetchUserDataFromApi(); - }); - } - - // Fetch user data from API. Owns the isLoading toggle and uses a - // request-sequence guard so stale results are dropped if a newer fetch - // started before this one finishes. - Future fetchUserDataFromApi() async { - final requestId = ++_fetchSequence; - _isLoading = true; - notifyListeners(); - - try { - final onesignalId = await OneSignal.User.getOnesignalId(); - if (onesignalId == null) return; - - final userData = await _apiService.fetchUser(onesignalId); - if (userData == null) return; - - if (_fetchSequence != requestId) return; - - _aliasesList = _mergePairs(_aliasesList, userData.aliases); - _tagsList = _mergePairs(_tagsList, userData.tags); - _emailsList = _mergeUnique(_emailsList, userData.emails); - _smsNumbersList = _mergeUnique(_smsNumbersList, userData.smsNumbers); - - if (userData.externalId != null) { - _externalUserId = userData.externalId; - await _prefs.setExternalUserId(userData.externalId); - } - } catch (e) { - debugPrint('fetchUserDataFromApi error: $e'); - } finally { - if (_fetchSequence == requestId) { - _isLoading = false; - } - notifyListeners(); - } - } - - // Login / Logout - Future loginUser(String externalUserId) async { - _aliasesList = []; - _emailsList = []; - _smsNumbersList = []; - _tagsList = []; - _triggersList = []; - _externalUserId = externalUserId; - _isLoading = true; - notifyListeners(); - - try { - await OneSignal.login(externalUserId); - await _prefs.setExternalUserId(externalUserId); - await _resetLanguagePicker(); - LogService.info('Logged in as: $externalUserId'); - // The User observer runs fetchUserDataFromApi once the new onesignalId - // is assigned; that call clears _isLoading in its finally. - } catch (e) { - LogService.error('Login error: $e'); - _isLoading = false; - notifyListeners(); - } - } - - Future logoutUser() async { - _externalUserId = null; - _aliasesList = []; - _emailsList = []; - _smsNumbersList = []; - _tagsList = []; - _triggersList = []; - notifyListeners(); - - try { - await OneSignal.logout(); - await _prefs.setExternalUserId(null); - await _resetLanguagePicker(); - LogService.info('Logged out'); - } catch (e) { - LogService.error('Logout error: $e'); - } - } - - // Language - // Clears only the cached choice. setLanguage('') would send the device - // language and overwrite the user's backend value. - Future _resetLanguagePicker() async { - _language = ''; - notifyListeners(); - await _prefs.setLanguage(''); - } - - Future setLanguage(String language) async { - _language = language; - notifyListeners(); - - try { - await OneSignal.User.setLanguage(language); - await _prefs.setLanguage(language); - LogService.info( - 'Language set to: ${language.isEmpty ? 'device default' : language}', - ); - } catch (e) { - LogService.error('Set language error: $e'); - } - } - - // Consent - Future setConsentRequired(bool value) async { - _consentRequired = value; - OneSignal.consentRequired(value); - await _prefs.setConsentRequired(value); - if (!value) { - _privacyConsentGiven = false; - await _prefs.setPrivacyConsent(false); - } - notifyListeners(); - } - - Future setPrivacyConsent(bool value) async { - _privacyConsentGiven = value; - OneSignal.consentGiven(value); - await _prefs.setPrivacyConsent(value); - notifyListeners(); - } - - // Push - void togglePush(bool enabled) { - if (enabled) { - OneSignal.User.pushSubscription.optIn(); - } else { - OneSignal.User.pushSubscription.optOut(); - } - _pushEnabled = enabled; - notifyListeners(); - LogService.info('Push ${enabled ? "enabled" : "disabled"}'); - } - - Future promptPush() => OneSignal.Notifications.requestPermission(true); - - // Notifications - Future sendNotification(NotificationType type) async { - final subscriptionId = OneSignal.User.pushSubscription.id; - if (subscriptionId == null) { - LogService.info('No subscription ID for notification'); - return; - } - final success = await _apiService.sendNotification(type, subscriptionId); - if (success) { - LogService.info('Notification sent: ${type.name}'); - } else { - LogService.info('Failed to send notification'); - } - } - - Future sendCustomNotification(String title, String body) async { - final subscriptionId = OneSignal.User.pushSubscription.id; - if (subscriptionId == null) { - LogService.info('No subscription ID for custom notification'); - return; - } - final success = await _apiService.sendCustomNotification( - title, - body, - subscriptionId, - ); - if (success) { - LogService.info('Custom notification sent'); - } else { - LogService.info('Failed to send notification'); - } - } - - void clearAllNotifications() { - OneSignal.Notifications.clearAll(); - LogService.info('All notifications cleared'); - } - - // IAM - Future setIamPaused(bool paused) async { - _iamPaused = paused; - OneSignal.InAppMessages.paused(paused); - await _prefs.setIamPaused(paused); - notifyListeners(); - } - - void sendInAppMessage(InAppMessageType type) { - OneSignal.InAppMessages.addTrigger('iam_type', type.triggerValue); - _triggersList = _mergePairs(_triggersList, {'iam_type': type.triggerValue}); - notifyListeners(); - LogService.info('Sent In-App Message: ${type.label}'); - } - - // Aliases - void addAlias(String label, String id) { - OneSignal.User.addAlias(label, id); - _aliasesList = _mergePairs(_aliasesList, {label: id}); - notifyListeners(); - LogService.info('Alias added: $label'); - } - - void addAliases(Map aliases) { - OneSignal.User.addAliases(aliases); - _aliasesList = _mergePairs(_aliasesList, aliases); - notifyListeners(); - LogService.info('${aliases.length} alias(es) added'); - } - - // Emails - void addEmail(String email) { - OneSignal.User.addEmail(email); - _emailsList = _mergeUnique(_emailsList, [email]); - notifyListeners(); - LogService.info('Email added: $email'); - } - - void removeEmail(String email) { - OneSignal.User.removeEmail(email); - _emailsList = List.from(_emailsList)..remove(email); - notifyListeners(); - LogService.info('Email removed: $email'); - } - - // SMS - void addSms(String smsNumber) { - OneSignal.User.addSms(smsNumber); - _smsNumbersList = _mergeUnique(_smsNumbersList, [smsNumber]); - notifyListeners(); - LogService.info('SMS added: $smsNumber'); - } - - void removeSms(String smsNumber) { - OneSignal.User.removeSms(smsNumber); - _smsNumbersList = List.from(_smsNumbersList)..remove(smsNumber); - notifyListeners(); - LogService.info('SMS removed: $smsNumber'); - } - - // Tags - void addTag(String key, String value) { - OneSignal.User.addTagWithKey(key, value); - _tagsList = _mergePairs(_tagsList, {key: value}); - notifyListeners(); - LogService.info('Tag added: $key'); - } - - void addTags(Map tags) { - OneSignal.User.addTags(tags); - _tagsList = _mergePairs(_tagsList, tags); - notifyListeners(); - LogService.info('${tags.length} tag(s) added'); - } - - void removeTag(String key) { - OneSignal.User.removeTag(key); - _tagsList = List.from(_tagsList)..removeWhere((e) => e.key == key); - notifyListeners(); - LogService.info('Tag removed: $key'); - } - - void removeSelectedTags(List keys) { - OneSignal.User.removeTags(keys); - _tagsList = List.from(_tagsList)..removeWhere((e) => keys.contains(e.key)); - notifyListeners(); - LogService.info('${keys.length} tag(s) removed'); - } - - // Triggers (in-memory only) - void addTrigger(String key, String value) { - OneSignal.InAppMessages.addTrigger(key, value); - _triggersList = _mergePairs(_triggersList, {key: value}); - notifyListeners(); - LogService.info('Trigger added: $key'); - } - - void addTriggers(Map triggers) { - OneSignal.InAppMessages.addTriggers(triggers); - _triggersList = _mergePairs(_triggersList, triggers); - notifyListeners(); - LogService.info('${triggers.length} trigger(s) added'); - } - - void removeTrigger(String key) { - OneSignal.InAppMessages.removeTrigger(key); - _triggersList = List.from(_triggersList)..removeWhere((e) => e.key == key); - notifyListeners(); - LogService.info('Trigger removed: $key'); - } - - void removeSelectedTriggers(List keys) { - OneSignal.InAppMessages.removeTriggers(keys); - _triggersList = List.from(_triggersList) - ..removeWhere((e) => keys.contains(e.key)); - notifyListeners(); - LogService.info('${keys.length} trigger(s) removed'); - } - - void clearAllTriggers() { - OneSignal.InAppMessages.clearTriggers(); - _triggersList = []; - notifyListeners(); - LogService.info('All triggers cleared'); - } - - // Outcomes - void sendOutcome(String name) { - OneSignal.Session.addOutcome(name); - LogService.info('Outcome sent: $name'); - } - - void sendUniqueOutcome(String name) { - OneSignal.Session.addUniqueOutcome(name); - LogService.info('Unique outcome sent: $name'); - } - - void sendOutcomeWithValue(String name, double value) { - OneSignal.Session.addOutcomeWithValue(name, value); - LogService.info('Outcome sent: $name = $value'); - } - - // Custom Events - void trackEvent(String name, Map? properties) { - OneSignal.User.trackEvent(name, properties); - LogService.info('Event tracked: $name'); - } - - // Live Activities - void setActivityId(String id) { - _activityId = id; - notifyListeners(); - } - - void setOrderNumber(String number) { - _orderNumber = number; - notifyListeners(); - } - - Future startLiveActivity() async { - final attributes = {'orderNumber': _orderNumber}; - final content = Map.from(_orderStatuses[0]); - _statusIndex = 0; - await OneSignal.LiveActivities.startDefault( - _activityId, - attributes, - content, - ); - notifyListeners(); - LogService.info('Started Live Activity: $_activityId'); - } - - Future updateLiveActivity() async { - _isLaUpdating = true; - notifyListeners(); - - final nextIndex = (_statusIndex + 1) % _orderStatuses.length; - final content = Map.from(_orderStatuses[nextIndex]); - final eventUpdates = {'data': content}; - final success = await _apiService.updateLiveActivity( - _activityId, - eventUpdates, - ); - - _isLaUpdating = false; - if (success) { - _statusIndex = nextIndex; - LogService.info('Updated Live Activity: $_activityId'); - } else { - LogService.info('Failed to update Live Activity'); - } - notifyListeners(); - } - - Future endLiveActivity() async { - final success = await _apiService.endLiveActivity(_activityId); - if (success) { - _statusIndex = 0; - LogService.info('Ended Live Activity: $_activityId'); - } else { - LogService.info('Failed to end Live Activity'); - } - notifyListeners(); - } - - // Location - Future setLocationShared(bool shared) async { - _locationShared = shared; - OneSignal.Location.setShared(shared); - await _prefs.setLocationShared(shared); - notifyListeners(); - LogService.info('Location sharing ${shared ? "enabled" : "disabled"}'); - } - - void promptLocation() { - OneSignal.Location.requestPermission(); - } - - Future checkLocationShared() async { - return await OneSignal.Location.isShared(); - } -} diff --git a/examples/demo-pods/lib/widgets/action_button.dart b/examples/demo-pods/lib/widgets/action_button.dart deleted file mode 100644 index 1a7f6bf7..00000000 --- a/examples/demo-pods/lib/widgets/action_button.dart +++ /dev/null @@ -1,112 +0,0 @@ -import 'package:flutter/material.dart'; - -import '../theme.dart'; - -class PrimaryButton extends StatelessWidget { - final String label; - final VoidCallback? onPressed; - final IconData? icon; - final String? semanticsLabel; - final EdgeInsetsGeometry? padding; - - const PrimaryButton({ - super.key, - required this.label, - this.onPressed, - this.icon, - this.semanticsLabel, - this.padding, - }); - - @override - Widget build(BuildContext context) { - Widget button = SizedBox( - width: double.infinity, - child: ElevatedButton( - onPressed: onPressed, - style: ElevatedButton.styleFrom( - backgroundColor: AppColors.osPrimary, - foregroundColor: Colors.white, - padding: padding, - ), - child: FittedBox( - fit: BoxFit.scaleDown, - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - if (icon != null) ...[ - Icon(icon, size: 18), - const SizedBox(width: 8), - ], - Text(label), - ], - ), - ), - ), - ); - if (semanticsLabel != null) { - button = Semantics(identifier: semanticsLabel, container: true, child: button); - } - return button; - } -} - -class DestructiveButton extends StatelessWidget { - final String label; - final VoidCallback? onPressed; - final String? semanticsLabel; - - const DestructiveButton({ - super.key, - required this.label, - this.onPressed, - this.semanticsLabel, - }); - - @override - Widget build(BuildContext context) { - Widget button = SizedBox( - width: double.infinity, - child: OutlinedButton( - onPressed: onPressed, - style: OutlinedButton.styleFrom( - foregroundColor: AppColors.osPrimary, - side: const BorderSide(color: AppColors.osPrimary), - ), - child: FittedBox(fit: BoxFit.scaleDown, child: Text(label)), - ), - ); - if (semanticsLabel != null) { - button = Semantics(identifier: semanticsLabel, container: true, child: button); - } - return button; - } -} - -/// Lays out buttons two per row in equal columns; an odd last button spans -/// both. Callers omit hidden buttons from [children] so the rest reflow. -class ButtonGrid extends StatelessWidget { - final List children; - - const ButtonGrid({super.key, required this.children}); - - @override - Widget build(BuildContext context) { - return Column( - spacing: AppSpacing.gap, - children: [ - for (var i = 0; i < children.length; i += 2) - if (i == children.length - 1) - children[i] - else - Row( - spacing: AppSpacing.gap, - children: [ - Expanded(child: children[i]), - Expanded(child: children[i + 1]), - ], - ), - ], - ); - } -} diff --git a/examples/demo-pods/lib/widgets/app_text_field.dart b/examples/demo-pods/lib/widgets/app_text_field.dart deleted file mode 100644 index 1e541f52..00000000 --- a/examples/demo-pods/lib/widgets/app_text_field.dart +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:flutter/material.dart'; - -class AppTextField extends TextField { - const AppTextField({ - super.key, - super.controller, - super.decoration, - super.keyboardType, - super.onChanged, - super.textAlign, - super.style, - super.maxLines, - super.autocorrect = false, - super.enableSuggestions = false, - super.smartQuotesType = SmartQuotesType.disabled, - super.smartDashesType = SmartDashesType.disabled, - }); -} diff --git a/examples/demo-pods/lib/widgets/dialogs.dart b/examples/demo-pods/lib/widgets/dialogs.dart deleted file mode 100644 index 78bcc7e7..00000000 --- a/examples/demo-pods/lib/widgets/dialogs.dart +++ /dev/null @@ -1,786 +0,0 @@ -import 'dart:convert'; - -import 'package:flutter/material.dart'; - -import '../services/tooltip_helper.dart'; -import '../theme.dart'; -import 'app_text_field.dart'; - -/// Dialog doesn't apply the top safe area, so top-anchored dialogs add it. -EdgeInsets dialogInsets(BuildContext context) => - EdgeInsets.fromLTRB(16, MediaQuery.paddingOf(context).top + 24, 16, 24); - -// Single input dialog (login, email, sms) -class SingleInputDialog extends StatefulWidget { - final String title; - final String fieldLabel; - final String confirmLabel; - final TextInputType keyboardType; - final String? semanticsLabel; - - const SingleInputDialog({ - super.key, - required this.title, - required this.fieldLabel, - this.confirmLabel = 'Add', - this.keyboardType = TextInputType.text, - this.semanticsLabel, - }); - - @override - State createState() => _SingleInputDialogState(); -} - -class _SingleInputDialogState extends State { - final _controller = TextEditingController(); - - @override - void dispose() { - _controller.dispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return AlertDialog( - insetPadding: dialogInsets(context), - title: Text(widget.title), - content: SizedBox( - width: double.maxFinite, - child: Semantics( - identifier: widget.semanticsLabel ?? '${widget.fieldLabel}_input', - container: true, - child: AppTextField( - controller: _controller, - decoration: InputDecoration(labelText: widget.fieldLabel), - keyboardType: widget.keyboardType, - onChanged: (_) => setState(() {}), - ), - ), - ), - actions: [ - TextButton( - onPressed: () => Navigator.pop(context), - child: const Text('Cancel'), - ), - Semantics( - identifier: 'singleinput_confirm_button', - container: true, - button: true, - child: TextButton( - onPressed: _controller.text.isEmpty - ? null - : () => Navigator.pop(context, _controller.text), - child: Text(widget.confirmLabel), - ), - ), - ], - ); - } -} - -// Key-value pair input dialog (single pair) -class PairInputDialog extends StatefulWidget { - final String title; - final String keyLabel; - final String valueLabel; - final String? keySemanticsLabel; - final String? valueSemanticsLabel; - - const PairInputDialog({ - super.key, - required this.title, - this.keyLabel = 'Key', - this.valueLabel = 'Value', - this.keySemanticsLabel, - this.valueSemanticsLabel, - }); - - @override - State createState() => _PairInputDialogState(); -} - -class _PairInputDialogState extends State { - final _keyController = TextEditingController(); - final _valueController = TextEditingController(); - - @override - void dispose() { - _keyController.dispose(); - _valueController.dispose(); - super.dispose(); - } - - bool get _isValid => - _keyController.text.isNotEmpty && _valueController.text.isNotEmpty; - - @override - Widget build(BuildContext context) { - return AlertDialog( - insetPadding: dialogInsets(context), - title: Text(widget.title), - content: SizedBox( - width: double.maxFinite, - child: Row( - children: [ - Expanded( - child: Semantics( - identifier: widget.keySemanticsLabel ?? '${widget.keyLabel}_input', - container: true, - child: AppTextField( - controller: _keyController, - decoration: InputDecoration(labelText: widget.keyLabel), - onChanged: (_) => setState(() {}), - ), - ), - ), - const SizedBox(width: 12), - Expanded( - child: Semantics( - identifier: widget.valueSemanticsLabel ?? '${widget.valueLabel}_input', - container: true, - child: AppTextField( - controller: _valueController, - decoration: InputDecoration(labelText: widget.valueLabel), - onChanged: (_) => setState(() {}), - ), - ), - ), - ], - ), - ), - actions: [ - TextButton( - onPressed: () => Navigator.pop(context), - child: const Text('Cancel'), - ), - Semantics( - identifier: 'singlepair_confirm_button', - container: true, - button: true, - child: TextButton( - onPressed: _isValid - ? () => Navigator.pop( - context, - MapEntry(_keyController.text, _valueController.text), - ) - : null, - child: const Text('Add'), - ), - ), - ], - ); - } -} - -// Multi-pair input dialog (dynamic rows) -class MultiPairInputDialog extends StatefulWidget { - final String title; - final String keyLabel; - final String valueLabel; - - const MultiPairInputDialog({ - super.key, - required this.title, - this.keyLabel = 'Key', - this.valueLabel = 'Value', - }); - - @override - State createState() => _MultiPairInputDialogState(); -} - -class _MultiPairInputDialogState extends State { - final List _keyControllers = []; - final List _valueControllers = []; - - @override - void initState() { - super.initState(); - _addRow(); - } - - @override - void dispose() { - for (final c in _keyControllers) { - c.dispose(); - } - for (final c in _valueControllers) { - c.dispose(); - } - super.dispose(); - } - - void _addRow() { - final keyC = TextEditingController(); - final valC = TextEditingController(); - keyC.addListener(() => setState(() {})); - valC.addListener(() => setState(() {})); - _keyControllers.add(keyC); - _valueControllers.add(valC); - setState(() {}); - } - - void _removeRow(int index) { - _keyControllers[index].dispose(); - _valueControllers[index].dispose(); - _keyControllers.removeAt(index); - _valueControllers.removeAt(index); - setState(() {}); - } - - bool get _allValid { - for (var i = 0; i < _keyControllers.length; i++) { - if (_keyControllers[i].text.isEmpty || - _valueControllers[i].text.isEmpty) { - return false; - } - } - return _keyControllers.isNotEmpty; - } - - @override - Widget build(BuildContext context) { - return AlertDialog( - insetPadding: dialogInsets(context), - title: Text(widget.title), - content: SizedBox( - width: double.maxFinite, - child: SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - for (var i = 0; i < _keyControllers.length; i++) ...[ - if (i > 0) const Divider(), - Row( - children: [ - Expanded( - child: Semantics( - identifier: 'multipair_key_$i', - container: true, - child: AppTextField( - controller: _keyControllers[i], - decoration: InputDecoration( - labelText: widget.keyLabel, - isDense: true, - ), - ), - ), - ), - const SizedBox(width: 8), - Expanded( - child: Semantics( - identifier: 'multipair_value_$i', - container: true, - child: AppTextField( - controller: _valueControllers[i], - decoration: InputDecoration( - labelText: widget.valueLabel, - isDense: true, - ), - ), - ), - ), - if (_keyControllers.length > 1) - IconButton( - icon: const Icon(Icons.close, size: 20), - onPressed: () => _removeRow(i), - ), - ], - ), - ], - Semantics( - identifier: 'multipair_add_row_button', - container: true, - button: true, - child: TextButton.icon( - onPressed: _addRow, - icon: const Icon(Icons.add, size: 18), - label: const Text('Add Row'), - ), - ), - ], - ), - ), - ), - actions: [ - TextButton( - onPressed: () => Navigator.pop(context), - child: const Text('Cancel'), - ), - Semantics( - identifier: 'multipair_confirm_button', - container: true, - button: true, - child: TextButton( - onPressed: _allValid - ? () { - final pairs = {}; - for (var i = 0; i < _keyControllers.length; i++) { - pairs[_keyControllers[i].text] = - _valueControllers[i].text; - } - Navigator.pop(context, pairs); - } - : null, - child: const Text('Add All'), - ), - ), - ], - ); - } -} - -// Multi-select remove dialog -class MultiSelectRemoveDialog extends StatefulWidget { - final String title; - final List> items; - - const MultiSelectRemoveDialog({ - super.key, - required this.title, - required this.items, - }); - - @override - State createState() => - _MultiSelectRemoveDialogState(); -} - -class _MultiSelectRemoveDialogState extends State { - final Set _selected = {}; - - @override - Widget build(BuildContext context) { - return AlertDialog( - insetPadding: dialogInsets(context), - title: Text(widget.title), - content: SizedBox( - width: double.maxFinite, - child: SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.min, - children: widget.items.map((item) { - return Semantics( - identifier: 'remove_checkbox_${item.key}', - container: true, - child: CheckboxListTile( - title: Text(item.key), - value: _selected.contains(item.key), - controlAffinity: ListTileControlAffinity.leading, - onChanged: (checked) { - setState(() { - if (checked == true) { - _selected.add(item.key); - } else { - _selected.remove(item.key); - } - }); - }, - contentPadding: EdgeInsets.zero, - ), - ); - }).toList(), - ), - ), - ), - actions: [ - TextButton( - onPressed: () => Navigator.pop(context), - child: const Text('Cancel'), - ), - Semantics( - identifier: 'multiselect_confirm_button', - container: true, - button: true, - child: TextButton( - onPressed: _selected.isEmpty - ? null - : () => Navigator.pop(context, _selected.toList()), - child: Text('Remove (${_selected.length})'), - ), - ), - ], - ); - } -} - -// Outcome dialog -class OutcomeDialog extends StatefulWidget { - const OutcomeDialog({super.key}); - - @override - State createState() => _OutcomeDialogState(); -} - -enum OutcomeType { normal, unique, withValue } - -class _OutcomeDialogState extends State { - final _nameController = TextEditingController(); - final _valueController = TextEditingController(); - OutcomeType _type = OutcomeType.normal; - - @override - void dispose() { - _nameController.dispose(); - _valueController.dispose(); - super.dispose(); - } - - bool get _isValid { - if (_nameController.text.isEmpty) return false; - if (_type == OutcomeType.withValue) { - return double.tryParse(_valueController.text) != null; - } - return true; - } - - @override - Widget build(BuildContext context) { - return AlertDialog( - insetPadding: dialogInsets(context), - title: const Text('Send Outcome'), - content: SizedBox( - width: double.maxFinite, - child: SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - RadioGroup( - groupValue: _type, - onChanged: (v) => setState(() { if (v != null) _type = v; }), - child: Column( - children: [ - Semantics( - identifier: 'outcome_type_normal_radio', - container: true, - button: true, - child: RadioListTile( - title: const Text('Normal Outcome'), - value: OutcomeType.normal, - contentPadding: EdgeInsets.zero, - ), - ), - Semantics( - identifier: 'outcome_type_unique_radio', - container: true, - button: true, - child: RadioListTile( - title: const Text('Unique Outcome'), - value: OutcomeType.unique, - contentPadding: EdgeInsets.zero, - ), - ), - Semantics( - identifier: 'outcome_type_value_radio', - container: true, - button: true, - child: RadioListTile( - title: const Text('Outcome with Value'), - value: OutcomeType.withValue, - contentPadding: EdgeInsets.zero, - ), - ), - ], - ), - ), - const SizedBox(height: 8), - Semantics( - identifier: 'outcome_name_input', - container: true, - child: AppTextField( - controller: _nameController, - decoration: const InputDecoration(labelText: 'Outcome Name'), - onChanged: (_) => setState(() {}), - ), - ), - if (_type == OutcomeType.withValue) ...[ - const SizedBox(height: 12), - Semantics( - identifier: 'outcome_value_input', - container: true, - child: AppTextField( - controller: _valueController, - decoration: const InputDecoration(labelText: 'Value'), - keyboardType: - const TextInputType.numberWithOptions(decimal: true), - onChanged: (_) => setState(() {}), - ), - ), - ], - ], - ), - ), - ), - actions: [ - TextButton( - onPressed: () => Navigator.pop(context), - child: const Text('Cancel'), - ), - Semantics( - identifier: 'outcome_send_button', - container: true, - child: TextButton( - onPressed: _isValid - ? () { - Navigator.pop(context, { - 'type': _type, - 'name': _nameController.text, - 'value': _type == OutcomeType.withValue - ? double.parse(_valueController.text) - : null, - }); - } - : null, - child: const Text('Send'), - ), - ), - ], - ); - } -} - -// Track event dialog -class TrackEventDialog extends StatefulWidget { - const TrackEventDialog({super.key}); - - @override - State createState() => _TrackEventDialogState(); -} - -class _TrackEventDialogState extends State { - final _nameController = TextEditingController(); - final _propsController = TextEditingController(); - String? _jsonError; - - @override - void dispose() { - _nameController.dispose(); - _propsController.dispose(); - super.dispose(); - } - - bool get _isValid { - if (_nameController.text.isEmpty) return false; - if (_propsController.text.isNotEmpty && _jsonError != null) return false; - return true; - } - - void _validateJson(String text) { - setState(() { - if (text.isEmpty) { - _jsonError = null; - } else { - try { - jsonDecode(text); - _jsonError = null; - } catch (_) { - _jsonError = 'Invalid JSON format'; - } - } - }); - } - - @override - Widget build(BuildContext context) { - return AlertDialog( - insetPadding: dialogInsets(context), - title: const Text('Custom Event'), - content: SizedBox( - width: double.maxFinite, - child: SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Semantics( - identifier: 'event_name_input', - container: true, - child: AppTextField( - controller: _nameController, - decoration: const InputDecoration(labelText: 'Event Name'), - onChanged: (_) => setState(() {}), - ), - ), - const SizedBox(height: 12), - Semantics( - identifier: 'event_properties_input', - container: true, - child: AppTextField( - controller: _propsController, - decoration: InputDecoration( - labelText: 'Properties (optional, JSON)', - hintText: '{"key": "value"}', - errorText: _jsonError, - ), - maxLines: 3, - onChanged: _validateJson, - ), - ), - ], - ), - ), - ), - actions: [ - TextButton( - onPressed: () => Navigator.pop(context), - child: const Text('Cancel'), - ), - Semantics( - identifier: 'event_track_button', - container: true, - child: TextButton( - onPressed: _isValid - ? () { - Map? props; - if (_propsController.text.isNotEmpty) { - props = jsonDecode(_propsController.text) - as Map; - } - Navigator.pop(context, { - 'name': _nameController.text, - 'properties': props, - }); - } - : null, - child: const Text('Track'), - ), - ), - ], - ); - } -} - -// Custom notification dialog -class CustomNotificationDialog extends StatefulWidget { - const CustomNotificationDialog({super.key}); - - @override - State createState() => - _CustomNotificationDialogState(); -} - -class _CustomNotificationDialogState extends State { - final _titleController = TextEditingController(); - final _bodyController = TextEditingController(); - - @override - void dispose() { - _titleController.dispose(); - _bodyController.dispose(); - super.dispose(); - } - - bool get _isValid => - _titleController.text.isNotEmpty && _bodyController.text.isNotEmpty; - - @override - Widget build(BuildContext context) { - return AlertDialog( - insetPadding: dialogInsets(context), - title: const Text('Custom Notification'), - content: SizedBox( - width: double.maxFinite, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - AppTextField( - controller: _titleController, - decoration: const InputDecoration(labelText: 'Title'), - onChanged: (_) => setState(() {}), - ), - const SizedBox(height: 12), - AppTextField( - controller: _bodyController, - decoration: const InputDecoration(labelText: 'Body'), - onChanged: (_) => setState(() {}), - ), - ], - ), - ), - actions: [ - TextButton( - onPressed: () => Navigator.pop(context), - child: const Text('Cancel'), - ), - TextButton( - onPressed: _isValid - ? () => Navigator.pop(context, { - 'title': _titleController.text, - 'body': _bodyController.text, - }) - : null, - child: const Text('Send'), - ), - ], - ); - } -} - -// Tooltip dialog -class TooltipDialog extends StatelessWidget { - final TooltipData tooltip; - - const TooltipDialog({super.key, required this.tooltip}); - - @override - Widget build(BuildContext context) { - return AlertDialog( - insetPadding: dialogInsets(context), - title: Semantics( - identifier: 'tooltip_title', - container: true, - child: Text(tooltip.title), - ), - content: SizedBox( - width: double.maxFinite, - child: SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Semantics( - identifier: 'tooltip_description', - container: true, - child: Text(tooltip.description), - ), - if (tooltip.options != null && tooltip.options!.isNotEmpty) ...[ - const SizedBox(height: 16), - ...tooltip.options!.map((option) => Padding( - padding: const EdgeInsets.only(bottom: 8), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - option.name, - style: Theme.of(context).textTheme.bodyMedium?.copyWith( - fontWeight: FontWeight.bold, - ), - ), - Text( - option.description, - style: Theme.of(context).textTheme.bodySmall?.copyWith( - color: AppColors.osGrey600, - ), - ), - ], - ), - )), - ], - ], - ), - ), - ), - actions: [ - Semantics( - identifier: 'tooltip_ok_button', - container: true, - button: true, - child: TextButton( - onPressed: () => Navigator.pop(context), - child: const Text('OK'), - ), - ), - ], - ); - } -} diff --git a/examples/demo-pods/lib/widgets/list_widgets.dart b/examples/demo-pods/lib/widgets/list_widgets.dart deleted file mode 100644 index aa8686b5..00000000 --- a/examples/demo-pods/lib/widgets/list_widgets.dart +++ /dev/null @@ -1,272 +0,0 @@ -import 'package:flutter/material.dart'; - -import '../theme.dart'; - -class PairItem extends StatelessWidget { - final String sectionKey; - final String keyText; - final String valueText; - final VoidCallback? onDelete; - - const PairItem({ - super.key, - required this.sectionKey, - required this.keyText, - required this.valueText, - this.onDelete, - }); - - @override - Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 4), - child: Row( - children: [ - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Semantics( - identifier: '${sectionKey}_pair_key_$keyText', - container: true, - child: Text( - keyText, - style: Theme.of(context).textTheme.bodyMedium, - ), - ), - Semantics( - identifier: '${sectionKey}_pair_value_$keyText', - container: true, - child: Text( - valueText, - style: Theme.of( - context, - ).textTheme.bodySmall?.copyWith(color: AppColors.osGrey600), - ), - ), - ], - ), - ), - if (onDelete != null) - Semantics( - identifier: '${sectionKey}_remove_$keyText', - container: true, - child: GestureDetector( - onTap: onDelete, - child: Icon(Icons.close, size: 18, color: AppColors.osPrimary), - ), - ), - ], - ), - ); - } -} - -class SingleItem extends StatelessWidget { - final String sectionKey; - final String text; - final VoidCallback? onDelete; - - const SingleItem({ - super.key, - required this.sectionKey, - required this.text, - this.onDelete, - }); - - @override - Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 4), - child: Row( - children: [ - Expanded( - child: Semantics( - identifier: '${sectionKey}_value_$text', - container: true, - child: Text(text, style: Theme.of(context).textTheme.bodyMedium), - ), - ), - if (onDelete != null) - Semantics( - identifier: '${sectionKey}_remove_$text', - container: true, - child: GestureDetector( - onTap: onDelete, - child: Icon(Icons.close, size: 18, color: AppColors.osPrimary), - ), - ), - ], - ), - ); - } -} - -class EmptyState extends StatelessWidget { - final String text; - final String? sectionKey; - - const EmptyState({super.key, required this.text, this.sectionKey}); - - @override - Widget build(BuildContext context) { - final label = Text( - text, - style: Theme.of( - context, - ).textTheme.bodyMedium?.copyWith(color: AppColors.osGrey600), - ); - return Padding( - padding: const EdgeInsets.symmetric(vertical: 12), - child: Center( - child: sectionKey == null - ? label - : Semantics( - identifier: '${sectionKey}_empty', - container: true, - child: label, - ), - ), - ); - } -} - -class LoadingState extends StatelessWidget { - final String? sectionKey; - - const LoadingState({super.key, this.sectionKey}); - - @override - Widget build(BuildContext context) { - final indicator = SizedBox( - width: 20, - height: 20, - child: CircularProgressIndicator( - strokeWidth: 2, - color: AppColors.osPrimary, - ), - ); - return Padding( - padding: const EdgeInsets.symmetric(vertical: 12), - child: Center( - child: - sectionKey == null - ? indicator - : Semantics( - identifier: '${sectionKey}_loading', - container: true, - child: indicator, - ), - ), - ); - } -} - -class PairList extends StatelessWidget { - final String sectionKey; - final List> items; - final String emptyText; - final bool loading; - final void Function(String key)? onDelete; - - const PairList({ - super.key, - required this.sectionKey, - required this.items, - required this.emptyText, - this.loading = false, - this.onDelete, - }); - - @override - Widget build(BuildContext context) { - if (items.isEmpty) { - return loading - ? LoadingState(sectionKey: sectionKey) - : EmptyState(text: emptyText, sectionKey: sectionKey); - } - - return Column( - children: [ - for (var i = 0; i < items.length; i++) ...[ - PairItem( - key: ValueKey('${items[i].key}_${items[i].value}'), - sectionKey: sectionKey, - keyText: items[i].key, - valueText: items[i].value, - onDelete: onDelete != null ? () => onDelete!(items[i].key) : null, - ), - if (i < items.length - 1) const Divider(height: 1), - ], - ], - ); - } -} - -class CollapsibleList extends StatefulWidget { - final String sectionKey; - final List items; - final String emptyText; - final void Function(String item) onDelete; - final int maxVisible; - final bool loading; - - const CollapsibleList({ - super.key, - required this.sectionKey, - required this.items, - required this.emptyText, - required this.onDelete, - this.maxVisible = 5, - this.loading = false, - }); - - @override - State createState() => _CollapsibleListState(); -} - -class _CollapsibleListState extends State { - bool _expanded = false; - - @override - Widget build(BuildContext context) { - if (widget.items.isEmpty) { - return widget.loading - ? LoadingState(sectionKey: widget.sectionKey) - : EmptyState(text: widget.emptyText, sectionKey: widget.sectionKey); - } - - final showAll = _expanded || widget.items.length <= widget.maxVisible; - final visibleItems = - showAll ? widget.items : widget.items.take(widget.maxVisible).toList(); - final remaining = widget.items.length - widget.maxVisible; - - return Column( - children: [ - for (var i = 0; i < visibleItems.length; i++) ...[ - SingleItem( - key: ValueKey(visibleItems[i]), - sectionKey: widget.sectionKey, - text: visibleItems[i], - onDelete: () => widget.onDelete(visibleItems[i]), - ), - if (i < visibleItems.length - 1) const Divider(height: 1), - ], - if (!showAll && remaining > 0) - GestureDetector( - onTap: () => setState(() => _expanded = true), - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 4), - child: Text( - '$remaining more', - style: TextStyle( - color: Theme.of(context).colorScheme.primary, - fontWeight: FontWeight.w500, - ), - ), - ), - ), - ], - ); - } -} diff --git a/examples/demo-pods/lib/widgets/log_view.dart b/examples/demo-pods/lib/widgets/log_view.dart deleted file mode 100644 index 3891a192..00000000 --- a/examples/demo-pods/lib/widgets/log_view.dart +++ /dev/null @@ -1,191 +0,0 @@ -import 'package:flutter/material.dart'; - -import '../services/log_service.dart'; -import '../theme.dart'; - -const _monospace = 'monospace'; -const _entryFontSize = 8.0; - -class LogView extends StatefulWidget { - const LogView({super.key}); - - @override - State createState() => _LogViewState(); -} - -class _LogViewState extends State { - final _scrollController = ScrollController(); - bool _collapsed = false; - - @override - void initState() { - super.initState(); - LogService.entries.addListener(_onEntriesChanged); - } - - @override - void dispose() { - LogService.entries.removeListener(_onEntriesChanged); - _scrollController.dispose(); - super.dispose(); - } - - // Keep following new entries only while the reader is already at the end. - void _onEntriesChanged() { - final atEnd = - !_scrollController.hasClients || - _scrollController.position.extentAfter < _entryFontSize * 2; - if (atEnd) _scrollToEnd(); - } - - void _scrollToEnd() { - WidgetsBinding.instance.addPostFrameCallback((_) { - if (!mounted || !_scrollController.hasClients) return; - _scrollController.jumpTo(_scrollController.position.maxScrollExtent); - }); - } - - void _toggle() { - setState(() => _collapsed = !_collapsed); - if (!_collapsed) _scrollToEnd(); - } - - @override - Widget build(BuildContext context) { - return Semantics( - identifier: 'log_view', - container: true, - child: ColoredBox( - color: AppColors.osLogBackground, - child: ValueListenableBuilder>( - valueListenable: LogService.entries, - builder: - (context, logs, _) => Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - _buildHeader(logs.length), - if (!_collapsed) _buildBody(logs), - ], - ), - ), - ), - ); - } - - Widget _buildHeader(int count) { - return SizedBox( - height: 24, - child: Padding( - padding: const EdgeInsets.only(left: 16, right: 9), - child: Row( - children: [ - Expanded( - child: Text( - 'LOGS ($count)', - style: const TextStyle( - color: AppColors.osGrey500, - fontFamily: _monospace, - fontSize: 11, - fontWeight: FontWeight.bold, - letterSpacing: 0.5, - ), - ), - ), - _HeaderButton( - identifier: 'log_clear_button', - label: 'Clear logs', - icon: Icons.delete, - size: 14, - onTap: LogService.clear, - ), - _HeaderButton( - identifier: 'log_toggle_button', - label: _collapsed ? 'Expand logs' : 'Collapse logs', - icon: _collapsed ? Icons.expand_more : Icons.expand_less, - size: 18, - onTap: _toggle, - ), - ], - ), - ), - ); - } - - Widget _buildBody(List logs) { - const entryStyle = TextStyle( - color: AppColors.osLogText, - fontFamily: _monospace, - fontSize: _entryFontSize, - height: 1.4, - ); - const mutedStyle = TextStyle(color: AppColors.osGrey600); - - return SizedBox( - height: 100, - child: SingleChildScrollView( - controller: _scrollController, - padding: const EdgeInsets.fromLTRB(16, 0, 16, 6), - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - if (logs.isEmpty) - Text('No logs yet', style: entryStyle.merge(mutedStyle)), - for (final (index, entry) in logs.indexed) - Semantics( - identifier: 'log_entry_$index', - container: true, - child: Text.rich( - TextSpan( - children: [ - TextSpan(text: entry.time, style: mutedStyle), - TextSpan(text: ' ${entry.message}'), - ], - ), - style: entryStyle, - ), - ), - ], - ), - ), - ); - } -} - -class _HeaderButton extends StatelessWidget { - const _HeaderButton({ - required this.identifier, - required this.label, - required this.icon, - required this.size, - required this.onTap, - }); - - final String identifier; - final String label; - final IconData icon; - final double size; - final VoidCallback onTap; - - @override - Widget build(BuildContext context) { - return Semantics( - identifier: identifier, - container: true, - button: true, - label: label, - excludeSemantics: true, - onTap: onTap, - child: GestureDetector( - behavior: HitTestBehavior.opaque, - onTap: onTap, - // The header is only 24 tall, so widen the target instead. - child: SizedBox( - width: 32, - height: double.infinity, - child: Icon(icon, size: size, color: AppColors.osGrey500), - ), - ), - ); - } -} diff --git a/examples/demo-pods/lib/widgets/section_card.dart b/examples/demo-pods/lib/widgets/section_card.dart deleted file mode 100644 index 5e261f87..00000000 --- a/examples/demo-pods/lib/widgets/section_card.dart +++ /dev/null @@ -1,77 +0,0 @@ -import 'package:flutter/material.dart'; - -import '../theme.dart'; - -class SectionCard extends StatelessWidget { - final String title; - final VoidCallback? onInfoTap; - final String? sectionKey; - final Widget child; - - const SectionCard({ - super.key, - required this.title, - this.onInfoTap, - this.sectionKey, - required this.child, - }); - - @override - Widget build(BuildContext context) { - return Semantics( - identifier: sectionKey != null ? '${sectionKey}_section' : null, - container: true, - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // Section header (outside card, ALL CAPS like reference) - Padding( - padding: EdgeInsets.only(bottom: onInfoTap != null ? 0 : AppSpacing.gap), - child: Row( - children: [ - Expanded( - child: Text( - title.toUpperCase(), - style: Theme.of(context).textTheme.bodySmall?.copyWith( - fontWeight: FontWeight.bold, - color: AppColors.osGrey700, - letterSpacing: 0.5, - ), - ), - ), - if (onInfoTap != null) - Transform.translate( - offset: const Offset(16, 0), - child: Semantics( - identifier: sectionKey != null - ? '${sectionKey}_info_icon' - : null, - container: true, - child: IconButton( - onPressed: onInfoTap, - icon: Icon( - Icons.info_outline, - size: 18, - color: AppColors.osGrey500, - ), - padding: EdgeInsets.zero, - constraints: const BoxConstraints( - minWidth: 32, - minHeight: 32, - ), - ), - ), - ), - ], - ), - ), - // Card content - child, - ], - ), - ), - ); - } -} diff --git a/examples/demo-pods/lib/widgets/sections/aliases_section.dart b/examples/demo-pods/lib/widgets/sections/aliases_section.dart deleted file mode 100644 index 83fa2c01..00000000 --- a/examples/demo-pods/lib/widgets/sections/aliases_section.dart +++ /dev/null @@ -1,85 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -import '../../theme.dart'; -import '../../viewmodels/app_viewmodel.dart'; -import '../action_button.dart'; -import '../dialogs.dart'; -import '../list_widgets.dart'; -import '../section_card.dart'; - -class AliasesSection extends StatelessWidget { - final VoidCallback? onInfoTap; - - const AliasesSection({super.key, this.onInfoTap}); - - @override - Widget build(BuildContext context) { - final vm = context.watch(); - - return SectionCard( - title: 'Aliases', - sectionKey: 'aliases', - onInfoTap: onInfoTap, - child: Column( - children: [ - Card( - margin: EdgeInsets.zero, - child: Padding( - padding: AppSpacing.cardPadding, - child: PairList( - sectionKey: 'aliases', - items: vm.aliasesList, - emptyText: 'No aliases added', - loading: vm.isLoading, - ), - ), - ), - AppSpacing.gapBox, - ButtonGrid( - children: [ - PrimaryButton( - label: 'ADD ALIAS', - semanticsLabel: 'add_alias_button', - onPressed: () async { - final result = await showDialog>( - context: context, - builder: - (_) => const PairInputDialog( - title: 'Add Alias', - keyLabel: 'Label', - valueLabel: 'ID', - keySemanticsLabel: 'alias_label_input', - valueSemanticsLabel: 'alias_id_input', - ), - ); - if (result != null) { - vm.addAlias(result.key, result.value); - } - }, - ), - PrimaryButton( - label: 'ADD ALIASES', - semanticsLabel: 'add_multiple_aliases_button', - onPressed: () async { - final result = await showDialog>( - context: context, - builder: - (_) => const MultiPairInputDialog( - title: 'Add Multiple Aliases', - keyLabel: 'Label', - valueLabel: 'ID', - ), - ); - if (result != null) { - vm.addAliases(result); - } - }, - ), - ], - ), - ], - ), - ); - } -} diff --git a/examples/demo-pods/lib/widgets/sections/app_section.dart b/examples/demo-pods/lib/widgets/sections/app_section.dart deleted file mode 100644 index 64f86205..00000000 --- a/examples/demo-pods/lib/widgets/sections/app_section.dart +++ /dev/null @@ -1,119 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:url_launcher/url_launcher.dart'; - -import '../../theme.dart'; -import '../../viewmodels/app_viewmodel.dart'; -import '../section_card.dart'; -import '../toggle_row.dart'; - -class AppSection extends StatelessWidget { - final VoidCallback? onInfoTap; - - const AppSection({super.key, this.onInfoTap}); - - @override - Widget build(BuildContext context) { - final vm = context.watch(); - - return SectionCard( - title: 'App', - sectionKey: 'app', - onInfoTap: onInfoTap, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - // App ID card (single row like reference) - Card( - margin: EdgeInsets.zero, - child: Padding( - padding: AppSpacing.cardPadding, - child: Row( - children: [ - Text('App ID', style: Theme.of(context).textTheme.bodyMedium), - const SizedBox(width: 12), - Expanded( - child: Semantics( - identifier: 'app_id_value', - container: true, - child: SelectableText( - vm.appId, - style: Theme.of(context).textTheme.bodySmall?.copyWith( - fontFamily: 'monospace', - ), - textAlign: TextAlign.end, - ), - ), - ), - ], - ), - ), - ), - AppSpacing.gapBox, - - // Guidance banner - SizedBox( - width: double.infinity, - child: Card( - color: AppColors.osWarningBackground, - margin: EdgeInsets.zero, - child: Padding( - padding: const EdgeInsets.all(12), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'Add your own App ID, then rebuild to fully test all functionality.', - style: Theme.of(context).textTheme.bodySmall, - ), - GestureDetector( - onTap: () => launchUrl( - Uri.parse('https://onesignal.com'), - mode: LaunchMode.externalApplication, - ), - child: Text( - 'Get your keys at onesignal.com', - style: Theme.of(context).textTheme.bodySmall?.copyWith( - color: AppColors.osPrimary, - fontWeight: FontWeight.w600, - ), - ), - ), - ], - ), - ), - ), - ), - AppSpacing.gapBox, - - // Consent card - Card( - margin: EdgeInsets.zero, - child: Padding( - padding: AppSpacing.cardPadding, - child: Column( - children: [ - ToggleRow( - label: 'Consent Required', - description: 'Require consent before SDK processes data', - value: vm.consentRequired, - onChanged: vm.setConsentRequired, - ), - if (vm.consentRequired) ...[ - const Divider(), - ToggleRow( - label: 'Privacy Consent', - description: 'Consent given for data collection', - value: vm.privacyConsentGiven, - onChanged: vm.setPrivacyConsent, - ), - ], - ], - ), - ), - ), - ], - ), - ); - } -} diff --git a/examples/demo-pods/lib/widgets/sections/custom_events_section.dart b/examples/demo-pods/lib/widgets/sections/custom_events_section.dart deleted file mode 100644 index d09bfc62..00000000 --- a/examples/demo-pods/lib/widgets/sections/custom_events_section.dart +++ /dev/null @@ -1,45 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -import '../../theme.dart'; -import '../../viewmodels/app_viewmodel.dart'; -import '../action_button.dart'; -import '../dialogs.dart'; -import '../section_card.dart'; - -class CustomEventsSection extends StatelessWidget { - final VoidCallback? onInfoTap; - - const CustomEventsSection({super.key, this.onInfoTap}); - - @override - Widget build(BuildContext context) { - final vm = context.read(); - - return SectionCard( - title: 'Custom Events', - sectionKey: 'custom_events', - onInfoTap: onInfoTap, - child: PrimaryButton( - label: 'TRACK EVENT', - semanticsLabel: 'track_event_button', - onPressed: () async { - final result = await showDialog>( - context: context, - builder: (_) => const TrackEventDialog(), - ); - if (result != null) { - final name = result['name'] as String; - vm.trackEvent( - name, - result['properties'] as Map?, - ); - if (context.mounted) { - context.showSnackBar('Event tracked: $name'); - } - } - }, - ), - ); - } -} diff --git a/examples/demo-pods/lib/widgets/sections/emails_section.dart b/examples/demo-pods/lib/widgets/sections/emails_section.dart deleted file mode 100644 index 6b9f4174..00000000 --- a/examples/demo-pods/lib/widgets/sections/emails_section.dart +++ /dev/null @@ -1,63 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -import '../../theme.dart'; -import '../../viewmodels/app_viewmodel.dart'; -import '../action_button.dart'; -import '../dialogs.dart'; -import '../list_widgets.dart'; -import '../section_card.dart'; - -class EmailsSection extends StatelessWidget { - final VoidCallback? onInfoTap; - - const EmailsSection({super.key, this.onInfoTap}); - - @override - Widget build(BuildContext context) { - final vm = context.watch(); - - return SectionCard( - title: 'Emails', - sectionKey: 'emails', - onInfoTap: onInfoTap, - child: Column( - children: [ - Card( - margin: EdgeInsets.zero, - child: Padding( - padding: AppSpacing.cardPadding, - child: CollapsibleList( - sectionKey: 'emails', - items: vm.emailsList, - emptyText: 'No emails added', - loading: vm.isLoading, - onDelete: vm.removeEmail, - ), - ), - ), - AppSpacing.gapBox, - PrimaryButton( - label: 'ADD EMAIL', - semanticsLabel: 'add_email_button', - onPressed: () async { - final result = await showDialog( - context: context, - builder: - (_) => const SingleInputDialog( - title: 'Add Email', - fieldLabel: 'Email', - keyboardType: TextInputType.emailAddress, - semanticsLabel: 'email_input', - ), - ); - if (result != null) { - vm.addEmail(result); - } - }, - ), - ], - ), - ); - } -} diff --git a/examples/demo-pods/lib/widgets/sections/in_app_section.dart b/examples/demo-pods/lib/widgets/sections/in_app_section.dart deleted file mode 100644 index c8abfed3..00000000 --- a/examples/demo-pods/lib/widgets/sections/in_app_section.dart +++ /dev/null @@ -1,37 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -import '../../theme.dart'; -import '../../viewmodels/app_viewmodel.dart'; -import '../section_card.dart'; -import '../toggle_row.dart'; - -class InAppSection extends StatelessWidget { - final VoidCallback? onInfoTap; - - const InAppSection({super.key, this.onInfoTap}); - - @override - Widget build(BuildContext context) { - final vm = context.watch(); - - return SectionCard( - title: 'In-App Messaging', - sectionKey: 'iam', - onInfoTap: onInfoTap, - child: Card( - margin: EdgeInsets.zero, - child: Padding( - padding: AppSpacing.cardPadding, - child: ToggleRow( - label: 'Pause In-App Messages', - description: 'Toggle in-app message display', - semanticsLabel: 'pause_iam_toggle', - value: vm.iamPaused, - onChanged: vm.setIamPaused, - ), - ), - ), - ); - } -} diff --git a/examples/demo-pods/lib/widgets/sections/live_activities_section.dart b/examples/demo-pods/lib/widgets/sections/live_activities_section.dart deleted file mode 100644 index a5ac7eee..00000000 --- a/examples/demo-pods/lib/widgets/sections/live_activities_section.dart +++ /dev/null @@ -1,146 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -import '../../theme.dart'; -import '../../viewmodels/app_viewmodel.dart'; -import '../app_text_field.dart'; -import '../action_button.dart'; -import '../section_card.dart'; - -class LiveActivitiesSection extends StatefulWidget { - final VoidCallback? onInfoTap; - - const LiveActivitiesSection({super.key, this.onInfoTap}); - - @override - State createState() => _LiveActivitiesSectionState(); -} - -class _LiveActivitiesSectionState extends State { - late TextEditingController _activityIdController; - late TextEditingController _orderNumberController; - - @override - void initState() { - super.initState(); - final vm = context.read(); - _activityIdController = TextEditingController(text: vm.activityId); - _orderNumberController = TextEditingController(text: vm.orderNumber); - } - - @override - void dispose() { - _activityIdController.dispose(); - _orderNumberController.dispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - final vm = context.watch(); - final activityEmpty = _activityIdController.text.isEmpty; - - return SectionCard( - title: 'Live Activities', - sectionKey: 'live_activities', - onInfoTap: widget.onInfoTap, - child: Column( - children: [ - Card( - margin: EdgeInsets.zero, - child: Padding( - padding: AppSpacing.cardPadding, - child: Column( - children: [ - _InputRow( - label: 'Activity ID', - controller: _activityIdController, - onChanged: (value) { - vm.setActivityId(value); - setState(() {}); - }, - ), - const SizedBox(height: 4), - _InputRow( - label: 'Order #', - controller: _orderNumberController, - onChanged: (value) => vm.setOrderNumber(value), - ), - ], - ), - ), - ), - AppSpacing.gapBox, - ButtonGrid( - children: [ - PrimaryButton( - label: 'START ACTIVITY', - semanticsLabel: 'start_live_activity_button', - onPressed: activityEmpty ? null : () => vm.startLiveActivity(), - ), - PrimaryButton( - label: 'UPDATE → ${vm.nextStatusLabel}', - semanticsLabel: 'update_live_activity_button', - onPressed: activityEmpty || vm.isLaUpdating || !vm.hasApiKey - ? null - : () => vm.updateLiveActivity(), - ), - DestructiveButton( - label: 'END ACTIVITY', - semanticsLabel: 'end_live_activity_button', - onPressed: activityEmpty || !vm.hasApiKey - ? null - : () => vm.endLiveActivity(), - ), - ], - ), - ], - ), - ); - } -} - -class _InputRow extends StatelessWidget { - final String label; - final TextEditingController controller; - final ValueChanged onChanged; - - const _InputRow({ - required this.label, - required this.controller, - required this.onChanged, - }); - - @override - Widget build(BuildContext context) { - return Row( - children: [ - SizedBox( - width: 80, - child: Text( - label, - style: const TextStyle( - fontSize: 14, - color: AppColors.osGrey600, - ), - ), - ), - Expanded( - child: AppTextField( - controller: controller, - textAlign: TextAlign.right, - style: const TextStyle(fontSize: 14, color: Color(0xFF212121)), - decoration: const InputDecoration( - border: InputBorder.none, - enabledBorder: InputBorder.none, - focusedBorder: InputBorder.none, - contentPadding: EdgeInsets.symmetric(vertical: 4), - isDense: true, - ), - onChanged: onChanged, - ), - ), - ], - ); - } -} diff --git a/examples/demo-pods/lib/widgets/sections/location_section.dart b/examples/demo-pods/lib/widgets/sections/location_section.dart deleted file mode 100644 index 74999f76..00000000 --- a/examples/demo-pods/lib/widgets/sections/location_section.dart +++ /dev/null @@ -1,62 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -import '../../theme.dart'; -import '../../viewmodels/app_viewmodel.dart'; -import '../action_button.dart'; -import '../section_card.dart'; -import '../toggle_row.dart'; - -class LocationSection extends StatelessWidget { - final VoidCallback? onInfoTap; - - const LocationSection({super.key, this.onInfoTap}); - - @override - Widget build(BuildContext context) { - final vm = context.watch(); - - return SectionCard( - title: 'Location', - sectionKey: 'location', - onInfoTap: onInfoTap, - child: Column( - children: [ - Card( - margin: EdgeInsets.zero, - child: Padding( - padding: AppSpacing.cardPadding, - child: ToggleRow( - label: 'Location Shared', - description: 'Share device location with OneSignal', - semanticsLabel: 'location_shared_toggle', - value: vm.locationShared, - onChanged: vm.setLocationShared, - ), - ), - ), - AppSpacing.gapBox, - ButtonGrid( - children: [ - PrimaryButton( - label: 'PROMPT LOCATION', - semanticsLabel: 'prompt_location_button', - onPressed: vm.promptLocation, - ), - PrimaryButton( - label: 'CHECK LOCATION', - semanticsLabel: 'check_location_button', - onPressed: () async { - final shared = await vm.checkLocationShared(); - if (context.mounted) { - context.showSnackBar('Location shared: $shared'); - } - }, - ), - ], - ), - ], - ), - ); - } -} diff --git a/examples/demo-pods/lib/widgets/sections/outcomes_section.dart b/examples/demo-pods/lib/widgets/sections/outcomes_section.dart deleted file mode 100644 index c1fb50a9..00000000 --- a/examples/demo-pods/lib/widgets/sections/outcomes_section.dart +++ /dev/null @@ -1,55 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -import '../../theme.dart'; -import '../../viewmodels/app_viewmodel.dart'; -import '../action_button.dart'; -import '../dialogs.dart'; -import '../section_card.dart'; - -class OutcomesSection extends StatelessWidget { - final VoidCallback? onInfoTap; - - const OutcomesSection({super.key, this.onInfoTap}); - - @override - Widget build(BuildContext context) { - final vm = context.read(); - - return SectionCard( - title: 'Outcomes', - sectionKey: 'outcomes', - onInfoTap: onInfoTap, - child: PrimaryButton( - label: 'SEND OUTCOME', - semanticsLabel: 'send_outcome_button', - onPressed: () async { - final result = await showDialog>( - context: context, - builder: (_) => const OutcomeDialog(), - ); - if (result != null) { - final type = result['type'] as OutcomeType; - final name = result['name'] as String; - String snackbarMessage; - switch (type) { - case OutcomeType.normal: - vm.sendOutcome(name); - snackbarMessage = 'Outcome sent: $name'; - case OutcomeType.unique: - vm.sendUniqueOutcome(name); - snackbarMessage = 'Unique outcome sent: $name'; - case OutcomeType.withValue: - final value = result['value'] as double; - vm.sendOutcomeWithValue(name, value); - snackbarMessage = 'Outcome sent: $name = $value'; - } - if (context.mounted) { - context.showSnackBar(snackbarMessage); - } - } - }, - ), - ); - } -} diff --git a/examples/demo-pods/lib/widgets/sections/push_section.dart b/examples/demo-pods/lib/widgets/sections/push_section.dart deleted file mode 100644 index b0b0aa6a..00000000 --- a/examples/demo-pods/lib/widgets/sections/push_section.dart +++ /dev/null @@ -1,95 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -import '../../theme.dart'; -import '../../viewmodels/app_viewmodel.dart'; -import '../action_button.dart'; -import '../section_card.dart'; -import '../toggle_row.dart'; - -class PushSection extends StatelessWidget { - final VoidCallback? onInfoTap; - - const PushSection({super.key, this.onInfoTap}); - - @override - Widget build(BuildContext context) { - final vm = context.watch(); - - return SectionCard( - title: 'Push', - sectionKey: 'push', - onInfoTap: onInfoTap, - child: Column( - children: [ - Card( - margin: EdgeInsets.zero, - child: Padding( - padding: AppSpacing.cardPadding, - child: Column( - children: [ - Row( - children: [ - Text( - 'Push ID', - style: Theme.of(context).textTheme.bodyMedium, - ), - const SizedBox(width: 12), - Expanded( - child: Semantics( - identifier: 'push_id_value', - container: true, - child: SelectableText( - vm.pushSubscriptionId ?? '—', - style: Theme.of(context).textTheme.bodySmall?.copyWith( - fontFamily: 'monospace', - ), - textAlign: TextAlign.end, - ), - ), - ), - ], - ), - const Divider(), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - 'Status', - style: Theme.of(context).textTheme.bodyMedium, - ), - Semantics( - identifier: 'push_subscription_status', - container: true, - child: Text( - vm.isPushSubscribed ? 'Subscribed' : 'Unsubscribed', - style: Theme.of(context).textTheme.bodySmall, - ), - ), - ], - ), - const Divider(), - ToggleRow( - label: 'Opted In', - value: vm.pushEnabled, - semanticsLabel: 'push_enabled_toggle', - onChanged: vm.hasNotificationPermission - ? vm.togglePush - : null, - ), - ], - ), - ), - ), - if (!vm.hasNotificationPermission) ...[ - AppSpacing.gapBox, - PrimaryButton( - label: 'PROMPT PUSH', - onPressed: vm.promptPush, - ), - ], - ], - ), - ); - } -} diff --git a/examples/demo-pods/lib/widgets/sections/send_iam_section.dart b/examples/demo-pods/lib/widgets/sections/send_iam_section.dart deleted file mode 100644 index 3f2e66c0..00000000 --- a/examples/demo-pods/lib/widgets/sections/send_iam_section.dart +++ /dev/null @@ -1,36 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -import '../../models/in_app_message_type.dart'; -import '../../viewmodels/app_viewmodel.dart'; -import '../action_button.dart'; -import '../section_card.dart'; - -class SendIamSection extends StatelessWidget { - final VoidCallback? onInfoTap; - - const SendIamSection({super.key, this.onInfoTap}); - - @override - Widget build(BuildContext context) { - final vm = context.read(); - const types = InAppMessageType.values; - - return SectionCard( - title: 'Send In-App Message', - sectionKey: 'send_iam', - onInfoTap: onInfoTap, - child: ButtonGrid( - children: [ - for (final type in types) - PrimaryButton( - label: type.label.toUpperCase(), - onPressed: () => vm.sendInAppMessage(type), - semanticsLabel: 'send_iam_${type.triggerValue}_button', - padding: const EdgeInsets.symmetric(horizontal: 8), - ), - ], - ), - ); - } -} diff --git a/examples/demo-pods/lib/widgets/sections/send_push_section.dart b/examples/demo-pods/lib/widgets/sections/send_push_section.dart deleted file mode 100644 index e07600d8..00000000 --- a/examples/demo-pods/lib/widgets/sections/send_push_section.dart +++ /dev/null @@ -1,66 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -import '../../models/notification_type.dart'; -import '../../viewmodels/app_viewmodel.dart'; -import '../action_button.dart'; -import '../dialogs.dart'; -import '../section_card.dart'; - -class SendPushSection extends StatelessWidget { - final VoidCallback? onInfoTap; - - const SendPushSection({super.key, this.onInfoTap}); - - @override - Widget build(BuildContext context) { - final vm = context.read(); - - return SectionCard( - title: 'Send Push Notification', - sectionKey: 'send_push', - onInfoTap: onInfoTap, - child: Column( - children: [ - ButtonGrid( - children: [ - PrimaryButton( - label: 'SIMPLE', - semanticsLabel: 'send_simple_button', - onPressed: () => vm.sendNotification(NotificationType.simple), - ), - PrimaryButton( - label: 'WITH IMAGE', - semanticsLabel: 'send_image_button', - onPressed: () => vm.sendNotification(NotificationType.withImage), - ), - PrimaryButton( - label: 'WITH SOUND', - semanticsLabel: 'send_sound_button', - onPressed: () => vm.sendNotification(NotificationType.withSound), - ), - PrimaryButton( - label: 'CUSTOM', - semanticsLabel: 'send_custom_button', - onPressed: () async { - final result = await showDialog>( - context: context, - builder: (_) => const CustomNotificationDialog(), - ); - if (result != null) { - vm.sendCustomNotification(result['title']!, result['body']!); - } - }, - ), - DestructiveButton( - label: 'CLEAR ALL', - semanticsLabel: 'clear_all_button', - onPressed: vm.clearAllNotifications, - ), - ], - ), - ], - ), - ); - } -} diff --git a/examples/demo-pods/lib/widgets/sections/sms_section.dart b/examples/demo-pods/lib/widgets/sections/sms_section.dart deleted file mode 100644 index b7426d6f..00000000 --- a/examples/demo-pods/lib/widgets/sections/sms_section.dart +++ /dev/null @@ -1,63 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -import '../../theme.dart'; -import '../../viewmodels/app_viewmodel.dart'; -import '../action_button.dart'; -import '../dialogs.dart'; -import '../list_widgets.dart'; -import '../section_card.dart'; - -class SmsSection extends StatelessWidget { - final VoidCallback? onInfoTap; - - const SmsSection({super.key, this.onInfoTap}); - - @override - Widget build(BuildContext context) { - final vm = context.watch(); - - return SectionCard( - title: 'SMS', - sectionKey: 'sms', - onInfoTap: onInfoTap, - child: Column( - children: [ - Card( - margin: EdgeInsets.zero, - child: Padding( - padding: AppSpacing.cardPadding, - child: CollapsibleList( - sectionKey: 'sms', - items: vm.smsNumbersList, - emptyText: 'No SMS added', - loading: vm.isLoading, - onDelete: vm.removeSms, - ), - ), - ), - AppSpacing.gapBox, - PrimaryButton( - label: 'ADD SMS', - semanticsLabel: 'add_sms_button', - onPressed: () async { - final result = await showDialog( - context: context, - builder: - (_) => const SingleInputDialog( - title: 'Add SMS', - fieldLabel: 'SMS Number', - keyboardType: TextInputType.phone, - semanticsLabel: 'sms_input', - ), - ); - if (result != null) { - vm.addSms(result); - } - }, - ), - ], - ), - ); - } -} diff --git a/examples/demo-pods/lib/widgets/sections/tags_section.dart b/examples/demo-pods/lib/widgets/sections/tags_section.dart deleted file mode 100644 index 8bf65efb..00000000 --- a/examples/demo-pods/lib/widgets/sections/tags_section.dart +++ /dev/null @@ -1,100 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -import '../../theme.dart'; -import '../../viewmodels/app_viewmodel.dart'; -import '../action_button.dart'; -import '../dialogs.dart'; -import '../list_widgets.dart'; -import '../section_card.dart'; - -class TagsSection extends StatelessWidget { - final VoidCallback? onInfoTap; - - const TagsSection({super.key, this.onInfoTap}); - - @override - Widget build(BuildContext context) { - final vm = context.watch(); - - return SectionCard( - title: 'Tags', - sectionKey: 'tags', - onInfoTap: onInfoTap, - child: Column( - children: [ - Card( - margin: EdgeInsets.zero, - child: Padding( - padding: AppSpacing.cardPadding, - child: PairList( - sectionKey: 'tags', - items: vm.tagsList, - emptyText: 'No tags added', - loading: vm.isLoading, - onDelete: vm.removeTag, - ), - ), - ), - AppSpacing.gapBox, - ButtonGrid( - children: [ - PrimaryButton( - label: 'ADD TAG', - semanticsLabel: 'add_tag_button', - onPressed: () async { - final result = await showDialog>( - context: context, - builder: - (_) => const PairInputDialog( - title: 'Add Tag', - keySemanticsLabel: 'tag_key_input', - valueSemanticsLabel: 'tag_value_input', - ), - ); - if (result != null) { - vm.addTag(result.key, result.value); - } - }, - ), - PrimaryButton( - label: 'ADD TAGS', - semanticsLabel: 'add_multiple_tags_button', - onPressed: () async { - final result = await showDialog>( - context: context, - builder: - (_) => - const MultiPairInputDialog(title: 'Add Multiple Tags'), - ); - if (result != null) { - vm.addTags(result); - } - }, - ), - if (vm.tagsList.isNotEmpty) ...[ - DestructiveButton( - label: 'REMOVE TAGS', - semanticsLabel: 'remove_tags_button', - onPressed: () async { - final result = await showDialog>( - context: context, - builder: - (_) => MultiSelectRemoveDialog( - title: 'Remove Tags', - items: vm.tagsList, - ), - ); - if (result != null) { - vm.removeSelectedTags(result); - } - }, - ), - ], - ], - ), - ], - ), - ); - } -} diff --git a/examples/demo-pods/lib/widgets/sections/triggers_section.dart b/examples/demo-pods/lib/widgets/sections/triggers_section.dart deleted file mode 100644 index 761a408a..00000000 --- a/examples/demo-pods/lib/widgets/sections/triggers_section.dart +++ /dev/null @@ -1,102 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -import '../../theme.dart'; -import '../../viewmodels/app_viewmodel.dart'; -import '../action_button.dart'; -import '../dialogs.dart'; -import '../list_widgets.dart'; -import '../section_card.dart'; - -class TriggersSection extends StatelessWidget { - final VoidCallback? onInfoTap; - - const TriggersSection({super.key, this.onInfoTap}); - - @override - Widget build(BuildContext context) { - final vm = context.watch(); - - return SectionCard( - title: 'Triggers', - sectionKey: 'triggers', - onInfoTap: onInfoTap, - child: Column( - children: [ - Card( - margin: EdgeInsets.zero, - child: Padding( - padding: AppSpacing.cardPadding, - child: PairList( - sectionKey: 'triggers', - items: vm.triggersList, - emptyText: 'No triggers added', - onDelete: vm.removeTrigger, - ), - ), - ), - AppSpacing.gapBox, - ButtonGrid( - children: [ - PrimaryButton( - label: 'ADD TRIGGER', - semanticsLabel: 'add_trigger_button', - onPressed: () async { - final result = await showDialog>( - context: context, - builder: (_) => const PairInputDialog( - title: 'Add Trigger', - keySemanticsLabel: 'trigger_key_input', - valueSemanticsLabel: 'trigger_value_input', - ), - ); - if (result != null) { - vm.addTrigger(result.key, result.value); - } - }, - ), - PrimaryButton( - label: 'ADD TRIGGERS', - semanticsLabel: 'add_multiple_triggers_button', - onPressed: () async { - final result = await showDialog>( - context: context, - builder: (_) => const MultiPairInputDialog( - title: 'Add Multiple Triggers', - ), - ); - if (result != null) { - vm.addTriggers(result); - } - }, - ), - if (vm.triggersList.isNotEmpty) ...[ - DestructiveButton( - label: 'REMOVE TRIGGERS', - semanticsLabel: 'remove_triggers_button', - onPressed: () async { - final result = await showDialog>( - context: context, - builder: (_) => MultiSelectRemoveDialog( - title: 'Remove Triggers', - items: vm.triggersList, - ), - ); - if (result != null) { - vm.removeSelectedTriggers(result); - } - }, - ), - DestructiveButton( - label: 'CLEAR ALL', - semanticsLabel: 'clear_triggers_button', - onPressed: vm.clearAllTriggers, - ), - ], - ], - ), - ], - ), - ); - } -} diff --git a/examples/demo-pods/lib/widgets/sections/user_section.dart b/examples/demo-pods/lib/widgets/sections/user_section.dart deleted file mode 100644 index f9799742..00000000 --- a/examples/demo-pods/lib/widgets/sections/user_section.dart +++ /dev/null @@ -1,190 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - -import '../../theme.dart'; -import '../../viewmodels/app_viewmodel.dart'; -import '../dialogs.dart'; -import '../action_button.dart'; -import '../section_card.dart'; - -const _languageOptions = [ - ('Device Default', ''), - ('English', 'en'), - ('Arabic', 'ar'), - ('Azerbaijani', 'az'), - ('Bosnian', 'bs'), - ('Catalan', 'ca'), - ('Chinese (Simplified)', 'zh-Hans'), - ('Chinese (Traditional)', 'zh-Hant'), - ('Croatian', 'hr'), - ('Czech', 'cs'), - ('Danish', 'da'), - ('Dutch', 'nl'), - ('Estonian', 'et'), - ('Finnish', 'fi'), - ('French', 'fr'), - ('Georgian', 'ka'), - ('Bulgarian', 'bg'), - ('German', 'de'), - ('Greek', 'el'), - ('Hindi', 'hi'), - ('Hebrew', 'he'), - ('Hungarian', 'hu'), - ('Indonesian', 'id'), - ('Italian', 'it'), - ('Japanese', 'ja'), - ('Korean', 'ko'), - ('Latvian', 'lv'), - ('Lithuanian', 'lt'), - ('Malay', 'ms'), - ('Norwegian', 'nb'), - ('Persian', 'fa'), - ('Polish', 'pl'), - ('Portuguese', 'pt'), - ('Punjabi', 'pa'), - ('Romanian', 'ro'), - ('Russian', 'ru'), - ('Serbian', 'sr'), - ('Slovak', 'sk'), - ('Spanish', 'es'), - ('Swedish', 'sv'), - ('Thai', 'th'), - ('Turkish', 'tr'), - ('Ukrainian', 'uk'), - ('Vietnamese', 'vi'), -]; - -class UserSection extends StatelessWidget { - final VoidCallback? onInfoTap; - - const UserSection({super.key, this.onInfoTap}); - - @override - Widget build(BuildContext context) { - final vm = context.watch(); - - return SectionCard( - title: 'User', - sectionKey: 'user', - onInfoTap: onInfoTap, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Card( - margin: EdgeInsets.zero, - child: Padding( - padding: AppSpacing.cardPadding, - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text('Status', style: Theme.of(context).textTheme.bodyMedium), - Semantics( - identifier: 'user_status_value', - container: true, - child: Text( - vm.isLoggedIn ? 'Logged In' : 'Anonymous', - style: Theme.of(context).textTheme.bodySmall?.copyWith( - fontFamily: 'monospace', - color: vm.isLoggedIn - ? AppColors.osSuccess - : AppColors.osGrey600, - ), - ), - ), - ], - ), - const Divider(), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - 'External ID', - style: Theme.of(context).textTheme.bodyMedium, - ), - Semantics( - identifier: 'user_external_id_value', - container: true, - child: SelectableText( - vm.isLoggedIn ? (vm.externalUserId ?? '') : '—', - style: Theme.of(context).textTheme.bodySmall?.copyWith( - fontFamily: 'monospace', - ), - ), - ), - ], - ), - const Divider(), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - 'Language', - style: Theme.of(context).textTheme.bodyMedium, - ), - Semantics( - identifier: 'user_language_dropdown', - container: true, - child: DropdownButton( - value: - _languageOptions.any((o) => o.$2 == vm.language) - ? vm.language - : '', - isDense: true, - menuMaxHeight: 320, - alignment: AlignmentDirectional.centerEnd, - underline: const SizedBox.shrink(), - style: Theme.of(context).textTheme.bodySmall, - items: [ - for (final (name, code) in _languageOptions) - DropdownMenuItem(value: code, child: Text(name)), - ], - onChanged: (code) { - if (code != null) vm.setLanguage(code); - }, - ), - ), - ], - ), - ], - ), - ), - ), - AppSpacing.gapBox, - ButtonGrid( - children: [ - PrimaryButton( - label: vm.isLoggedIn ? 'SWITCH USER' : 'LOGIN USER', - semanticsLabel: 'login_user_button', - onPressed: () async { - final result = await showDialog( - context: context, - builder: (_) => const SingleInputDialog( - title: 'Login User', - fieldLabel: 'External User Id', - confirmLabel: 'Login', - semanticsLabel: 'login_user_id_input', - ), - ); - if (result != null && context.mounted) { - await vm.loginUser(result); - } - }, - ), - if (vm.isLoggedIn) ...[ - DestructiveButton( - label: 'LOGOUT USER', - semanticsLabel: 'logout_user_button', - onPressed: () async { - await vm.logoutUser(); - }, - ), - ], - ], - ), - ], - ), - ); - } -} diff --git a/examples/demo-pods/lib/widgets/toggle_row.dart b/examples/demo-pods/lib/widgets/toggle_row.dart deleted file mode 100644 index 8bfa0428..00000000 --- a/examples/demo-pods/lib/widgets/toggle_row.dart +++ /dev/null @@ -1,49 +0,0 @@ -import 'package:flutter/material.dart'; - -import '../theme.dart'; - -class ToggleRow extends StatelessWidget { - final String label; - final String? description; - final bool value; - final ValueChanged? onChanged; - final String? semanticsLabel; - - const ToggleRow({ - super.key, - required this.label, - this.description, - required this.value, - this.onChanged, - this.semanticsLabel, - }); - - @override - Widget build(BuildContext context) { - Widget tile = SwitchListTile( - title: Text(label, style: Theme.of(context).textTheme.bodyMedium), - subtitle: description != null - ? Text( - description!, - style: Theme.of(context).textTheme.bodySmall?.copyWith( - color: AppColors.osGrey600, - ), - ) - : null, - value: value, - onChanged: onChanged != null ? (v) => onChanged!(v) : null, - contentPadding: EdgeInsets.zero, - dense: true, - visualDensity: VisualDensity.compact, - ); - if (semanticsLabel != null) { - tile = Semantics( - identifier: semanticsLabel, - container: true, - toggled: value, - child: tile, - ); - } - return tile; - } -} diff --git a/examples/demo-pods/pubspec.yaml b/examples/demo-pods/pubspec.yaml deleted file mode 100644 index 1b71ee24..00000000 --- a/examples/demo-pods/pubspec.yaml +++ /dev/null @@ -1,41 +0,0 @@ -name: demo -description: OneSignal Flutter SDK Demo App -publish_to: 'none' -version: 1.0.0+1 - -environment: - sdk: ^3.7.0 - -dependencies: - flutter: - sdk: flutter - onesignal_flutter: - path: ../../ - provider: ^6.1.0 - shared_preferences: ^2.3.0 - http: ^1.2.0 - url_launcher: ^6.2.0 - flutter_svg: ^2.0.0 - flutter_dotenv: ^5.2.1 - -dev_dependencies: - flutter_test: - sdk: flutter - flutter_lints: ^5.0.0 - flutter_launcher_icons: ^0.14.3 - -flutter_launcher_icons: - android: true - ios: true - remove_alpha_ios: true - image_path: "assets/onesignal_logo_icon_padded.png" - adaptive_icon_background: "#FFFFFF" - adaptive_icon_foreground: "assets/onesignal_logo_icon_padded.png" - -flutter: - config: - enable-swift-package-manager: false - uses-material-design: true - assets: - - assets/onesignal_logo.svg - - .env diff --git a/examples/demo-pods/test/widget_test.dart b/examples/demo-pods/test/widget_test.dart deleted file mode 100644 index d4a07e51..00000000 --- a/examples/demo-pods/test/widget_test.dart +++ /dev/null @@ -1,8 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; - -void main() { - testWidgets('placeholder test', (WidgetTester tester) async { - // Placeholder test - OneSignal SDK requires native platform - expect(true, isTrue); - }); -} diff --git a/examples/demo/README.md b/examples/demo/README.md index a5ed6395..16ecd963 100644 --- a/examples/demo/README.md +++ b/examples/demo/README.md @@ -64,8 +64,7 @@ To test the bundled iOS notification action icons, follow ## Other demos -- [`demo-pods`](../demo-pods): same app using CocoaPods for iOS -- [`demo-no-location`](../demo-no-location) and [`demo-no-location-pods`](../demo-no-location-pods): minimal apps without the native location module +- [`demo-no-location`](../demo-no-location): minimal app without the native location module - [`flutter-local-notif`](../flutter-local-notif): OneSignal alongside `flutter_local_notifications` ## Build Guide diff --git a/ios/onesignal_flutter.podspec b/ios/onesignal_flutter.podspec deleted file mode 100644 index dd2c7c80..00000000 --- a/ios/onesignal_flutter.podspec +++ /dev/null @@ -1,28 +0,0 @@ -# -# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html -# -Pod::Spec.new do |s| - onesignal_xcframework_version = '5.8.1' - onesignal_disable_location_env = ENV['ONESIGNAL_DISABLE_LOCATION'].to_s.strip.downcase - onesignal_disable_location = ['true', '1'].include?(onesignal_disable_location_env) - - s.name = 'onesignal_flutter' - s.version = '5.8.0' - s.summary = 'The OneSignal Flutter SDK' - s.description = 'Allows you to easily add OneSignal to your flutter projects, to make sending and handling push notifications easy' - s.homepage = 'https://www.onesignal.com' - s.license = { :file => '../LICENSE' } - s.author = { 'Brad Hesse' => 'brad@onesignal.com', 'Josh Kasten' => 'josh@onesignal.com' } - s.source = { :path => '.' } - s.source_files = 'onesignal_flutter/Sources/onesignal_flutter/**/*.{h,m}' - s.public_header_files = 'onesignal_flutter/Sources/onesignal_flutter/include/**/*.h' - s.dependency 'Flutter' - if onesignal_disable_location - s.dependency 'OneSignalXCFramework/OneSignal', onesignal_xcframework_version - s.dependency 'OneSignalXCFramework/OneSignalInAppMessages', onesignal_xcframework_version - else - s.dependency 'OneSignalXCFramework', onesignal_xcframework_version - end - s.ios.deployment_target = '15.0' - s.static_framework = true -end diff --git a/pubspec.yaml b/pubspec.yaml index b91efee5..75ffe6ab 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -32,4 +32,4 @@ dev_dependencies: environment: sdk: ^3.11.0 - flutter: ">=3.41.0" + flutter: ">=3.44.0"