diff --git a/analysis_options.yaml b/analysis_options.yaml index 14714683..e4ac80b9 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -4,3 +4,4 @@ analyzer: - example/** - example_pod/** - example_spm/** + - examples/** diff --git a/example/.gitignore b/example/.gitignore deleted file mode 100644 index 18d5e693..00000000 --- a/example/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -.DS_Store -.dart_tool/ - -.packages -.pub/ - -build/ - -.flutter-plugins -.flutter-plugins-dependencies -flutter_export_environment.sh \ No newline at end of file diff --git a/example/README.md b/example/README.md deleted file mode 100644 index 13327bf6..00000000 --- a/example/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# onesignal_example - -Demonstrates how to use the onesignal plugin. - -# iOS - -First you may need to run `pod install` in the ios folder. -Then launch a simulator then you can run `flutter run`. - -# Android - -Make sure you have the Android SDK cli tools and have accepted the license agreements. -E.g. - -``` -flutter doctor --android-licenses -``` - -Then launch an Android emulator e.g. - -``` -flutter emulators --launch Medium_Phone_API_35; -``` - -And then you can run `flutter run`. - -If you are using an older Flutter or Android Studio version, you may see an error about `ndkVersion`. Follow the instructions to update the version in `build.gradle.kts`. - -## Getting Started - -For help getting started with Flutter, view our online -[documentation](https://flutter.io/). diff --git a/example/analysis_options.yaml b/example/analysis_options.yaml deleted file mode 100644 index 241a690a..00000000 --- a/example/analysis_options.yaml +++ /dev/null @@ -1,41 +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. -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: - # Disable style lints for example app - avoid_print: false - unnecessary_new: false - unnecessary_this: false - prefer_const_constructors: false - prefer_const_constructors_in_immutables: false - use_key_in_widget_constructors: false - library_private_types_in_public_api: false - prefer_final_fields: false - prefer_interpolation_to_compose_strings: false - prefer_collection_literals: false - sort_child_properties_last: false - prefer_generic_function_type_aliases: false - annotate_overrides: false - depend_on_referenced_packages: false - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 4dc65895..00000000 --- a/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/example/android/app/src/main/kotlin/com/onesignal/onesignal_example/MainActivity.kt b/example/android/app/src/main/kotlin/com/onesignal/onesignal_example/MainActivity.kt deleted file mode 100644 index 5be0b3b4..00000000 --- a/example/android/app/src/main/kotlin/com/onesignal/onesignal_example/MainActivity.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.onesignal.onesignal_example - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity : FlutterActivity() diff --git a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b..00000000 Binary files a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79..00000000 Binary files a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d43914..00000000 Binary files a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d3..00000000 Binary files a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372ee..00000000 Binary files a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/example/android/settings.gradle.kts b/example/android/settings.gradle.kts deleted file mode 100644 index 75af8a40..00000000 --- a/example/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 "8.13.0" apply false - id("org.jetbrains.kotlin.android") version "2.1.0" apply false -} - -include(":app") diff --git a/example/ios/.gitignore b/example/ios/.gitignore deleted file mode 100644 index 79cc4da8..00000000 --- a/example/ios/.gitignore +++ /dev/null @@ -1,45 +0,0 @@ -.idea/ -.vagrant/ -.sconsign.dblite -.svn/ - -.DS_Store -*.swp -profile - -DerivedData/ -build/ -GeneratedPluginRegistrant.h -GeneratedPluginRegistrant.m - -.generated/ - -*.pbxuser -*.mode1v3 -*.mode2v3 -*.perspectivev3 - -!default.pbxuser -!default.mode1v3 -!default.mode2v3 -!default.perspectivev3 - -xcuserdata - -*.moved-aside - -*.pyc -*sync/ -Icon? -.tags* - -/Flutter/app.flx -/Flutter/app.zip -/Flutter/flutter_assets/ -/Flutter/App.framework -/Flutter/Flutter.framework -/Flutter/Generated.xcconfig -/ServiceDefinitions.json - -Pods/ -.symlinks/ diff --git a/example/ios/ExampleWidget/Assets.xcassets/AccentColor.colorset/Contents.json b/example/ios/ExampleWidget/Assets.xcassets/AccentColor.colorset/Contents.json deleted file mode 100644 index eb878970..00000000 --- a/example/ios/ExampleWidget/Assets.xcassets/AccentColor.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/example/ios/ExampleWidget/Assets.xcassets/AppIcon.appiconset/Contents.json b/example/ios/ExampleWidget/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 13613e3e..00000000 --- a/example/ios/ExampleWidget/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/example/ios/ExampleWidget/Assets.xcassets/Contents.json b/example/ios/ExampleWidget/Assets.xcassets/Contents.json deleted file mode 100644 index 73c00596..00000000 --- a/example/ios/ExampleWidget/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/example/ios/ExampleWidget/Assets.xcassets/WidgetBackground.colorset/Contents.json b/example/ios/ExampleWidget/Assets.xcassets/WidgetBackground.colorset/Contents.json deleted file mode 100644 index eb878970..00000000 --- a/example/ios/ExampleWidget/Assets.xcassets/WidgetBackground.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/example/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/Contents.json b/example/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/Contents.json deleted file mode 100644 index 0eddeb7c..00000000 --- a/example/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "onesignal-logo.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/example/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/onesignal-logo.png b/example/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/onesignal-logo.png deleted file mode 100644 index ba97c7a7..00000000 Binary files a/example/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/onesignal-logo.png and /dev/null differ diff --git a/example/ios/ExampleWidget/ExampleWidgetBundle.swift b/example/ios/ExampleWidget/ExampleWidgetBundle.swift deleted file mode 100644 index 71407d0a..00000000 --- a/example/ios/ExampleWidget/ExampleWidgetBundle.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// ExampleWidgetBundle.swift -// ExampleWidget -// -// Created by Brian Smith on 4/30/24. -// Copyright © 2024 The Chromium Authors. All rights reserved. -// - -import WidgetKit -import SwiftUI - -@main -struct ExampleWidgetBundle: WidgetBundle { - var body: some Widget { - ExampleWidgetLiveActivity() - } -} diff --git a/example/ios/ExampleWidget/ExampleWidgetLiveActivity.swift b/example/ios/ExampleWidget/ExampleWidgetLiveActivity.swift deleted file mode 100644 index f372e2ef..00000000 --- a/example/ios/ExampleWidget/ExampleWidgetLiveActivity.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// ExampleWidgetLiveActivity.swift -// ExampleWidget -// -// Created by Brian Smith on 4/30/24. -// Copyright © 2024 The Chromium Authors. All rights reserved. -// - -import ActivityKit -import WidgetKit -import SwiftUI -import OneSignalLiveActivities - -struct ExampleWidgetLiveActivity: Widget { - var body: some WidgetConfiguration { - ActivityConfiguration(for: DefaultLiveActivityAttributes.self) { context in - // Lock screen/banner UI goes here\VStack(alignment: .leading) { - VStack { - Spacer() - Text("FLUTTER: " + (context.attributes.data["title"]?.asString() ?? "")).font(.headline) - Spacer() - HStack { - Spacer() - Label { - Text(context.state.data["message"]?.asDict()?["en"]?.asString() ?? "") - } icon: { - Image("onesignaldemo") - .resizable() - .scaledToFit() - .frame(width: 40.0, height: 40.0) - } - Spacer() - } - Text("INT: " + String(context.state.data["intValue"]?.asInt() ?? 0)) - Text("DBL: " + String(context.state.data["doubleValue"]?.asDouble() ?? 0.0)) - Text("BOL: " + String(context.state.data["boolValue"]?.asBool() ?? false)) - Spacer() - } - .activitySystemActionForegroundColor(.black) - .activityBackgroundTint(.white) - } dynamicIsland: { _ in - DynamicIsland { - // Expanded UI goes here. Compose the expanded UI through - // various regions, like leading/trailing/center/bottom - DynamicIslandExpandedRegion(.leading) { - Text("Leading") - } - DynamicIslandExpandedRegion(.trailing) { - Text("Trailing") - } - DynamicIslandExpandedRegion(.bottom) { - Text("Bottom") - // more content - } - } compactLeading: { - Text("L") - } compactTrailing: { - Text("T") - } minimal: { - Text("Min") - } - .widgetURL(URL(string: "http://www.apple.com")) - .keylineTint(Color.red) - } - } -} diff --git a/example/ios/ExampleWidget/Info.plist b/example/ios/ExampleWidget/Info.plist deleted file mode 100644 index 0f118fb7..00000000 --- a/example/ios/ExampleWidget/Info.plist +++ /dev/null @@ -1,11 +0,0 @@ - - - - - NSExtension - - NSExtensionPointIdentifier - com.apple.widgetkit-extension - - - diff --git a/example/ios/Flutter/Debug.xcconfig b/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index e8efba11..00000000 --- a/example/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/example/ios/Flutter/Flutter.podspec b/example/ios/Flutter/Flutter.podspec deleted file mode 100644 index 3aed58d3..00000000 --- a/example/ios/Flutter/Flutter.podspec +++ /dev/null @@ -1,18 +0,0 @@ -# -# This podspec is NOT to be published. It is only used as a local source! -# This is a generated file; do not edit or check into version control. -# - -Pod::Spec.new do |s| - s.name = 'Flutter' - s.version = '1.0.0' - s.summary = 'A UI toolkit for beautiful and fast apps.' - s.homepage = 'https://flutter.dev' - s.license = { :type => 'BSD' } - s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } - s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } - s.ios.deployment_target = '13.0' - # Framework linking is handled by Flutter tooling, not CocoaPods. - # Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs. - s.vendored_frameworks = 'path/to/nothing' -end diff --git a/example/ios/Flutter/Release.xcconfig b/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 399e9340..00000000 --- a/example/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/example/ios/OneSignalNotificationServiceExtension/NotificationService.h b/example/ios/OneSignalNotificationServiceExtension/NotificationService.h deleted file mode 100644 index 7ae1037b..00000000 --- a/example/ios/OneSignalNotificationServiceExtension/NotificationService.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// NotificationService.h -// OneSignalNotificationServiceExtension -// -// Created by Brad Hesse on 7/13/18. -// Copyright © 2018 The Chromium Authors. All rights reserved. -// - -#import - -@interface NotificationService : UNNotificationServiceExtension - -@end diff --git a/example/ios/OneSignalNotificationServiceExtension/NotificationService.m b/example/ios/OneSignalNotificationServiceExtension/NotificationService.m deleted file mode 100644 index a692bf33..00000000 --- a/example/ios/OneSignalNotificationServiceExtension/NotificationService.m +++ /dev/null @@ -1,40 +0,0 @@ -// -// NotificationService.m -// OneSignalNotificationServiceExtension -// -// Created by Brad Hesse on 7/13/18. -// Copyright © 2018 The Chromium Authors. All rights reserved. -// - -#import - -#import "NotificationService.h" - -@interface NotificationService () - -@property (nonatomic, strong) void (^contentHandler)(UNNotificationContent *contentToDeliver); -@property (nonatomic, strong) UNNotificationRequest *receivedRequest; -@property (nonatomic, strong) UNMutableNotificationContent *bestAttemptContent; - -@end - -@implementation NotificationService - -- (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler { - self.receivedRequest = request; - self.contentHandler = contentHandler; - self.bestAttemptContent = [request.content mutableCopy]; - - [OneSignal didReceiveNotificationExtensionRequest:self.receivedRequest withMutableNotificationContent:self.bestAttemptContent withContentHandler:self.contentHandler]; -} - -- (void)serviceExtensionTimeWillExpire { - // Called just before the extension will be terminated by the system. - // Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used. - - [OneSignal serviceExtensionTimeWillExpireRequest:self.receivedRequest withMutableNotificationContent:self.bestAttemptContent]; - - self.contentHandler(self.bestAttemptContent); -} - -@end diff --git a/example/ios/Podfile b/example/ios/Podfile deleted file mode 100644 index 2f6ad5d0..00000000 --- a/example/ios/Podfile +++ /dev/null @@ -1,46 +0,0 @@ -# Uncomment this line to define a global platform for your project -platform :ios, '13.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 - flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) -end - -target 'OneSignalNotificationServiceExtension' do - pod 'OneSignalXCFramework', '>= 5.0.2', '< 6.0.0' -end - -target 'ExampleWidgetExtension' do - pod 'OneSignalXCFramework', '>= 5.0.2', '< 6.0.0' -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_ios_build_settings(target) - end -end diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 9a5e98da..00000000 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,995 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXBuildFile section */ - 039D7DFFEE45276B942FFE74 /* libPods-ExampleWidgetExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D2D44FBAFF27C19CAC1AE79 /* libPods-ExampleWidgetExtension.a */; }; - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3370773A86F73EB1712145D3 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B51BEA71462CEE42B0AC637B /* libPods-Runner.a */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 47CD9D252BE10D9400F8B006 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47CD9D242BE10D9400F8B006 /* WidgetKit.framework */; }; - 47CD9D272BE10D9400F8B006 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47CD9D262BE10D9400F8B006 /* SwiftUI.framework */; }; - 47CD9D2A2BE10D9400F8B006 /* ExampleWidgetBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47CD9D292BE10D9400F8B006 /* ExampleWidgetBundle.swift */; }; - 47CD9D2C2BE10D9400F8B006 /* ExampleWidgetLiveActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47CD9D2B2BE10D9400F8B006 /* ExampleWidgetLiveActivity.swift */; }; - 47CD9D302BE10D9500F8B006 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 47CD9D2F2BE10D9500F8B006 /* Assets.xcassets */; }; - 47CD9D342BE10D9500F8B006 /* ExampleWidgetExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 47CD9D232BE10D9400F8B006 /* ExampleWidgetExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; - 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; }; - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; - 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; - 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 */; }; - CA2C87DA21014E1800D5D35D /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA2C87D921014E1800D5D35D /* SystemConfiguration.framework */; }; - CA2C87DC21014E1C00D5D35D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA2C87DB21014E1C00D5D35D /* UIKit.framework */; }; - CA2C87F221015A8D00D5D35D /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA2C87F121015A8C00D5D35D /* UserNotifications.framework */; }; - CAB34E9320F96BDA0024CA6B /* NotificationService.m in Sources */ = {isa = PBXBuildFile; fileRef = CAB34E9220F96BDA0024CA6B /* NotificationService.m */; }; - CAB34E9D20F96F460024CA6B /* OneSignalNotificationServiceExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = CAB34E8F20F96BDA0024CA6B /* OneSignalNotificationServiceExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - CD90A25E92780B7027960C61 /* libPods-OneSignalNotificationServiceExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E4D5B9266C7F07DB2DF5189 /* libPods-OneSignalNotificationServiceExtension.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 47CD9D322BE10D9500F8B006 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 97C146E61CF9000F007C117D /* Project object */; - proxyType = 1; - remoteGlobalIDString = 47CD9D222BE10D9400F8B006; - remoteInfo = ExampleWidgetExtension; - }; - CAB34E9E20F96F460024CA6B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 97C146E61CF9000F007C117D /* Project object */; - proxyType = 1; - remoteGlobalIDString = CAB34E8E20F96BDA0024CA6B; - remoteInfo = OneSignalNotificationServiceExtension; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; - CAB34EA020F96F460024CA6B /* Embed App Extensions */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 13; - files = ( - CAB34E9D20F96F460024CA6B /* OneSignalNotificationServiceExtension.appex in Embed App Extensions */, - 47CD9D342BE10D9500F8B006 /* ExampleWidgetExtension.appex in Embed App Extensions */, - ); - name = "Embed App 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 = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 3D2D44FBAFF27C19CAC1AE79 /* libPods-ExampleWidgetExtension.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ExampleWidgetExtension.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 47CD9D232BE10D9400F8B006 /* ExampleWidgetExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = ExampleWidgetExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; - 47CD9D242BE10D9400F8B006 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; }; - 47CD9D262BE10D9400F8B006 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; }; - 47CD9D292BE10D9400F8B006 /* ExampleWidgetBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleWidgetBundle.swift; sourceTree = ""; }; - 47CD9D2B2BE10D9400F8B006 /* ExampleWidgetLiveActivity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleWidgetLiveActivity.swift; sourceTree = ""; }; - 47CD9D2F2BE10D9500F8B006 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 47CD9D312BE10D9500F8B006 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 47FF2D2152AD7B79C3388A8D /* 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 = ""; }; - 6BBCCF44B691DF76AC7D7376 /* 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 = ""; }; - 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 8E4D5B9266C7F07DB2DF5189 /* libPods-OneSignalNotificationServiceExtension.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-OneSignalNotificationServiceExtension.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 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; }; - 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 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 = ""; }; - B51BEA71462CEE42B0AC637B /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - B6E82E5AE029B858173EAE1C /* 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 = ""; }; - C5E2684165E64B3DC2662546 /* Pods-ExampleWidgetExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleWidgetExtension.release.xcconfig"; path = "Target Support Files/Pods-ExampleWidgetExtension/Pods-ExampleWidgetExtension.release.xcconfig"; sourceTree = ""; }; - CA23C3A020F4095B00835044 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; - CA2C87D921014E1800D5D35D /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; - CA2C87DB21014E1C00D5D35D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - CA2C87F121015A8C00D5D35D /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = System/Library/Frameworks/UserNotifications.framework; sourceTree = SDKROOT; }; - CAB34E8F20F96BDA0024CA6B /* OneSignalNotificationServiceExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = OneSignalNotificationServiceExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; - CAB34E9120F96BDA0024CA6B /* NotificationService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotificationService.h; sourceTree = ""; }; - CAB34E9220F96BDA0024CA6B /* NotificationService.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NotificationService.m; sourceTree = ""; }; - CAB34E9420F96BDA0024CA6B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - CAB34E9C20F96BE60024CA6B /* OneSignalNotificationServiceExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = OneSignalNotificationServiceExtension.entitlements; sourceTree = ""; }; - E1B700F64C9347FDDF86950E /* Pods-ExampleWidgetExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleWidgetExtension.debug.xcconfig"; path = "Target Support Files/Pods-ExampleWidgetExtension/Pods-ExampleWidgetExtension.debug.xcconfig"; sourceTree = ""; }; - ED0C29CB77DA85C95D265337 /* 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 = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 47CD9D202BE10D9400F8B006 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 47CD9D272BE10D9400F8B006 /* SwiftUI.framework in Frameworks */, - 47CD9D252BE10D9400F8B006 /* WidgetKit.framework in Frameworks */, - 039D7DFFEE45276B942FFE74 /* libPods-ExampleWidgetExtension.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, - 3370773A86F73EB1712145D3 /* libPods-Runner.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CAB34E8C20F96BDA0024CA6B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - CA2C87F221015A8D00D5D35D /* UserNotifications.framework in Frameworks */, - CA2C87DC21014E1C00D5D35D /* UIKit.framework in Frameworks */, - CA2C87DA21014E1800D5D35D /* SystemConfiguration.framework in Frameworks */, - CD90A25E92780B7027960C61 /* libPods-OneSignalNotificationServiceExtension.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 47CD9D282BE10D9400F8B006 /* ExampleWidget */ = { - isa = PBXGroup; - children = ( - 47CD9D292BE10D9400F8B006 /* ExampleWidgetBundle.swift */, - 47CD9D2B2BE10D9400F8B006 /* ExampleWidgetLiveActivity.swift */, - 47CD9D2F2BE10D9500F8B006 /* Assets.xcassets */, - 47CD9D312BE10D9500F8B006 /* Info.plist */, - ); - path = ExampleWidget; - sourceTree = ""; - }; - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */, - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - CAB34E9020F96BDA0024CA6B /* OneSignalNotificationServiceExtension */, - 47CD9D282BE10D9400F8B006 /* ExampleWidget */, - 97C146EF1CF9000F007C117D /* Products */, - E458450F0521E6D94C4900F1 /* Frameworks */, - BA809C1A17A51DB9BC859D35 /* Pods */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - CAB34E8F20F96BDA0024CA6B /* OneSignalNotificationServiceExtension.appex */, - 47CD9D232BE10D9400F8B006 /* ExampleWidgetExtension.appex */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - CA23C3A020F4095B00835044 /* Runner.entitlements */, - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - ); - path = Runner; - sourceTree = ""; - }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 97C146F21CF9000F007C117D /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - BA809C1A17A51DB9BC859D35 /* Pods */ = { - isa = PBXGroup; - children = ( - B6E82E5AE029B858173EAE1C /* Pods-OneSignalNotificationServiceExtension.debug.xcconfig */, - ED0C29CB77DA85C95D265337 /* Pods-OneSignalNotificationServiceExtension.release.xcconfig */, - 6BBCCF44B691DF76AC7D7376 /* Pods-Runner.debug.xcconfig */, - 47FF2D2152AD7B79C3388A8D /* Pods-Runner.release.xcconfig */, - E1B700F64C9347FDDF86950E /* Pods-ExampleWidgetExtension.debug.xcconfig */, - C5E2684165E64B3DC2662546 /* Pods-ExampleWidgetExtension.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; - CAB34E9020F96BDA0024CA6B /* OneSignalNotificationServiceExtension */ = { - isa = PBXGroup; - children = ( - CAB34E9C20F96BE60024CA6B /* OneSignalNotificationServiceExtension.entitlements */, - CAB34E9120F96BDA0024CA6B /* NotificationService.h */, - CAB34E9220F96BDA0024CA6B /* NotificationService.m */, - CAB34E9420F96BDA0024CA6B /* Info.plist */, - ); - path = OneSignalNotificationServiceExtension; - sourceTree = ""; - }; - E458450F0521E6D94C4900F1 /* Frameworks */ = { - isa = PBXGroup; - children = ( - CA2C87F121015A8C00D5D35D /* UserNotifications.framework */, - CA2C87DB21014E1C00D5D35D /* UIKit.framework */, - CA2C87D921014E1800D5D35D /* SystemConfiguration.framework */, - 8E4D5B9266C7F07DB2DF5189 /* libPods-OneSignalNotificationServiceExtension.a */, - B51BEA71462CEE42B0AC637B /* libPods-Runner.a */, - 47CD9D242BE10D9400F8B006 /* WidgetKit.framework */, - 47CD9D262BE10D9400F8B006 /* SwiftUI.framework */, - 3D2D44FBAFF27C19CAC1AE79 /* libPods-ExampleWidgetExtension.a */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 47CD9D222BE10D9400F8B006 /* ExampleWidgetExtension */ = { - isa = PBXNativeTarget; - buildConfigurationList = 47CD9D352BE10D9500F8B006 /* Build configuration list for PBXNativeTarget "ExampleWidgetExtension" */; - buildPhases = ( - AAFA6FB39320C73BA94587BA /* [CP] Check Pods Manifest.lock */, - 47CD9D1F2BE10D9400F8B006 /* Sources */, - 47CD9D202BE10D9400F8B006 /* Frameworks */, - 47CD9D212BE10D9400F8B006 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = ExampleWidgetExtension; - productName = ExampleWidgetExtension; - productReference = 47CD9D232BE10D9400F8B006 /* ExampleWidgetExtension.appex */; - productType = "com.apple.product-type.app-extension"; - }; - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 7C664CCDDCAE18A4FAB2821F /* [CP] Check Pods Manifest.lock */, - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - CAB34EA020F96F460024CA6B /* Embed App Extensions */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 7DBAE89113053955315E306D /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - CAB34E9F20F96F460024CA6B /* PBXTargetDependency */, - 47CD9D332BE10D9500F8B006 /* PBXTargetDependency */, - ); - name = Runner; - packageProductDependencies = ( - 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */, - ); - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; - CAB34E8E20F96BDA0024CA6B /* OneSignalNotificationServiceExtension */ = { - isa = PBXNativeTarget; - buildConfigurationList = CAB34E9A20F96BDA0024CA6B /* Build configuration list for PBXNativeTarget "OneSignalNotificationServiceExtension" */; - buildPhases = ( - 4A7D357D9F0A5E700D3F3563 /* [CP] Check Pods Manifest.lock */, - CAB34E8B20F96BDA0024CA6B /* Sources */, - CAB34E8C20F96BDA0024CA6B /* Frameworks */, - CAB34E8D20F96BDA0024CA6B /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = OneSignalNotificationServiceExtension; - productName = OneSignalNotificationServiceExtension; - productReference = CAB34E8F20F96BDA0024CA6B /* OneSignalNotificationServiceExtension.appex */; - productType = "com.apple.product-type.app-extension"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 1530; - LastUpgradeCheck = 1510; - ORGANIZATIONNAME = "The Chromium Authors"; - TargetAttributes = { - 47CD9D222BE10D9400F8B006 = { - CreatedOnToolsVersion = 15.3; - }; - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - DevelopmentTeam = 99SW8E36CT; - SystemCapabilities = { - com.apple.ApplicationGroups.iOS = { - enabled = 1; - }; - com.apple.Push = { - enabled = 1; - }; - }; - }; - CAB34E8E20F96BDA0024CA6B = { - CreatedOnToolsVersion = 9.4.1; - DevelopmentTeam = 99SW8E36CT; - ProvisioningStyle = Automatic; - SystemCapabilities = { - com.apple.ApplicationGroups.iOS = { - enabled = 1; - }; - }; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - English, - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - packageReferences = ( - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */, - ); - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - CAB34E8E20F96BDA0024CA6B /* OneSignalNotificationServiceExtension */, - 47CD9D222BE10D9400F8B006 /* ExampleWidgetExtension */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 47CD9D212BE10D9400F8B006 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 47CD9D302BE10D9500F8B006 /* Assets.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CAB34E8D20F96BDA0024CA6B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 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\n"; - }; - 4A7D357D9F0A5E700D3F3563 /* [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; - }; - 7C664CCDDCAE18A4FAB2821F /* [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; - }; - 7DBAE89113053955315E306D /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignal/OneSignalFramework.framework/OneSignalFramework", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalCore/OneSignalCore.framework/OneSignalCore", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalExtension/OneSignalExtension.framework/OneSignalExtension", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalInAppMessages/OneSignalInAppMessages.framework/OneSignalInAppMessages", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalLiveActivities/OneSignalLiveActivities.framework/OneSignalLiveActivities", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalLocation/OneSignalLocation.framework/OneSignalLocation", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalNotifications/OneSignalNotifications.framework/OneSignalNotifications", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalOSCore/OneSignalOSCore.framework/OneSignalOSCore", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalOutcomes/OneSignalOutcomes.framework/OneSignalOutcomes", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalUser/OneSignalUser.framework/OneSignalUser", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalFramework.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalCore.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalExtension.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalInAppMessages.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalLiveActivities.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalLocation.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalNotifications.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalOSCore.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalOutcomes.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalUser.framework", - ); - 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\n"; - }; - AAFA6FB39320C73BA94587BA /* [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-ExampleWidgetExtension-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 */ - 47CD9D1F2BE10D9400F8B006 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 47CD9D2A2BE10D9400F8B006 /* ExampleWidgetBundle.swift in Sources */, - 47CD9D2C2BE10D9400F8B006 /* ExampleWidgetLiveActivity.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, - 97C146F31CF9000F007C117D /* main.m in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CAB34E8B20F96BDA0024CA6B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - CAB34E9320F96BDA0024CA6B /* NotificationService.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 47CD9D332BE10D9500F8B006 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 47CD9D222BE10D9400F8B006 /* ExampleWidgetExtension */; - targetProxy = 47CD9D322BE10D9500F8B006 /* PBXContainerItemProxy */; - }; - CAB34E9F20F96F460024CA6B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = CAB34E8E20F96BDA0024CA6B /* OneSignalNotificationServiceExtension */; - targetProxy = CAB34E9E20F96F460024CA6B /* 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 */ - 47CD9D362BE10D9500F8B006 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E1B700F64C9347FDDF86950E /* Pods-ExampleWidgetExtension.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = ExampleWidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = ExampleWidget; - INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2024 The Chromium Authors. All rights reserved."; - IPHONEOS_DEPLOYMENT_TARGET = 17.4; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.ExampleWidget; - 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; - }; - 47CD9D372BE10D9500F8B006 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = C5E2684165E64B3DC2662546 /* Pods-ExampleWidgetExtension.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = ExampleWidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = ExampleWidget; - INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2024 The Chromium Authors. All rights reserved."; - IPHONEOS_DEPLOYMENT_TARGET = 17.4; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.ExampleWidget; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - 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_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_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; - 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 = 13.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; - 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_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_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; - 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 = 13.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - CAB34E9820F96BDA0024CA6B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B6E82E5AE029B858173EAE1C /* Pods-OneSignalNotificationServiceExtension.debug.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 99SW8E36CT; - ENABLE_BITCODE = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.OneSignalNotificationServiceExtensionA; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - CAB34E9920F96BDA0024CA6B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = ED0C29CB77DA85C95D265337 /* Pods-OneSignalNotificationServiceExtension.release.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 99SW8E36CT; - ENABLE_BITCODE = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.OneSignalNotificationServiceExtensionA; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 47CD9D352BE10D9500F8B006 /* Build configuration list for PBXNativeTarget "ExampleWidgetExtension" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 47CD9D362BE10D9500F8B006 /* Debug */, - 47CD9D372BE10D9500F8B006 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - CAB34E9A20F96BDA0024CA6B /* Build configuration list for PBXNativeTarget "OneSignalNotificationServiceExtension" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CAB34E9820F96BDA0024CA6B /* Debug */, - CAB34E9920F96BDA0024CA6B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - -/* Begin XCLocalSwiftPackageReference section */ - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = { - isa = XCLocalSwiftPackageReference; - relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; - }; -/* End XCLocalSwiftPackageReference section */ - -/* Begin XCSwiftPackageProductDependency section */ - 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = { - isa = XCSwiftPackageProductDependency; - productName = FlutterGeneratedPluginSwiftPackage; - }; -/* End XCSwiftPackageProductDependency section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/example/ios/Runner/AppDelegate.h b/example/ios/Runner/AppDelegate.h deleted file mode 100644 index 36e21bbf..00000000 --- a/example/ios/Runner/AppDelegate.h +++ /dev/null @@ -1,6 +0,0 @@ -#import -#import - -@interface AppDelegate : FlutterAppDelegate - -@end diff --git a/example/ios/Runner/AppDelegate.m b/example/ios/Runner/AppDelegate.m deleted file mode 100644 index 59a72e90..00000000 --- a/example/ios/Runner/AppDelegate.m +++ /dev/null @@ -1,13 +0,0 @@ -#include "AppDelegate.h" -#include "GeneratedPluginRegistrant.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application - didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - [GeneratedPluginRegistrant registerWithRegistry:self]; - // Override point for customization after application launch. - return [super application:application didFinishLaunchingWithOptions:launchOptions]; -} - -@end diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab..00000000 --- a/example/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/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index 3d43d11e..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf03..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd96..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde1211..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd96..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b860..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b860..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d3..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f585..00000000 Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist deleted file mode 100644 index fa946f24..00000000 --- a/example/ios/Runner/Info.plist +++ /dev/null @@ -1,58 +0,0 @@ - - - - - CADisableMinimumFrameDurationOnPhone - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - OneSignalDemo - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - onesignal_example - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - - NSSupportsLiveActivities - - UIApplicationSupportsIndirectInputEvents - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/example/ios/Runner/main.m b/example/ios/Runner/main.m deleted file mode 100644 index dff6597e..00000000 --- a/example/ios/Runner/main.m +++ /dev/null @@ -1,9 +0,0 @@ -#import -#import -#import "AppDelegate.h" - -int main(int argc, char* argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/example/lib/main.dart b/example/lib/main.dart deleted file mode 100644 index 8728ef79..00000000 --- a/example/lib/main.dart +++ /dev/null @@ -1,608 +0,0 @@ -import 'dart:async'; -import 'dart:io'; - -import 'package:flutter/material.dart'; -import 'package:onesignal_flutter/onesignal_flutter.dart'; - -void main() => runApp(new MyApp()); - -class MyApp extends StatefulWidget { - @override - _MyAppState createState() => new _MyAppState(); -} - -class _MyAppState extends State { - String _debugLabelString = ""; - String? _emailAddress; - String? _smsNumber; - String? _externalUserId; - String? _language; - String? _liveActivityId; - bool _enableConsentButton = false; - - // CHANGE THIS parameter to true if you want to test GDPR privacy consent - bool _requireConsent = false; - - @override - void initState() { - super.initState(); - initPlatformState(); - } - - // Platform messages are asynchronous, so we initialize in an async method. - Future initPlatformState() async { - if (!mounted) return; - - OneSignal.Debug.setLogLevel(OSLogLevel.verbose); - - OneSignal.Debug.setAlertLevel(OSLogLevel.none); - OneSignal.consentRequired(_requireConsent); - - // NOTE: Replace with your own app ID from https://www.onesignal.com - OneSignal.initialize("77e32082-ea27-42e3-a898-c72e141824ef"); - - OneSignal.LiveActivities.setupDefault(); - // OneSignal.LiveActivities.setupDefault(options: new LiveActivitySetupOptions(enablePushToStart: false, enablePushToUpdate: true)); - - // AndroidOnly stat only - // OneSignal.Notifications.removeNotification(1); - // OneSignal.Notifications.removeGroupedNotifications("group5"); - - OneSignal.Notifications.clearAll(); - - OneSignal.User.pushSubscription.addObserver((state) { - print(OneSignal.User.pushSubscription.optedIn); - print(OneSignal.User.pushSubscription.id); - print(OneSignal.User.pushSubscription.token); - print(state.current.jsonRepresentation()); - }); - - OneSignal.User.addObserver((state) { - var userState = state.jsonRepresentation(); - print('OneSignal user changed: $userState'); - }); - - OneSignal.Notifications.addPermissionObserver((state) { - print("Has permission " + state.toString()); - }); - - OneSignal.Notifications.addClickListener((event) { - print( - 'NOTIFICATION CLICK LISTENER CALLED WITH EVENT: ${event.notification.title}'); - }); - - OneSignal.Notifications.addForegroundWillDisplayListener((event) { - print( - 'NOTIFICATION WILL DISPLAY LISTENER CALLED WITH: ${event.notification.title}'); - - /// Display Notification, preventDefault to not display - event.preventDefault(); - - /// Do async work - - /// notification.display() to display after preventing default - event.notification.display(); - - this.setState(() { - _debugLabelString = - "Notification received in foreground notification: \n${event.notification.jsonRepresentation().replaceAll("\\n", "\n")}"; - }); - }); - - OneSignal.InAppMessages.addClickListener((event) { - this.setState(() { - _debugLabelString = - "In App Message Clicked: \n${event.result.jsonRepresentation().replaceAll("\\n", "\n")}"; - }); - }); - OneSignal.InAppMessages.addWillDisplayListener((event) { - print("ON WILL DISPLAY IN APP MESSAGE ${event.message.messageId}"); - }); - OneSignal.InAppMessages.addDidDisplayListener((event) { - print("ON DID DISPLAY IN APP MESSAGE ${event.message.messageId}"); - }); - OneSignal.InAppMessages.addWillDismissListener((event) { - print("ON WILL DISMISS IN APP MESSAGE ${event.message.messageId}"); - }); - OneSignal.InAppMessages.addDidDismissListener((event) { - print("ON DID DISMISS IN APP MESSAGE ${event.message.messageId}"); - }); - - this.setState(() { - _enableConsentButton = _requireConsent; - }); - - // Some examples of how to use In App Messaging public methods with OneSignal SDK - oneSignalInAppMessagingTriggerExamples(); - - // Some examples of how to use Outcome Events public methods with OneSignal SDK - oneSignalOutcomeExamples(); - - OneSignal.InAppMessages.paused(true); - } - - void _handleSendTags() { - print("Sending tags"); - OneSignal.User.addTagWithKey("test2", "val2"); - - print("Sending tags array"); - var sendTags = {'test': 'value', 'test2': 'value2'}; - OneSignal.User.addTags(sendTags); - } - - void _handleRemoveTag() { - print("Deleting tag"); - OneSignal.User.removeTag("test2"); - - print("Deleting tags array"); - OneSignal.User.removeTags(['test']); - } - - void _handleGetTags() async { - print("Get tags"); - - var tags = await OneSignal.User.getTags(); - print(tags); - } - - void _handleTrackEvent() { - print("Tracking events"); - - // Detect platform - String platform = Platform.isAndroid - ? 'android' - : Platform.isIOS - ? 'ios' - : 'unknown'; - - // Track event without properties - OneSignal.User.trackEvent("Flutter-$platform-noprops"); - - // Track event with properties - OneSignal.User.trackEvent("Flutter-$platform", { - "someNum": 123, - "someFloat": 3.14159, - "someString": "abc", - "someBool": true, - "someObject": { - "abc": "123", - "nested": { - "def": '456', - }, - "ghi": null, - }, - "someArray": [1, 2], - "someMixedArray": [ - 1, - "2", - {"abc": "123"}, - null, - ], - "someNull": null, - }); - } - - void _handlePromptForPushPermission() { - print("Prompting for Permission"); - OneSignal.Notifications.requestPermission(true); - } - - void _handleSetLanguage() { - if (_language == null) return; - print("Setting language"); - OneSignal.User.setLanguage(_language!); - } - - void _handleSetEmail() { - if (_emailAddress == null) return; - print("Setting email"); - - OneSignal.User.addEmail(_emailAddress!); - } - - void _handleRemoveEmail() { - if (_emailAddress == null) return; - print("Remove email"); - - OneSignal.User.removeEmail(_emailAddress!); - } - - void _handleSetSMSNumber() { - if (_smsNumber == null) return; - print("Setting SMS Number"); - - OneSignal.User.addSms(_smsNumber!); - } - - void _handleRemoveSMSNumber() { - if (_smsNumber == null) return; - print("Remove smsNumber"); - - OneSignal.User.removeSms(_smsNumber!); - } - - void _handleConsent() { - print("Setting consent to true"); - OneSignal.consentGiven(true); - - print("Setting state"); - this.setState(() { - _enableConsentButton = false; - }); - } - - void _handleSetLocationShared() { - print("Setting location shared to true"); - OneSignal.Location.setShared(true); - } - - void _handleGetExternalId() async { - var externalId = await OneSignal.User.getExternalId(); - print('External ID: $externalId'); - } - - void _handleLogin() { - print("Setting external user ID"); - if (_externalUserId == null) return; - OneSignal.login(_externalUserId!); - OneSignal.User.addAlias("fb_id", "1341524"); - } - - void _handleLogout() { - OneSignal.logout(); - OneSignal.User.removeAlias("fb_id"); - } - - void _handleGetOnesignalId() async { - var onesignalId = await OneSignal.User.getOnesignalId(); - print('OneSignal ID: $onesignalId'); - } - - oneSignalInAppMessagingTriggerExamples() async { - /// Example addTrigger call for IAM - /// This will add 1 trigger so if there are any IAM satisfying it, it - /// will be shown to the user - OneSignal.InAppMessages.addTrigger("trigger_1", "one"); - - /// Example addTriggers call for IAM - /// This will add 2 triggers so if there are any IAM satisfying these, they - /// will be shown to the user - Map triggers = new Map(); - triggers["trigger_2"] = "two"; - triggers["trigger_3"] = "three"; - OneSignal.InAppMessages.addTriggers(triggers); - - // Removes a trigger by its key so if any future IAM are pulled with - // these triggers they will not be shown until the trigger is added back - OneSignal.InAppMessages.removeTrigger("trigger_2"); - - // Create a list and bulk remove triggers based on keys supplied - List keys = ["trigger_1", "trigger_3"]; - OneSignal.InAppMessages.removeTriggers(keys); - - // Toggle pausing (displaying or not) of IAMs - OneSignal.InAppMessages.paused(true); - var arePaused = await OneSignal.InAppMessages.arePaused(); - print('Notifications paused $arePaused'); - } - - oneSignalOutcomeExamples() async { - OneSignal.Session.addOutcome("normal_1"); - OneSignal.Session.addOutcome("normal_2"); - - OneSignal.Session.addUniqueOutcome("unique_1"); - OneSignal.Session.addUniqueOutcome("unique_2"); - - OneSignal.Session.addOutcomeWithValue("value_1", 3.2); - OneSignal.Session.addOutcomeWithValue("value_2", 3.9); - } - - void _handleOptIn() { - OneSignal.User.pushSubscription.optIn(); - } - - void _handleOptOut() { - OneSignal.User.pushSubscription.optOut(); - } - - void _handleStartDefaultLiveActivity() { - if (_liveActivityId == null) return; - print("Starting default live activity"); - OneSignal.LiveActivities.startDefault(_liveActivityId!, { - "title": "Welcome!" - }, { - "message": {"en": "Hello World!"}, - "intValue": 3, - "doubleValue": 3.14, - "boolValue": true - }); - } - - void _handleEnterLiveActivity() { - if (_liveActivityId == null) return; - print("Entering live activity"); - OneSignal.LiveActivities.enterLiveActivity(_liveActivityId!, "FAKE_TOKEN"); - } - - void _handleExitLiveActivity() { - if (_liveActivityId == null) return; - print("Exiting live activity"); - OneSignal.LiveActivities.exitLiveActivity(_liveActivityId!); - } - - void _handleSetPushToStartLiveActivity() { - if (_liveActivityId == null) return; - print("Setting Push-To-Start live activity"); - OneSignal.LiveActivities.setPushToStartToken( - _liveActivityId!, "FAKE_TOKEN"); - } - - void _handleRemovePushToStartLiveActivity() { - if (_liveActivityId == null) return; - print("Setting Push-To-Start live activity"); - OneSignal.LiveActivities.removePushToStartToken(_liveActivityId!); - } - - @override - Widget build(BuildContext context) { - return new MaterialApp( - home: new Scaffold( - appBar: new AppBar( - title: const Text('OneSignal Flutter Demo'), - backgroundColor: Color.fromARGB(255, 212, 86, 83), - ), - body: Container( - padding: EdgeInsets.all(10.0), - child: SingleChildScrollView( - child: new Table( - children: [ - new TableRow(children: [ - new OneSignalButton( - "Send Tags", _handleSendTags, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton( - "Get Tags", _handleGetTags, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton( - "Track Event", _handleTrackEvent, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Prompt for Push Permission", - _handlePromptForPushPermission, !_enableConsentButton) - ]), - new TableRow(children: [ - new TextField( - textAlign: TextAlign.center, - decoration: InputDecoration( - hintText: "Email Address", - labelStyle: TextStyle( - color: Color.fromARGB(255, 212, 86, 83), - )), - onChanged: (text) { - this.setState(() { - _emailAddress = text == "" ? null : text; - }); - }, - ) - ]), - new TableRow(children: [ - Container( - height: 8.0, - ) - ]), - new TableRow(children: [ - new OneSignalButton( - "Set Email", _handleSetEmail, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Logout Email", _handleRemoveEmail, - !_enableConsentButton) - ]), - new TableRow(children: [ - new TextField( - textAlign: TextAlign.center, - decoration: InputDecoration( - hintText: "SMS Number", - labelStyle: TextStyle( - color: Color.fromARGB(255, 212, 86, 83), - )), - onChanged: (text) { - this.setState(() { - _smsNumber = text == "" ? null : text; - }); - }, - ) - ]), - new TableRow(children: [ - Container( - height: 8.0, - ) - ]), - new TableRow(children: [ - new OneSignalButton("Set SMS Number", _handleSetSMSNumber, - !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Remove SMS Number", - _handleRemoveSMSNumber, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Provide GDPR Consent", _handleConsent, - _enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Set Location Shared", - _handleSetLocationShared, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton( - "Remove Tag", _handleRemoveTag, !_enableConsentButton) - ]), - new TableRow(children: [ - new TextField( - textAlign: TextAlign.center, - decoration: InputDecoration( - hintText: "External User ID", - labelStyle: TextStyle( - color: Color.fromARGB(255, 212, 86, 83), - )), - onChanged: (text) { - this.setState(() { - _externalUserId = text == "" ? null : text; - }); - }, - ) - ]), - new TableRow(children: [ - Container( - height: 8.0, - ) - ]), - new TableRow(children: [ - new OneSignalButton("Get External User ID", - _handleGetExternalId, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Set External User ID", _handleLogin, - !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Remove External User ID", - _handleLogout, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Get OneSignal ID", - _handleGetOnesignalId, !_enableConsentButton) - ]), - new TableRow(children: [ - new TextField( - textAlign: TextAlign.center, - decoration: InputDecoration( - hintText: "Language", - labelStyle: TextStyle( - color: Color.fromARGB(255, 212, 86, 83), - )), - onChanged: (text) { - this.setState(() { - _language = text == "" ? null : text; - }); - }, - ) - ]), - new TableRow(children: [ - Container( - height: 8.0, - ) - ]), - new TableRow(children: [ - new OneSignalButton("Set Language", _handleSetLanguage, - !_enableConsentButton) - ]), - new TableRow(children: [ - new Container( - child: new Text(_debugLabelString), - alignment: Alignment.center, - ) - ]), - new TableRow(children: [ - new OneSignalButton( - "Opt In", _handleOptIn, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton( - "Opt Out", _handleOptOut, !_enableConsentButton) - ]), - new TableRow(children: [ - new TextField( - textAlign: TextAlign.center, - decoration: InputDecoration( - hintText: "Live Activity ID", - labelStyle: TextStyle( - color: Color.fromARGB(255, 212, 86, 83), - )), - onChanged: (text) { - this.setState(() { - _liveActivityId = text == "" ? null : text; - }); - }, - ) - ]), - new TableRow(children: [ - Container( - height: 8.0, - ) - ]), - new TableRow(children: [ - new OneSignalButton("Start Default Live Activity", - _handleStartDefaultLiveActivity, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Enter Live Activity", - _handleEnterLiveActivity, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Exit Live Activity", - _handleExitLiveActivity, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton( - "Set Push-To-Start Live Activity", - _handleSetPushToStartLiveActivity, - !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton( - "Remove Push-To-Start Live Activity", - _handleRemovePushToStartLiveActivity, - !_enableConsentButton) - ]), - ], - ), - ), - )), - ); - } -} - -typedef void OnButtonPressed(); - -class OneSignalButton extends StatefulWidget { - final String title; - final OnButtonPressed onPressed; - final bool enabled; - - OneSignalButton(this.title, this.onPressed, this.enabled); - - State createState() => new OneSignalButtonState(); -} - -class OneSignalButtonState extends State { - @override - Widget build(BuildContext context) { - // TODO: implement build - return new Table( - children: [ - new TableRow(children: [ - new TextButton( - style: TextButton.styleFrom( - foregroundColor: Colors.white, - disabledForegroundColor: Colors.white, - backgroundColor: Color.fromARGB(255, 212, 86, 83), - disabledBackgroundColor: Color.fromARGB(180, 212, 86, 83), - padding: EdgeInsets.all(8.0), - ), - child: new Text(widget.title), - onPressed: widget.enabled ? widget.onPressed : null, - ) - ]), - new TableRow(children: [ - Container( - height: 8.0, - ) - ]), - ], - ); - } -} diff --git a/example/pubspec.yaml b/example/pubspec.yaml deleted file mode 100644 index 67776d10..00000000 --- a/example/pubspec.yaml +++ /dev/null @@ -1,61 +0,0 @@ -name: onesignal_example -description: Demonstrates how to use the onesignal plugin. -version: 1.0.0+1 - -dependencies: - flutter: - sdk: flutter - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.0 - onesignal_flutter: - path: ../ - -environment: - sdk: ">=2.12.0 <3.0.0" - -dev_dependencies: - flutter_test: - sdk: flutter - flutter_lints: ^2.0.0 - -# For information on the generic Dart part of this file, see the -# following page: https://www.dartlang.org/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.io/assets-and-images/#resolution-aware. - - # For details regarding adding assets from package dependencies, see - # https://flutter.io/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.io/custom-fonts/#from-packages diff --git a/example/test/widget_test.dart b/example/test/widget_test.dart deleted file mode 100644 index 3127d8f4..00000000 --- a/example/test/widget_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility in the flutter_test package. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:onesignal_example/main.dart'; - -void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(MyApp()); - - // Verify that our counter starts at 0. - expect(find.text('0'), findsOneWidget); - expect(find.text('1'), findsNothing); - - // Tap the '+' icon and trigger a frame. - await tester.tap(find.byIcon(Icons.add)); - await tester.pump(); - - // Verify that our counter has incremented. - expect(find.text('0'), findsNothing); - expect(find.text('1'), findsOneWidget); - }); -} diff --git a/example_pod/.gitignore b/example_pod/.gitignore deleted file mode 100644 index 18d5e693..00000000 --- a/example_pod/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -.DS_Store -.dart_tool/ - -.packages -.pub/ - -build/ - -.flutter-plugins -.flutter-plugins-dependencies -flutter_export_environment.sh \ No newline at end of file diff --git a/example_pod/.metadata b/example_pod/.metadata deleted file mode 100644 index 0f6195d3..00000000 --- a/example_pod/.metadata +++ /dev/null @@ -1,30 +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: "ac4e799d237041cf905519190471f657b657155a" - channel: "stable" - -project_type: app - -# Tracks metadata for the flutter migrate command -migration: - platforms: - - platform: root - create_revision: ac4e799d237041cf905519190471f657b657155a - base_revision: ac4e799d237041cf905519190471f657b657155a - - platform: android - create_revision: ac4e799d237041cf905519190471f657b657155a - base_revision: ac4e799d237041cf905519190471f657b657155a - - # 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/example_pod/README.md b/example_pod/README.md deleted file mode 100644 index 13327bf6..00000000 --- a/example_pod/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# onesignal_example - -Demonstrates how to use the onesignal plugin. - -# iOS - -First you may need to run `pod install` in the ios folder. -Then launch a simulator then you can run `flutter run`. - -# Android - -Make sure you have the Android SDK cli tools and have accepted the license agreements. -E.g. - -``` -flutter doctor --android-licenses -``` - -Then launch an Android emulator e.g. - -``` -flutter emulators --launch Medium_Phone_API_35; -``` - -And then you can run `flutter run`. - -If you are using an older Flutter or Android Studio version, you may see an error about `ndkVersion`. Follow the instructions to update the version in `build.gradle.kts`. - -## Getting Started - -For help getting started with Flutter, view our online -[documentation](https://flutter.io/). diff --git a/example_pod/android/.gitignore b/example_pod/android/.gitignore deleted file mode 100644 index be3943c9..00000000 --- a/example_pod/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/example_pod/android/app/build.gradle.kts b/example_pod/android/app/build.gradle.kts deleted file mode 100644 index 5001623b..00000000 --- a/example_pod/android/app/build.gradle.kts +++ /dev/null @@ -1,44 +0,0 @@ -plugins { - id("com.android.application") - id("kotlin-android") - // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. - id("dev.flutter.flutter-gradle-plugin") -} - -android { - namespace = "com.onesignal.onesignal_example" - compileSdk = flutter.compileSdkVersion - ndkVersion = flutter.ndkVersion - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_11.toString() - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId = "com.onesignal.onesignal_example" - // 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") - } - } -} - -flutter { - source = "../.." -} diff --git a/example_pod/android/app/src/debug/AndroidManifest.xml b/example_pod/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 399f6981..00000000 --- a/example_pod/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/example_pod/android/app/src/main/AndroidManifest.xml b/example_pod/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 4dc65895..00000000 --- a/example_pod/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/example_pod/android/app/src/main/res/drawable-v21/launch_background.xml b/example_pod/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index f74085f3..00000000 --- a/example_pod/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/example_pod/android/app/src/main/res/drawable/launch_background.xml b/example_pod/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f8..00000000 --- a/example_pod/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/example_pod/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/example_pod/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b..00000000 Binary files a/example_pod/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/example_pod/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/example_pod/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79..00000000 Binary files a/example_pod/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/example_pod/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/example_pod/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d43914..00000000 Binary files a/example_pod/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/example_pod/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/example_pod/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d3..00000000 Binary files a/example_pod/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/example_pod/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/example_pod/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372ee..00000000 Binary files a/example_pod/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/example_pod/android/app/src/main/res/values-night/styles.xml b/example_pod/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 06952be7..00000000 --- a/example_pod/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/example_pod/android/app/src/main/res/values/styles.xml b/example_pod/android/app/src/main/res/values/styles.xml deleted file mode 100644 index cb1ef880..00000000 --- a/example_pod/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/example_pod/android/app/src/profile/AndroidManifest.xml b/example_pod/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 399f6981..00000000 --- a/example_pod/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/example_pod/android/build.gradle.kts b/example_pod/android/build.gradle.kts deleted file mode 100644 index dbee657b..00000000 --- a/example_pod/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/example_pod/android/gradle.properties b/example_pod/android/gradle.properties deleted file mode 100644 index f018a618..00000000 --- a/example_pod/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError -android.useAndroidX=true -android.enableJetifier=true diff --git a/example_pod/android/gradle/wrapper/gradle-wrapper.properties b/example_pod/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 02767eb1..00000000 --- a/example_pod/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-8.13-all.zip diff --git a/example_pod/ios/.gitignore b/example_pod/ios/.gitignore deleted file mode 100644 index 79cc4da8..00000000 --- a/example_pod/ios/.gitignore +++ /dev/null @@ -1,45 +0,0 @@ -.idea/ -.vagrant/ -.sconsign.dblite -.svn/ - -.DS_Store -*.swp -profile - -DerivedData/ -build/ -GeneratedPluginRegistrant.h -GeneratedPluginRegistrant.m - -.generated/ - -*.pbxuser -*.mode1v3 -*.mode2v3 -*.perspectivev3 - -!default.pbxuser -!default.mode1v3 -!default.mode2v3 -!default.perspectivev3 - -xcuserdata - -*.moved-aside - -*.pyc -*sync/ -Icon? -.tags* - -/Flutter/app.flx -/Flutter/app.zip -/Flutter/flutter_assets/ -/Flutter/App.framework -/Flutter/Flutter.framework -/Flutter/Generated.xcconfig -/ServiceDefinitions.json - -Pods/ -.symlinks/ diff --git a/example_pod/ios/ExampleWidget/Assets.xcassets/AccentColor.colorset/Contents.json b/example_pod/ios/ExampleWidget/Assets.xcassets/AccentColor.colorset/Contents.json deleted file mode 100644 index eb878970..00000000 --- a/example_pod/ios/ExampleWidget/Assets.xcassets/AccentColor.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/example_pod/ios/ExampleWidget/Assets.xcassets/AppIcon.appiconset/Contents.json b/example_pod/ios/ExampleWidget/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 13613e3e..00000000 --- a/example_pod/ios/ExampleWidget/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/example_pod/ios/ExampleWidget/Assets.xcassets/Contents.json b/example_pod/ios/ExampleWidget/Assets.xcassets/Contents.json deleted file mode 100644 index 73c00596..00000000 --- a/example_pod/ios/ExampleWidget/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/example_pod/ios/ExampleWidget/Assets.xcassets/WidgetBackground.colorset/Contents.json b/example_pod/ios/ExampleWidget/Assets.xcassets/WidgetBackground.colorset/Contents.json deleted file mode 100644 index eb878970..00000000 --- a/example_pod/ios/ExampleWidget/Assets.xcassets/WidgetBackground.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/example_pod/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/Contents.json b/example_pod/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/Contents.json deleted file mode 100644 index 0eddeb7c..00000000 --- a/example_pod/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "onesignal-logo.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/example_pod/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/onesignal-logo.png b/example_pod/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/onesignal-logo.png deleted file mode 100644 index ba97c7a7..00000000 Binary files a/example_pod/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/onesignal-logo.png and /dev/null differ diff --git a/example_pod/ios/ExampleWidget/ExampleWidgetBundle.swift b/example_pod/ios/ExampleWidget/ExampleWidgetBundle.swift deleted file mode 100644 index 71407d0a..00000000 --- a/example_pod/ios/ExampleWidget/ExampleWidgetBundle.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// ExampleWidgetBundle.swift -// ExampleWidget -// -// Created by Brian Smith on 4/30/24. -// Copyright © 2024 The Chromium Authors. All rights reserved. -// - -import WidgetKit -import SwiftUI - -@main -struct ExampleWidgetBundle: WidgetBundle { - var body: some Widget { - ExampleWidgetLiveActivity() - } -} diff --git a/example_pod/ios/ExampleWidget/ExampleWidgetLiveActivity.swift b/example_pod/ios/ExampleWidget/ExampleWidgetLiveActivity.swift deleted file mode 100644 index f372e2ef..00000000 --- a/example_pod/ios/ExampleWidget/ExampleWidgetLiveActivity.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// ExampleWidgetLiveActivity.swift -// ExampleWidget -// -// Created by Brian Smith on 4/30/24. -// Copyright © 2024 The Chromium Authors. All rights reserved. -// - -import ActivityKit -import WidgetKit -import SwiftUI -import OneSignalLiveActivities - -struct ExampleWidgetLiveActivity: Widget { - var body: some WidgetConfiguration { - ActivityConfiguration(for: DefaultLiveActivityAttributes.self) { context in - // Lock screen/banner UI goes here\VStack(alignment: .leading) { - VStack { - Spacer() - Text("FLUTTER: " + (context.attributes.data["title"]?.asString() ?? "")).font(.headline) - Spacer() - HStack { - Spacer() - Label { - Text(context.state.data["message"]?.asDict()?["en"]?.asString() ?? "") - } icon: { - Image("onesignaldemo") - .resizable() - .scaledToFit() - .frame(width: 40.0, height: 40.0) - } - Spacer() - } - Text("INT: " + String(context.state.data["intValue"]?.asInt() ?? 0)) - Text("DBL: " + String(context.state.data["doubleValue"]?.asDouble() ?? 0.0)) - Text("BOL: " + String(context.state.data["boolValue"]?.asBool() ?? false)) - Spacer() - } - .activitySystemActionForegroundColor(.black) - .activityBackgroundTint(.white) - } dynamicIsland: { _ in - DynamicIsland { - // Expanded UI goes here. Compose the expanded UI through - // various regions, like leading/trailing/center/bottom - DynamicIslandExpandedRegion(.leading) { - Text("Leading") - } - DynamicIslandExpandedRegion(.trailing) { - Text("Trailing") - } - DynamicIslandExpandedRegion(.bottom) { - Text("Bottom") - // more content - } - } compactLeading: { - Text("L") - } compactTrailing: { - Text("T") - } minimal: { - Text("Min") - } - .widgetURL(URL(string: "http://www.apple.com")) - .keylineTint(Color.red) - } - } -} diff --git a/example_pod/ios/ExampleWidget/Info.plist b/example_pod/ios/ExampleWidget/Info.plist deleted file mode 100644 index 0f118fb7..00000000 --- a/example_pod/ios/ExampleWidget/Info.plist +++ /dev/null @@ -1,11 +0,0 @@ - - - - - NSExtension - - NSExtensionPointIdentifier - com.apple.widgetkit-extension - - - diff --git a/example_pod/ios/Flutter/AppFrameworkInfo.plist b/example_pod/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 1dc6cf76..00000000 --- a/example_pod/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +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 - MinimumOSVersion - 13.0 - - diff --git a/example_pod/ios/Flutter/Debug.xcconfig b/example_pod/ios/Flutter/Debug.xcconfig deleted file mode 100644 index e8efba11..00000000 --- a/example_pod/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/example_pod/ios/Flutter/Flutter.podspec b/example_pod/ios/Flutter/Flutter.podspec deleted file mode 100644 index 3aed58d3..00000000 --- a/example_pod/ios/Flutter/Flutter.podspec +++ /dev/null @@ -1,18 +0,0 @@ -# -# This podspec is NOT to be published. It is only used as a local source! -# This is a generated file; do not edit or check into version control. -# - -Pod::Spec.new do |s| - s.name = 'Flutter' - s.version = '1.0.0' - s.summary = 'A UI toolkit for beautiful and fast apps.' - s.homepage = 'https://flutter.dev' - s.license = { :type => 'BSD' } - s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } - s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } - s.ios.deployment_target = '13.0' - # Framework linking is handled by Flutter tooling, not CocoaPods. - # Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs. - s.vendored_frameworks = 'path/to/nothing' -end diff --git a/example_pod/ios/Flutter/Release.xcconfig b/example_pod/ios/Flutter/Release.xcconfig deleted file mode 100644 index 399e9340..00000000 --- a/example_pod/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/example_pod/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Package.swift b/example_pod/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Package.swift deleted file mode 100644 index 63cc62e3..00000000 --- a/example_pod/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Package.swift +++ /dev/null @@ -1,25 +0,0 @@ -// swift-tools-version: 5.9 -// The swift-tools-version declares the minimum version of Swift required to build this package. -// -// Generated file. Do not edit. -// - -import PackageDescription - -let package = Package( - name: "FlutterGeneratedPluginSwiftPackage", - platforms: [ - .iOS("13.0") - ], - products: [ - .library(name: "FlutterGeneratedPluginSwiftPackage", type: .static, targets: ["FlutterGeneratedPluginSwiftPackage"]) - ], - dependencies: [ - - ], - targets: [ - .target( - name: "FlutterGeneratedPluginSwiftPackage" - ) - ] -) diff --git a/example_pod/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Sources/FlutterGeneratedPluginSwiftPackage/FlutterGeneratedPluginSwiftPackage.swift b/example_pod/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Sources/FlutterGeneratedPluginSwiftPackage/FlutterGeneratedPluginSwiftPackage.swift deleted file mode 100644 index 62e7b11a..00000000 --- a/example_pod/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Sources/FlutterGeneratedPluginSwiftPackage/FlutterGeneratedPluginSwiftPackage.swift +++ /dev/null @@ -1,3 +0,0 @@ -// -// Generated file. Do not edit. -// diff --git a/example_pod/ios/Flutter/ephemeral/flutter_lldb_helper.py b/example_pod/ios/Flutter/ephemeral/flutter_lldb_helper.py deleted file mode 100644 index a88caf99..00000000 --- a/example_pod/ios/Flutter/ephemeral/flutter_lldb_helper.py +++ /dev/null @@ -1,32 +0,0 @@ -# -# Generated file, do not edit. -# - -import lldb - -def handle_new_rx_page(frame: lldb.SBFrame, bp_loc, extra_args, intern_dict): - """Intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGES and touch the pages.""" - base = frame.register["x0"].GetValueAsAddress() - page_len = frame.register["x1"].GetValueAsUnsigned() - - # Note: NOTIFY_DEBUGGER_ABOUT_RX_PAGES will check contents of the - # first page to see if handled it correctly. This makes diagnosing - # misconfiguration (e.g. missing breakpoint) easier. - data = bytearray(page_len) - data[0:8] = b'IHELPED!' - - error = lldb.SBError() - frame.GetThread().GetProcess().WriteMemory(base, data, error) - if not error.Success(): - print(f'Failed to write into {base}[+{page_len}]', error) - return - -def __lldb_init_module(debugger: lldb.SBDebugger, _): - target = debugger.GetDummyTarget() - # Caveat: must use BreakpointCreateByRegEx here and not - # BreakpointCreateByName. For some reasons callback function does not - # get carried over from dummy target for the later. - bp = target.BreakpointCreateByRegex("^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$") - bp.SetScriptCallbackFunction('{}.handle_new_rx_page'.format(__name__)) - bp.SetAutoContinue(True) - print("-- LLDB integration loaded --") diff --git a/example_pod/ios/Flutter/ephemeral/flutter_lldbinit b/example_pod/ios/Flutter/ephemeral/flutter_lldbinit deleted file mode 100644 index e3ba6fbe..00000000 --- a/example_pod/ios/Flutter/ephemeral/flutter_lldbinit +++ /dev/null @@ -1,5 +0,0 @@ -# -# Generated file, do not edit. -# - -command script import --relative-to-command-file flutter_lldb_helper.py diff --git a/example_pod/ios/OneSignalNotificationServiceExtension/Info.plist b/example_pod/ios/OneSignalNotificationServiceExtension/Info.plist deleted file mode 100644 index 7fe6f1d2..00000000 --- a/example_pod/ios/OneSignalNotificationServiceExtension/Info.plist +++ /dev/null @@ -1,36 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - OneSignalNotificationServiceExtension - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - XPC! - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - - NSExtension - - NSExtensionPointIdentifier - com.apple.usernotifications.service - NSExtensionPrincipalClass - NotificationService - - - diff --git a/example_pod/ios/OneSignalNotificationServiceExtension/NotificationService.h b/example_pod/ios/OneSignalNotificationServiceExtension/NotificationService.h deleted file mode 100644 index 7ae1037b..00000000 --- a/example_pod/ios/OneSignalNotificationServiceExtension/NotificationService.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// NotificationService.h -// OneSignalNotificationServiceExtension -// -// Created by Brad Hesse on 7/13/18. -// Copyright © 2018 The Chromium Authors. All rights reserved. -// - -#import - -@interface NotificationService : UNNotificationServiceExtension - -@end diff --git a/example_pod/ios/OneSignalNotificationServiceExtension/NotificationService.m b/example_pod/ios/OneSignalNotificationServiceExtension/NotificationService.m deleted file mode 100644 index a692bf33..00000000 --- a/example_pod/ios/OneSignalNotificationServiceExtension/NotificationService.m +++ /dev/null @@ -1,40 +0,0 @@ -// -// NotificationService.m -// OneSignalNotificationServiceExtension -// -// Created by Brad Hesse on 7/13/18. -// Copyright © 2018 The Chromium Authors. All rights reserved. -// - -#import - -#import "NotificationService.h" - -@interface NotificationService () - -@property (nonatomic, strong) void (^contentHandler)(UNNotificationContent *contentToDeliver); -@property (nonatomic, strong) UNNotificationRequest *receivedRequest; -@property (nonatomic, strong) UNMutableNotificationContent *bestAttemptContent; - -@end - -@implementation NotificationService - -- (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler { - self.receivedRequest = request; - self.contentHandler = contentHandler; - self.bestAttemptContent = [request.content mutableCopy]; - - [OneSignal didReceiveNotificationExtensionRequest:self.receivedRequest withMutableNotificationContent:self.bestAttemptContent withContentHandler:self.contentHandler]; -} - -- (void)serviceExtensionTimeWillExpire { - // Called just before the extension will be terminated by the system. - // Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used. - - [OneSignal serviceExtensionTimeWillExpireRequest:self.receivedRequest withMutableNotificationContent:self.bestAttemptContent]; - - self.contentHandler(self.bestAttemptContent); -} - -@end diff --git a/example_pod/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements b/example_pod/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements deleted file mode 100644 index c70461e8..00000000 --- a/example_pod/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements +++ /dev/null @@ -1,10 +0,0 @@ - - - - - com.apple.security.application-groups - - group.com.onesignal.example.onesignal - - - diff --git a/example_pod/ios/Podfile.lock b/example_pod/ios/Podfile.lock deleted file mode 100644 index 4faed947..00000000 --- a/example_pod/ios/Podfile.lock +++ /dev/null @@ -1,75 +0,0 @@ -PODS: - - Flutter (1.0.0) - - onesignal_flutter (5.3.4): - - Flutter - - OneSignalXCFramework (= 5.2.15) - - OneSignalXCFramework (5.2.15): - - OneSignalXCFramework/OneSignalComplete (= 5.2.15) - - OneSignalXCFramework/OneSignal (5.2.15): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalExtension - - OneSignalXCFramework/OneSignalLiveActivities - - OneSignalXCFramework/OneSignalNotifications - - OneSignalXCFramework/OneSignalOSCore - - OneSignalXCFramework/OneSignalOutcomes - - OneSignalXCFramework/OneSignalUser - - OneSignalXCFramework/OneSignalComplete (5.2.15): - - OneSignalXCFramework/OneSignal - - OneSignalXCFramework/OneSignalInAppMessages - - OneSignalXCFramework/OneSignalLocation - - OneSignalXCFramework/OneSignalCore (5.2.15) - - OneSignalXCFramework/OneSignalExtension (5.2.15): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalOutcomes - - OneSignalXCFramework/OneSignalInAppMessages (5.2.15): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalNotifications - - OneSignalXCFramework/OneSignalOSCore - - OneSignalXCFramework/OneSignalOutcomes - - OneSignalXCFramework/OneSignalUser - - OneSignalXCFramework/OneSignalLiveActivities (5.2.15): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalOSCore - - OneSignalXCFramework/OneSignalUser - - OneSignalXCFramework/OneSignalLocation (5.2.15): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalNotifications - - OneSignalXCFramework/OneSignalOSCore - - OneSignalXCFramework/OneSignalUser - - OneSignalXCFramework/OneSignalNotifications (5.2.15): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalExtension - - OneSignalXCFramework/OneSignalOutcomes - - OneSignalXCFramework/OneSignalOSCore (5.2.15): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalOutcomes (5.2.15): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalUser (5.2.15): - - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalNotifications - - OneSignalXCFramework/OneSignalOSCore - - OneSignalXCFramework/OneSignalOutcomes - -DEPENDENCIES: - - Flutter (from `Flutter`) - - onesignal_flutter (from `.symlinks/plugins/onesignal_flutter/ios`) - - OneSignalXCFramework (< 6.0.0, >= 5.0.2) - -SPEC REPOS: - trunk: - - OneSignalXCFramework - -EXTERNAL SOURCES: - Flutter: - :path: Flutter - onesignal_flutter: - :path: ".symlinks/plugins/onesignal_flutter/ios" - -SPEC CHECKSUMS: - Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467 - onesignal_flutter: 3bc39554927b132771c6838d91f431d5368b4ada - OneSignalXCFramework: ea9e14a95b92ad48d9b35037cbae88a9542bdea3 - -PODFILE CHECKSUM: 008ee3527530ade7ae7311fc02a615df31949c2e - -COCOAPODS: 1.16.2 diff --git a/example_pod/ios/Runner.xcodeproj/project.pbxproj b/example_pod/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index b4b74773..00000000 --- a/example_pod/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,995 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXBuildFile section */ - 039D7DFFEE45276B942FFE74 /* libPods-ExampleWidgetExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D2D44FBAFF27C19CAC1AE79 /* libPods-ExampleWidgetExtension.a */; }; - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3370773A86F73EB1712145D3 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B51BEA71462CEE42B0AC637B /* libPods-Runner.a */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 47CD9D252BE10D9400F8B006 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47CD9D242BE10D9400F8B006 /* WidgetKit.framework */; }; - 47CD9D272BE10D9400F8B006 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47CD9D262BE10D9400F8B006 /* SwiftUI.framework */; }; - 47CD9D2A2BE10D9400F8B006 /* ExampleWidgetBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47CD9D292BE10D9400F8B006 /* ExampleWidgetBundle.swift */; }; - 47CD9D2C2BE10D9400F8B006 /* ExampleWidgetLiveActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47CD9D2B2BE10D9400F8B006 /* ExampleWidgetLiveActivity.swift */; }; - 47CD9D302BE10D9500F8B006 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 47CD9D2F2BE10D9500F8B006 /* Assets.xcassets */; }; - 47CD9D342BE10D9500F8B006 /* ExampleWidgetExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 47CD9D232BE10D9400F8B006 /* ExampleWidgetExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; - 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; }; - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; - 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; - 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 */; }; - CA2C87DA21014E1800D5D35D /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA2C87D921014E1800D5D35D /* SystemConfiguration.framework */; }; - CA2C87DC21014E1C00D5D35D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA2C87DB21014E1C00D5D35D /* UIKit.framework */; }; - CA2C87F221015A8D00D5D35D /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA2C87F121015A8C00D5D35D /* UserNotifications.framework */; }; - CAB34E9320F96BDA0024CA6B /* NotificationService.m in Sources */ = {isa = PBXBuildFile; fileRef = CAB34E9220F96BDA0024CA6B /* NotificationService.m */; }; - CAB34E9D20F96F460024CA6B /* OneSignalNotificationServiceExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = CAB34E8F20F96BDA0024CA6B /* OneSignalNotificationServiceExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - CD90A25E92780B7027960C61 /* libPods-OneSignalNotificationServiceExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E4D5B9266C7F07DB2DF5189 /* libPods-OneSignalNotificationServiceExtension.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 47CD9D322BE10D9500F8B006 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 97C146E61CF9000F007C117D /* Project object */; - proxyType = 1; - remoteGlobalIDString = 47CD9D222BE10D9400F8B006; - remoteInfo = ExampleWidgetExtension; - }; - CAB34E9E20F96F460024CA6B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 97C146E61CF9000F007C117D /* Project object */; - proxyType = 1; - remoteGlobalIDString = CAB34E8E20F96BDA0024CA6B; - remoteInfo = OneSignalNotificationServiceExtension; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; - CAB34EA020F96F460024CA6B /* Embed App Extensions */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 13; - files = ( - CAB34E9D20F96F460024CA6B /* OneSignalNotificationServiceExtension.appex in Embed App Extensions */, - 47CD9D342BE10D9500F8B006 /* ExampleWidgetExtension.appex in Embed App Extensions */, - ); - name = "Embed App 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 = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 3D2D44FBAFF27C19CAC1AE79 /* libPods-ExampleWidgetExtension.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ExampleWidgetExtension.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 47CD9D232BE10D9400F8B006 /* ExampleWidgetExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = ExampleWidgetExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; - 47CD9D242BE10D9400F8B006 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; }; - 47CD9D262BE10D9400F8B006 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; }; - 47CD9D292BE10D9400F8B006 /* ExampleWidgetBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleWidgetBundle.swift; sourceTree = ""; }; - 47CD9D2B2BE10D9400F8B006 /* ExampleWidgetLiveActivity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleWidgetLiveActivity.swift; sourceTree = ""; }; - 47CD9D2F2BE10D9500F8B006 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 47CD9D312BE10D9500F8B006 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 47FF2D2152AD7B79C3388A8D /* 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 = ""; }; - 6BBCCF44B691DF76AC7D7376 /* 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 = ""; }; - 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 8E4D5B9266C7F07DB2DF5189 /* libPods-OneSignalNotificationServiceExtension.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-OneSignalNotificationServiceExtension.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 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; }; - 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 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 = ""; }; - B51BEA71462CEE42B0AC637B /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - B6E82E5AE029B858173EAE1C /* 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 = ""; }; - C5E2684165E64B3DC2662546 /* Pods-ExampleWidgetExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleWidgetExtension.release.xcconfig"; path = "Target Support Files/Pods-ExampleWidgetExtension/Pods-ExampleWidgetExtension.release.xcconfig"; sourceTree = ""; }; - CA23C3A020F4095B00835044 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; - CA2C87D921014E1800D5D35D /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; - CA2C87DB21014E1C00D5D35D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - CA2C87F121015A8C00D5D35D /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = System/Library/Frameworks/UserNotifications.framework; sourceTree = SDKROOT; }; - CAB34E8F20F96BDA0024CA6B /* OneSignalNotificationServiceExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = OneSignalNotificationServiceExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; - CAB34E9120F96BDA0024CA6B /* NotificationService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotificationService.h; sourceTree = ""; }; - CAB34E9220F96BDA0024CA6B /* NotificationService.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NotificationService.m; sourceTree = ""; }; - CAB34E9420F96BDA0024CA6B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - CAB34E9C20F96BE60024CA6B /* OneSignalNotificationServiceExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = OneSignalNotificationServiceExtension.entitlements; sourceTree = ""; }; - E1B700F64C9347FDDF86950E /* Pods-ExampleWidgetExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleWidgetExtension.debug.xcconfig"; path = "Target Support Files/Pods-ExampleWidgetExtension/Pods-ExampleWidgetExtension.debug.xcconfig"; sourceTree = ""; }; - ED0C29CB77DA85C95D265337 /* 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 = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 47CD9D202BE10D9400F8B006 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 47CD9D272BE10D9400F8B006 /* SwiftUI.framework in Frameworks */, - 47CD9D252BE10D9400F8B006 /* WidgetKit.framework in Frameworks */, - 039D7DFFEE45276B942FFE74 /* libPods-ExampleWidgetExtension.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, - 3370773A86F73EB1712145D3 /* libPods-Runner.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CAB34E8C20F96BDA0024CA6B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - CA2C87F221015A8D00D5D35D /* UserNotifications.framework in Frameworks */, - CA2C87DC21014E1C00D5D35D /* UIKit.framework in Frameworks */, - CA2C87DA21014E1800D5D35D /* SystemConfiguration.framework in Frameworks */, - CD90A25E92780B7027960C61 /* libPods-OneSignalNotificationServiceExtension.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 47CD9D282BE10D9400F8B006 /* ExampleWidget */ = { - isa = PBXGroup; - children = ( - 47CD9D292BE10D9400F8B006 /* ExampleWidgetBundle.swift */, - 47CD9D2B2BE10D9400F8B006 /* ExampleWidgetLiveActivity.swift */, - 47CD9D2F2BE10D9500F8B006 /* Assets.xcassets */, - 47CD9D312BE10D9500F8B006 /* Info.plist */, - ); - path = ExampleWidget; - sourceTree = ""; - }; - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */, - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - CAB34E9020F96BDA0024CA6B /* OneSignalNotificationServiceExtension */, - 47CD9D282BE10D9400F8B006 /* ExampleWidget */, - 97C146EF1CF9000F007C117D /* Products */, - E458450F0521E6D94C4900F1 /* Frameworks */, - BA809C1A17A51DB9BC859D35 /* Pods */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - CAB34E8F20F96BDA0024CA6B /* OneSignalNotificationServiceExtension.appex */, - 47CD9D232BE10D9400F8B006 /* ExampleWidgetExtension.appex */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - CA23C3A020F4095B00835044 /* Runner.entitlements */, - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - ); - path = Runner; - sourceTree = ""; - }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 97C146F21CF9000F007C117D /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - BA809C1A17A51DB9BC859D35 /* Pods */ = { - isa = PBXGroup; - children = ( - B6E82E5AE029B858173EAE1C /* Pods-OneSignalNotificationServiceExtension.debug.xcconfig */, - ED0C29CB77DA85C95D265337 /* Pods-OneSignalNotificationServiceExtension.release.xcconfig */, - 6BBCCF44B691DF76AC7D7376 /* Pods-Runner.debug.xcconfig */, - 47FF2D2152AD7B79C3388A8D /* Pods-Runner.release.xcconfig */, - E1B700F64C9347FDDF86950E /* Pods-ExampleWidgetExtension.debug.xcconfig */, - C5E2684165E64B3DC2662546 /* Pods-ExampleWidgetExtension.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; - CAB34E9020F96BDA0024CA6B /* OneSignalNotificationServiceExtension */ = { - isa = PBXGroup; - children = ( - CAB34E9C20F96BE60024CA6B /* OneSignalNotificationServiceExtension.entitlements */, - CAB34E9120F96BDA0024CA6B /* NotificationService.h */, - CAB34E9220F96BDA0024CA6B /* NotificationService.m */, - CAB34E9420F96BDA0024CA6B /* Info.plist */, - ); - path = OneSignalNotificationServiceExtension; - sourceTree = ""; - }; - E458450F0521E6D94C4900F1 /* Frameworks */ = { - isa = PBXGroup; - children = ( - CA2C87F121015A8C00D5D35D /* UserNotifications.framework */, - CA2C87DB21014E1C00D5D35D /* UIKit.framework */, - CA2C87D921014E1800D5D35D /* SystemConfiguration.framework */, - 8E4D5B9266C7F07DB2DF5189 /* libPods-OneSignalNotificationServiceExtension.a */, - B51BEA71462CEE42B0AC637B /* libPods-Runner.a */, - 47CD9D242BE10D9400F8B006 /* WidgetKit.framework */, - 47CD9D262BE10D9400F8B006 /* SwiftUI.framework */, - 3D2D44FBAFF27C19CAC1AE79 /* libPods-ExampleWidgetExtension.a */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 47CD9D222BE10D9400F8B006 /* ExampleWidgetExtension */ = { - isa = PBXNativeTarget; - buildConfigurationList = 47CD9D352BE10D9500F8B006 /* Build configuration list for PBXNativeTarget "ExampleWidgetExtension" */; - buildPhases = ( - AAFA6FB39320C73BA94587BA /* [CP] Check Pods Manifest.lock */, - 47CD9D1F2BE10D9400F8B006 /* Sources */, - 47CD9D202BE10D9400F8B006 /* Frameworks */, - 47CD9D212BE10D9400F8B006 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = ExampleWidgetExtension; - productName = ExampleWidgetExtension; - productReference = 47CD9D232BE10D9400F8B006 /* ExampleWidgetExtension.appex */; - productType = "com.apple.product-type.app-extension"; - }; - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 7C664CCDDCAE18A4FAB2821F /* [CP] Check Pods Manifest.lock */, - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - CAB34EA020F96F460024CA6B /* Embed App Extensions */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 736C22D41EF8B24DEEC09A76 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - CAB34E9F20F96F460024CA6B /* PBXTargetDependency */, - 47CD9D332BE10D9500F8B006 /* PBXTargetDependency */, - ); - name = Runner; - packageProductDependencies = ( - 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */, - ); - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; - CAB34E8E20F96BDA0024CA6B /* OneSignalNotificationServiceExtension */ = { - isa = PBXNativeTarget; - buildConfigurationList = CAB34E9A20F96BDA0024CA6B /* Build configuration list for PBXNativeTarget "OneSignalNotificationServiceExtension" */; - buildPhases = ( - 4A7D357D9F0A5E700D3F3563 /* [CP] Check Pods Manifest.lock */, - CAB34E8B20F96BDA0024CA6B /* Sources */, - CAB34E8C20F96BDA0024CA6B /* Frameworks */, - CAB34E8D20F96BDA0024CA6B /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = OneSignalNotificationServiceExtension; - productName = OneSignalNotificationServiceExtension; - productReference = CAB34E8F20F96BDA0024CA6B /* OneSignalNotificationServiceExtension.appex */; - productType = "com.apple.product-type.app-extension"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 1530; - LastUpgradeCheck = 1510; - ORGANIZATIONNAME = "The Chromium Authors"; - TargetAttributes = { - 47CD9D222BE10D9400F8B006 = { - CreatedOnToolsVersion = 15.3; - }; - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - DevelopmentTeam = 99SW8E36CT; - SystemCapabilities = { - com.apple.ApplicationGroups.iOS = { - enabled = 1; - }; - com.apple.Push = { - enabled = 1; - }; - }; - }; - CAB34E8E20F96BDA0024CA6B = { - CreatedOnToolsVersion = 9.4.1; - DevelopmentTeam = 99SW8E36CT; - ProvisioningStyle = Automatic; - SystemCapabilities = { - com.apple.ApplicationGroups.iOS = { - enabled = 1; - }; - }; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - English, - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - packageReferences = ( - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */, - ); - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - CAB34E8E20F96BDA0024CA6B /* OneSignalNotificationServiceExtension */, - 47CD9D222BE10D9400F8B006 /* ExampleWidgetExtension */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 47CD9D212BE10D9400F8B006 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 47CD9D302BE10D9500F8B006 /* Assets.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CAB34E8D20F96BDA0024CA6B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 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\n"; - }; - 4A7D357D9F0A5E700D3F3563 /* [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; - }; - 736C22D41EF8B24DEEC09A76 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignal/OneSignalFramework.framework/OneSignalFramework", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalCore/OneSignalCore.framework/OneSignalCore", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalExtension/OneSignalExtension.framework/OneSignalExtension", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalInAppMessages/OneSignalInAppMessages.framework/OneSignalInAppMessages", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalLiveActivities/OneSignalLiveActivities.framework/OneSignalLiveActivities", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalLocation/OneSignalLocation.framework/OneSignalLocation", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalNotifications/OneSignalNotifications.framework/OneSignalNotifications", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalOSCore/OneSignalOSCore.framework/OneSignalOSCore", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalOutcomes/OneSignalOutcomes.framework/OneSignalOutcomes", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalUser/OneSignalUser.framework/OneSignalUser", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalFramework.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalCore.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalExtension.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalInAppMessages.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalLiveActivities.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalLocation.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalNotifications.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalOSCore.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalOutcomes.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalUser.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 7C664CCDDCAE18A4FAB2821F /* [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; - }; - 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\n"; - }; - AAFA6FB39320C73BA94587BA /* [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-ExampleWidgetExtension-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 */ - 47CD9D1F2BE10D9400F8B006 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 47CD9D2A2BE10D9400F8B006 /* ExampleWidgetBundle.swift in Sources */, - 47CD9D2C2BE10D9400F8B006 /* ExampleWidgetLiveActivity.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, - 97C146F31CF9000F007C117D /* main.m in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CAB34E8B20F96BDA0024CA6B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - CAB34E9320F96BDA0024CA6B /* NotificationService.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 47CD9D332BE10D9500F8B006 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 47CD9D222BE10D9400F8B006 /* ExampleWidgetExtension */; - targetProxy = 47CD9D322BE10D9500F8B006 /* PBXContainerItemProxy */; - }; - CAB34E9F20F96F460024CA6B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = CAB34E8E20F96BDA0024CA6B /* OneSignalNotificationServiceExtension */; - targetProxy = CAB34E9E20F96F460024CA6B /* 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 */ - 47CD9D362BE10D9500F8B006 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E1B700F64C9347FDDF86950E /* Pods-ExampleWidgetExtension.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = ExampleWidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = ExampleWidget; - INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2024 The Chromium Authors. All rights reserved."; - IPHONEOS_DEPLOYMENT_TARGET = 17.4; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.ExampleWidget; - 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; - }; - 47CD9D372BE10D9500F8B006 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = C5E2684165E64B3DC2662546 /* Pods-ExampleWidgetExtension.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = ExampleWidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = ExampleWidget; - INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2024 The Chromium Authors. All rights reserved."; - IPHONEOS_DEPLOYMENT_TARGET = 17.4; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.ExampleWidget; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - 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_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_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; - 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 = 13.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; - 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_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_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; - 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 = 13.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - CAB34E9820F96BDA0024CA6B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B6E82E5AE029B858173EAE1C /* Pods-OneSignalNotificationServiceExtension.debug.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 99SW8E36CT; - ENABLE_BITCODE = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.OneSignalNotificationServiceExtensionA; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - CAB34E9920F96BDA0024CA6B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = ED0C29CB77DA85C95D265337 /* Pods-OneSignalNotificationServiceExtension.release.xcconfig */; - buildSettings = { - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 99SW8E36CT; - ENABLE_BITCODE = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.OneSignalNotificationServiceExtensionA; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 47CD9D352BE10D9500F8B006 /* Build configuration list for PBXNativeTarget "ExampleWidgetExtension" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 47CD9D362BE10D9500F8B006 /* Debug */, - 47CD9D372BE10D9500F8B006 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - CAB34E9A20F96BDA0024CA6B /* Build configuration list for PBXNativeTarget "OneSignalNotificationServiceExtension" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CAB34E9820F96BDA0024CA6B /* Debug */, - CAB34E9920F96BDA0024CA6B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - -/* Begin XCLocalSwiftPackageReference section */ - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = { - isa = XCLocalSwiftPackageReference; - relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; - }; -/* End XCLocalSwiftPackageReference section */ - -/* Begin XCSwiftPackageProductDependency section */ - 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = { - isa = XCSwiftPackageProductDependency; - productName = FlutterGeneratedPluginSwiftPackage; - }; -/* End XCSwiftPackageProductDependency section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/example_pod/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example_pod/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6..00000000 --- a/example_pod/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/example_pod/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example_pod/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/example_pod/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/example_pod/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example_pod/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index 851adedd..00000000 --- a/example_pod/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example_pod/ios/Runner.xcworkspace/contents.xcworkspacedata b/example_pod/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc14..00000000 --- a/example_pod/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/example_pod/ios/Runner/AppDelegate.h b/example_pod/ios/Runner/AppDelegate.h deleted file mode 100644 index 36e21bbf..00000000 --- a/example_pod/ios/Runner/AppDelegate.h +++ /dev/null @@ -1,6 +0,0 @@ -#import -#import - -@interface AppDelegate : FlutterAppDelegate - -@end diff --git a/example_pod/ios/Runner/AppDelegate.m b/example_pod/ios/Runner/AppDelegate.m deleted file mode 100644 index 59a72e90..00000000 --- a/example_pod/ios/Runner/AppDelegate.m +++ /dev/null @@ -1,13 +0,0 @@ -#include "AppDelegate.h" -#include "GeneratedPluginRegistrant.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application - didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - [GeneratedPluginRegistrant registerWithRegistry:self]; - // Override point for customization after application launch. - return [super application:application didFinishLaunchingWithOptions:launchOptions]; -} - -@end diff --git a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab..00000000 --- a/example_pod/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/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index 3d43d11e..00000000 Binary files a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf03..00000000 Binary files a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd96..00000000 Binary files a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0..00000000 Binary files a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde1211..00000000 Binary files a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7..00000000 Binary files a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306..00000000 Binary files a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd96..00000000 Binary files a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f..00000000 Binary files a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b860..00000000 Binary files a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b860..00000000 Binary files a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164..00000000 Binary files a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d3..00000000 Binary files a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e..00000000 Binary files a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f585..00000000 Binary files a/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/example_pod/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/example_pod/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2f..00000000 --- a/example_pod/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/example_pod/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/example_pod/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/example_pod/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/example_pod/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/example_pod/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/example_pod/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/example_pod/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/example_pod/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/example_pod/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/example_pod/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/example_pod/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b..00000000 --- a/example_pod/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/example_pod/ios/Runner/Base.lproj/LaunchScreen.storyboard b/example_pod/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7..00000000 --- a/example_pod/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example_pod/ios/Runner/Base.lproj/Main.storyboard b/example_pod/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516..00000000 --- a/example_pod/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example_pod/ios/Runner/Info.plist b/example_pod/ios/Runner/Info.plist deleted file mode 100644 index fa946f24..00000000 --- a/example_pod/ios/Runner/Info.plist +++ /dev/null @@ -1,58 +0,0 @@ - - - - - CADisableMinimumFrameDurationOnPhone - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - OneSignalDemo - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - onesignal_example - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - - NSSupportsLiveActivities - - UIApplicationSupportsIndirectInputEvents - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/example_pod/ios/Runner/Runner.entitlements b/example_pod/ios/Runner/Runner.entitlements deleted file mode 100644 index 34463649..00000000 --- a/example_pod/ios/Runner/Runner.entitlements +++ /dev/null @@ -1,12 +0,0 @@ - - - - - aps-environment - development - com.apple.security.application-groups - - group.com.onesignal.example.onesignal - - - diff --git a/example_pod/ios/Runner/main.m b/example_pod/ios/Runner/main.m deleted file mode 100644 index dff6597e..00000000 --- a/example_pod/ios/Runner/main.m +++ /dev/null @@ -1,9 +0,0 @@ -#import -#import -#import "AppDelegate.h" - -int main(int argc, char* argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/example_pod/lib/main.dart b/example_pod/lib/main.dart deleted file mode 100644 index b77b9201..00000000 --- a/example_pod/lib/main.dart +++ /dev/null @@ -1,569 +0,0 @@ -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:onesignal_flutter/onesignal_flutter.dart'; - -void main() => runApp(new MyApp()); - -class MyApp extends StatefulWidget { - @override - _MyAppState createState() => new _MyAppState(); -} - -class _MyAppState extends State { - String _debugLabelString = ""; - String? _emailAddress; - String? _smsNumber; - String? _externalUserId; - String? _language; - String? _liveActivityId; - bool _enableConsentButton = false; - - // CHANGE THIS parameter to true if you want to test GDPR privacy consent - bool _requireConsent = false; - - @override - void initState() { - super.initState(); - initPlatformState(); - } - - // Platform messages are asynchronous, so we initialize in an async method. - Future initPlatformState() async { - if (!mounted) return; - - OneSignal.Debug.setLogLevel(OSLogLevel.verbose); - - OneSignal.Debug.setAlertLevel(OSLogLevel.none); - OneSignal.consentRequired(_requireConsent); - - // NOTE: Replace with your own app ID from https://www.onesignal.com - OneSignal.initialize("77e32082-ea27-42e3-a898-c72e141824ef"); - - OneSignal.LiveActivities.setupDefault(); - // OneSignal.LiveActivities.setupDefault(options: new LiveActivitySetupOptions(enablePushToStart: false, enablePushToUpdate: true)); - - // AndroidOnly stat only - // OneSignal.Notifications.removeNotification(1); - // OneSignal.Notifications.removeGroupedNotifications("group5"); - - OneSignal.Notifications.clearAll(); - - OneSignal.User.pushSubscription.addObserver((state) { - print(OneSignal.User.pushSubscription.optedIn); - print(OneSignal.User.pushSubscription.id); - print(OneSignal.User.pushSubscription.token); - print(state.current.jsonRepresentation()); - }); - - OneSignal.User.addObserver((state) { - var userState = state.jsonRepresentation(); - print('OneSignal user changed: $userState'); - }); - - OneSignal.Notifications.addPermissionObserver((state) { - print("Has permission " + state.toString()); - }); - - OneSignal.Notifications.addClickListener((event) { - print('NOTIFICATION CLICK LISTENER CALLED WITH EVENT: $event'); - this.setState(() { - _debugLabelString = - "Clicked notification: \n${event.notification.jsonRepresentation().replaceAll("\\n", "\n")}"; - }); - }); - - OneSignal.Notifications.addForegroundWillDisplayListener((event) { - print( - 'NOTIFICATION WILL DISPLAY LISTENER CALLED WITH: ${event.notification.jsonRepresentation()}'); - - /// Display Notification, preventDefault to not display - event.preventDefault(); - - /// Do async work - - /// notification.display() to display after preventing default - event.notification.display(); - - this.setState(() { - _debugLabelString = - "Notification received in foreground notification: \n${event.notification.jsonRepresentation().replaceAll("\\n", "\n")}"; - }); - }); - - OneSignal.InAppMessages.addClickListener((event) { - this.setState(() { - _debugLabelString = - "In App Message Clicked: \n${event.result.jsonRepresentation().replaceAll("\\n", "\n")}"; - }); - }); - OneSignal.InAppMessages.addWillDisplayListener((event) { - print("ON WILL DISPLAY IN APP MESSAGE ${event.message.messageId}"); - }); - OneSignal.InAppMessages.addDidDisplayListener((event) { - print("ON DID DISPLAY IN APP MESSAGE ${event.message.messageId}"); - }); - OneSignal.InAppMessages.addWillDismissListener((event) { - print("ON WILL DISMISS IN APP MESSAGE ${event.message.messageId}"); - }); - OneSignal.InAppMessages.addDidDismissListener((event) { - print("ON DID DISMISS IN APP MESSAGE ${event.message.messageId}"); - }); - - this.setState(() { - _enableConsentButton = _requireConsent; - }); - - // Some examples of how to use In App Messaging public methods with OneSignal SDK - oneSignalInAppMessagingTriggerExamples(); - - // Some examples of how to use Outcome Events public methods with OneSignal SDK - oneSignalOutcomeExamples(); - - OneSignal.InAppMessages.paused(true); - } - - void _handleSendTags() { - print("Sending tags"); - OneSignal.User.addTagWithKey("test2", "val2"); - - print("Sending tags array"); - var sendTags = {'test': 'value', 'test2': 'value2'}; - OneSignal.User.addTags(sendTags); - } - - void _handleRemoveTag() { - print("Deleting tag"); - OneSignal.User.removeTag("test2"); - - print("Deleting tags array"); - OneSignal.User.removeTags(['test']); - } - - void _handleGetTags() async { - print("Get tags"); - - var tags = await OneSignal.User.getTags(); - print(tags); - } - - void _handlePromptForPushPermission() { - print("Prompting for Permission"); - OneSignal.Notifications.requestPermission(true); - } - - void _handleSetLanguage() { - if (_language == null) return; - print("Setting language"); - OneSignal.User.setLanguage(_language!); - } - - void _handleSetEmail() { - if (_emailAddress == null) return; - print("Setting email"); - - OneSignal.User.addEmail(_emailAddress!); - } - - void _handleRemoveEmail() { - if (_emailAddress == null) return; - print("Remove email"); - - OneSignal.User.removeEmail(_emailAddress!); - } - - void _handleSetSMSNumber() { - if (_smsNumber == null) return; - print("Setting SMS Number"); - - OneSignal.User.addSms(_smsNumber!); - } - - void _handleRemoveSMSNumber() { - if (_smsNumber == null) return; - print("Remove smsNumber"); - - OneSignal.User.removeSms(_smsNumber!); - } - - void _handleConsent() { - print("Setting consent to true"); - OneSignal.consentGiven(true); - - print("Setting state"); - this.setState(() { - _enableConsentButton = false; - }); - } - - void _handleSetLocationShared() { - print("Setting location shared to true"); - OneSignal.Location.setShared(true); - } - - void _handleGetExternalId() async { - var externalId = await OneSignal.User.getExternalId(); - print('External ID: $externalId'); - } - - void _handleLogin() { - print("Setting external user ID"); - if (_externalUserId == null) return; - OneSignal.login(_externalUserId!); - OneSignal.User.addAlias("fb_id", "1341524"); - } - - void _handleLogout() { - OneSignal.logout(); - OneSignal.User.removeAlias("fb_id"); - } - - void _handleGetOnesignalId() async { - var onesignalId = await OneSignal.User.getOnesignalId(); - print('OneSignal ID: $onesignalId'); - } - - oneSignalInAppMessagingTriggerExamples() async { - /// Example addTrigger call for IAM - /// This will add 1 trigger so if there are any IAM satisfying it, it - /// will be shown to the user - OneSignal.InAppMessages.addTrigger("trigger_1", "one"); - - /// Example addTriggers call for IAM - /// This will add 2 triggers so if there are any IAM satisfying these, they - /// will be shown to the user - Map triggers = new Map(); - triggers["trigger_2"] = "two"; - triggers["trigger_3"] = "three"; - OneSignal.InAppMessages.addTriggers(triggers); - - // Removes a trigger by its key so if any future IAM are pulled with - // these triggers they will not be shown until the trigger is added back - OneSignal.InAppMessages.removeTrigger("trigger_2"); - - // Create a list and bulk remove triggers based on keys supplied - List keys = ["trigger_1", "trigger_3"]; - OneSignal.InAppMessages.removeTriggers(keys); - - // Toggle pausing (displaying or not) of IAMs - OneSignal.InAppMessages.paused(true); - var arePaused = await OneSignal.InAppMessages.arePaused(); - print('Notifications paused $arePaused'); - } - - oneSignalOutcomeExamples() async { - OneSignal.Session.addOutcome("normal_1"); - OneSignal.Session.addOutcome("normal_2"); - - OneSignal.Session.addUniqueOutcome("unique_1"); - OneSignal.Session.addUniqueOutcome("unique_2"); - - OneSignal.Session.addOutcomeWithValue("value_1", 3.2); - OneSignal.Session.addOutcomeWithValue("value_2", 3.9); - } - - void _handleOptIn() { - OneSignal.User.pushSubscription.optIn(); - } - - void _handleOptOut() { - OneSignal.User.pushSubscription.optOut(); - } - - void _handleStartDefaultLiveActivity() { - if (_liveActivityId == null) return; - print("Starting default live activity"); - OneSignal.LiveActivities.startDefault(_liveActivityId!, { - "title": "Welcome!" - }, { - "message": {"en": "Hello World!"}, - "intValue": 3, - "doubleValue": 3.14, - "boolValue": true - }); - } - - void _handleEnterLiveActivity() { - if (_liveActivityId == null) return; - print("Entering live activity"); - OneSignal.LiveActivities.enterLiveActivity(_liveActivityId!, "FAKE_TOKEN"); - } - - void _handleExitLiveActivity() { - if (_liveActivityId == null) return; - print("Exiting live activity"); - OneSignal.LiveActivities.exitLiveActivity(_liveActivityId!); - } - - void _handleSetPushToStartLiveActivity() { - if (_liveActivityId == null) return; - print("Setting Push-To-Start live activity"); - OneSignal.LiveActivities.setPushToStartToken( - _liveActivityId!, "FAKE_TOKEN"); - } - - void _handleRemovePushToStartLiveActivity() { - if (_liveActivityId == null) return; - print("Setting Push-To-Start live activity"); - OneSignal.LiveActivities.removePushToStartToken(_liveActivityId!); - } - - @override - Widget build(BuildContext context) { - return new MaterialApp( - home: new Scaffold( - appBar: new AppBar( - title: const Text('OneSignal Flutter Demo'), - backgroundColor: Color.fromARGB(255, 212, 86, 83), - ), - body: Container( - padding: EdgeInsets.all(10.0), - child: SingleChildScrollView( - child: new Table( - children: [ - new TableRow(children: [ - new OneSignalButton( - "Send Tags", _handleSendTags, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton( - "Get Tags", _handleGetTags, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Prompt for Push Permission", - _handlePromptForPushPermission, !_enableConsentButton) - ]), - new TableRow(children: [ - new TextField( - textAlign: TextAlign.center, - decoration: InputDecoration( - hintText: "Email Address", - labelStyle: TextStyle( - color: Color.fromARGB(255, 212, 86, 83), - )), - onChanged: (text) { - this.setState(() { - _emailAddress = text == "" ? null : text; - }); - }, - ) - ]), - new TableRow(children: [ - Container( - height: 8.0, - ) - ]), - new TableRow(children: [ - new OneSignalButton( - "Set Email", _handleSetEmail, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Logout Email", _handleRemoveEmail, - !_enableConsentButton) - ]), - new TableRow(children: [ - new TextField( - textAlign: TextAlign.center, - decoration: InputDecoration( - hintText: "SMS Number", - labelStyle: TextStyle( - color: Color.fromARGB(255, 212, 86, 83), - )), - onChanged: (text) { - this.setState(() { - _smsNumber = text == "" ? null : text; - }); - }, - ) - ]), - new TableRow(children: [ - Container( - height: 8.0, - ) - ]), - new TableRow(children: [ - new OneSignalButton("Set SMS Number", _handleSetSMSNumber, - !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Remove SMS Number", - _handleRemoveSMSNumber, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Provide GDPR Consent", _handleConsent, - _enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Set Location Shared", - _handleSetLocationShared, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton( - "Remove Tag", _handleRemoveTag, !_enableConsentButton) - ]), - new TableRow(children: [ - new TextField( - textAlign: TextAlign.center, - decoration: InputDecoration( - hintText: "External User ID", - labelStyle: TextStyle( - color: Color.fromARGB(255, 212, 86, 83), - )), - onChanged: (text) { - this.setState(() { - _externalUserId = text == "" ? null : text; - }); - }, - ) - ]), - new TableRow(children: [ - Container( - height: 8.0, - ) - ]), - new TableRow(children: [ - new OneSignalButton("Get External User ID", - _handleGetExternalId, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Set External User ID", _handleLogin, - !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Remove External User ID", - _handleLogout, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Get OneSignal ID", - _handleGetOnesignalId, !_enableConsentButton) - ]), - new TableRow(children: [ - new TextField( - textAlign: TextAlign.center, - decoration: InputDecoration( - hintText: "Language", - labelStyle: TextStyle( - color: Color.fromARGB(255, 212, 86, 83), - )), - onChanged: (text) { - this.setState(() { - _language = text == "" ? null : text; - }); - }, - ) - ]), - new TableRow(children: [ - Container( - height: 8.0, - ) - ]), - new TableRow(children: [ - new OneSignalButton("Set Language", _handleSetLanguage, - !_enableConsentButton) - ]), - new TableRow(children: [ - new Container( - child: new Text(_debugLabelString), - alignment: Alignment.center, - ) - ]), - new TableRow(children: [ - new OneSignalButton( - "Opt In", _handleOptIn, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton( - "Opt Out", _handleOptOut, !_enableConsentButton) - ]), - new TableRow(children: [ - new TextField( - textAlign: TextAlign.center, - decoration: InputDecoration( - hintText: "Live Activity ID", - labelStyle: TextStyle( - color: Color.fromARGB(255, 212, 86, 83), - )), - onChanged: (text) { - this.setState(() { - _liveActivityId = text == "" ? null : text; - }); - }, - ) - ]), - new TableRow(children: [ - Container( - height: 8.0, - ) - ]), - new TableRow(children: [ - new OneSignalButton("Start Default Live Activity", - _handleStartDefaultLiveActivity, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Enter Live Activity", - _handleEnterLiveActivity, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Exit Live Activity", - _handleExitLiveActivity, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton( - "Set Push-To-Start Live Activity", - _handleSetPushToStartLiveActivity, - !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton( - "Remove Push-To-Start Live Activity", - _handleRemovePushToStartLiveActivity, - !_enableConsentButton) - ]), - ], - ), - ), - )), - ); - } -} - -typedef void OnButtonPressed(); - -class OneSignalButton extends StatefulWidget { - final String title; - final OnButtonPressed onPressed; - final bool enabled; - - OneSignalButton(this.title, this.onPressed, this.enabled); - - State createState() => new OneSignalButtonState(); -} - -class OneSignalButtonState extends State { - @override - Widget build(BuildContext context) { - // TODO: implement build - return new Table( - children: [ - new TableRow(children: [ - new TextButton( - style: TextButton.styleFrom( - foregroundColor: Colors.white, - disabledForegroundColor: Colors.white, - backgroundColor: Color.fromARGB(255, 212, 86, 83), - disabledBackgroundColor: Color.fromARGB(180, 212, 86, 83), - padding: EdgeInsets.all(8.0), - ), - child: new Text(widget.title), - onPressed: widget.enabled ? widget.onPressed : null, - ) - ]), - new TableRow(children: [ - Container( - height: 8.0, - ) - ]), - ], - ); - } -} diff --git a/example_pod/pubspec.yaml b/example_pod/pubspec.yaml deleted file mode 100644 index c3d7f028..00000000 --- a/example_pod/pubspec.yaml +++ /dev/null @@ -1,64 +0,0 @@ -name: onesignal_example -description: Demonstrates how to use the onesignal plugin. -version: 1.0.0+1 - -dependencies: - flutter: - sdk: flutter - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.0 - -environment: - sdk: ">=2.12.0 <3.0.0" - -dev_dependencies: - flutter_test: - sdk: flutter - flutter_lints: ^2.0.0 - - onesignal_flutter: - path: ../ - -# For information on the generic Dart part of this file, see the -# following page: https://www.dartlang.org/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - config: - enable-swift-package-manager: false - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.io/assets-and-images/#resolution-aware. - - # For details regarding adding assets from package dependencies, see - # https://flutter.io/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.io/custom-fonts/#from-packages diff --git a/example_pod/test/widget_test.dart b/example_pod/test/widget_test.dart deleted file mode 100644 index 3127d8f4..00000000 --- a/example_pod/test/widget_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility in the flutter_test package. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:onesignal_example/main.dart'; - -void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(MyApp()); - - // Verify that our counter starts at 0. - expect(find.text('0'), findsOneWidget); - expect(find.text('1'), findsNothing); - - // Tap the '+' icon and trigger a frame. - await tester.tap(find.byIcon(Icons.add)); - await tester.pump(); - - // Verify that our counter has incremented. - expect(find.text('0'), findsNothing); - expect(find.text('1'), findsOneWidget); - }); -} diff --git a/example_spm/.gitignore b/example_spm/.gitignore deleted file mode 100644 index 18d5e693..00000000 --- a/example_spm/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -.DS_Store -.dart_tool/ - -.packages -.pub/ - -build/ - -.flutter-plugins -.flutter-plugins-dependencies -flutter_export_environment.sh \ No newline at end of file diff --git a/example_spm/.metadata b/example_spm/.metadata deleted file mode 100644 index 0f6195d3..00000000 --- a/example_spm/.metadata +++ /dev/null @@ -1,30 +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: "ac4e799d237041cf905519190471f657b657155a" - channel: "stable" - -project_type: app - -# Tracks metadata for the flutter migrate command -migration: - platforms: - - platform: root - create_revision: ac4e799d237041cf905519190471f657b657155a - base_revision: ac4e799d237041cf905519190471f657b657155a - - platform: android - create_revision: ac4e799d237041cf905519190471f657b657155a - base_revision: ac4e799d237041cf905519190471f657b657155a - - # 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/example_spm/README.md b/example_spm/README.md deleted file mode 100644 index 13327bf6..00000000 --- a/example_spm/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# onesignal_example - -Demonstrates how to use the onesignal plugin. - -# iOS - -First you may need to run `pod install` in the ios folder. -Then launch a simulator then you can run `flutter run`. - -# Android - -Make sure you have the Android SDK cli tools and have accepted the license agreements. -E.g. - -``` -flutter doctor --android-licenses -``` - -Then launch an Android emulator e.g. - -``` -flutter emulators --launch Medium_Phone_API_35; -``` - -And then you can run `flutter run`. - -If you are using an older Flutter or Android Studio version, you may see an error about `ndkVersion`. Follow the instructions to update the version in `build.gradle.kts`. - -## Getting Started - -For help getting started with Flutter, view our online -[documentation](https://flutter.io/). diff --git a/example_spm/analysis_options.yaml b/example_spm/analysis_options.yaml deleted file mode 100644 index 241a690a..00000000 --- a/example_spm/analysis_options.yaml +++ /dev/null @@ -1,41 +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. -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: - # Disable style lints for example app - avoid_print: false - unnecessary_new: false - unnecessary_this: false - prefer_const_constructors: false - prefer_const_constructors_in_immutables: false - use_key_in_widget_constructors: false - library_private_types_in_public_api: false - prefer_final_fields: false - prefer_interpolation_to_compose_strings: false - prefer_collection_literals: false - sort_child_properties_last: false - prefer_generic_function_type_aliases: false - annotate_overrides: false - depend_on_referenced_packages: false - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/example_spm/android/.gitignore b/example_spm/android/.gitignore deleted file mode 100644 index be3943c9..00000000 --- a/example_spm/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/example_spm/android/app/build.gradle.kts b/example_spm/android/app/build.gradle.kts deleted file mode 100644 index 5001623b..00000000 --- a/example_spm/android/app/build.gradle.kts +++ /dev/null @@ -1,44 +0,0 @@ -plugins { - id("com.android.application") - id("kotlin-android") - // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. - id("dev.flutter.flutter-gradle-plugin") -} - -android { - namespace = "com.onesignal.onesignal_example" - compileSdk = flutter.compileSdkVersion - ndkVersion = flutter.ndkVersion - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_11.toString() - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId = "com.onesignal.onesignal_example" - // 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") - } - } -} - -flutter { - source = "../.." -} diff --git a/example_spm/android/app/src/debug/AndroidManifest.xml b/example_spm/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 399f6981..00000000 --- a/example_spm/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/example_spm/android/app/src/main/kotlin/com/onesignal/onesignal_example/MainActivity.kt b/example_spm/android/app/src/main/kotlin/com/onesignal/onesignal_example/MainActivity.kt deleted file mode 100644 index 5be0b3b4..00000000 --- a/example_spm/android/app/src/main/kotlin/com/onesignal/onesignal_example/MainActivity.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.onesignal.onesignal_example - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity : FlutterActivity() diff --git a/example_spm/android/app/src/main/res/drawable-v21/launch_background.xml b/example_spm/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index f74085f3..00000000 --- a/example_spm/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/example_spm/android/app/src/main/res/drawable/launch_background.xml b/example_spm/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f8..00000000 --- a/example_spm/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/example_spm/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/example_spm/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b..00000000 Binary files a/example_spm/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/example_spm/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/example_spm/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79..00000000 Binary files a/example_spm/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/example_spm/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/example_spm/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d43914..00000000 Binary files a/example_spm/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/example_spm/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/example_spm/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d3..00000000 Binary files a/example_spm/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/example_spm/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/example_spm/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372ee..00000000 Binary files a/example_spm/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/example_spm/android/app/src/main/res/values-night/styles.xml b/example_spm/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 06952be7..00000000 --- a/example_spm/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/example_spm/android/app/src/main/res/values/styles.xml b/example_spm/android/app/src/main/res/values/styles.xml deleted file mode 100644 index cb1ef880..00000000 --- a/example_spm/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/example_spm/android/app/src/profile/AndroidManifest.xml b/example_spm/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 399f6981..00000000 --- a/example_spm/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/example_spm/android/build.gradle.kts b/example_spm/android/build.gradle.kts deleted file mode 100644 index dbee657b..00000000 --- a/example_spm/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/example_spm/android/gradle.properties b/example_spm/android/gradle.properties deleted file mode 100644 index f018a618..00000000 --- a/example_spm/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError -android.useAndroidX=true -android.enableJetifier=true diff --git a/example_spm/android/gradle/wrapper/gradle-wrapper.properties b/example_spm/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 02767eb1..00000000 --- a/example_spm/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-8.13-all.zip diff --git a/example_spm/android/settings.gradle.kts b/example_spm/android/settings.gradle.kts deleted file mode 100644 index 75af8a40..00000000 --- a/example_spm/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 "8.13.0" apply false - id("org.jetbrains.kotlin.android") version "2.1.0" apply false -} - -include(":app") diff --git a/example_spm/ios/.gitignore b/example_spm/ios/.gitignore deleted file mode 100644 index 79cc4da8..00000000 --- a/example_spm/ios/.gitignore +++ /dev/null @@ -1,45 +0,0 @@ -.idea/ -.vagrant/ -.sconsign.dblite -.svn/ - -.DS_Store -*.swp -profile - -DerivedData/ -build/ -GeneratedPluginRegistrant.h -GeneratedPluginRegistrant.m - -.generated/ - -*.pbxuser -*.mode1v3 -*.mode2v3 -*.perspectivev3 - -!default.pbxuser -!default.mode1v3 -!default.mode2v3 -!default.perspectivev3 - -xcuserdata - -*.moved-aside - -*.pyc -*sync/ -Icon? -.tags* - -/Flutter/app.flx -/Flutter/app.zip -/Flutter/flutter_assets/ -/Flutter/App.framework -/Flutter/Flutter.framework -/Flutter/Generated.xcconfig -/ServiceDefinitions.json - -Pods/ -.symlinks/ diff --git a/example_spm/ios/ExampleWidget/Assets.xcassets/AccentColor.colorset/Contents.json b/example_spm/ios/ExampleWidget/Assets.xcassets/AccentColor.colorset/Contents.json deleted file mode 100644 index eb878970..00000000 --- a/example_spm/ios/ExampleWidget/Assets.xcassets/AccentColor.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/example_spm/ios/ExampleWidget/Assets.xcassets/AppIcon.appiconset/Contents.json b/example_spm/ios/ExampleWidget/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 13613e3e..00000000 --- a/example_spm/ios/ExampleWidget/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/example_spm/ios/ExampleWidget/Assets.xcassets/Contents.json b/example_spm/ios/ExampleWidget/Assets.xcassets/Contents.json deleted file mode 100644 index 73c00596..00000000 --- a/example_spm/ios/ExampleWidget/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/example_spm/ios/ExampleWidget/Assets.xcassets/WidgetBackground.colorset/Contents.json b/example_spm/ios/ExampleWidget/Assets.xcassets/WidgetBackground.colorset/Contents.json deleted file mode 100644 index eb878970..00000000 --- a/example_spm/ios/ExampleWidget/Assets.xcassets/WidgetBackground.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/example_spm/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/Contents.json b/example_spm/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/Contents.json deleted file mode 100644 index 0eddeb7c..00000000 --- a/example_spm/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "onesignal-logo.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/example_spm/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/onesignal-logo.png b/example_spm/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/onesignal-logo.png deleted file mode 100644 index ba97c7a7..00000000 Binary files a/example_spm/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/onesignal-logo.png and /dev/null differ diff --git a/example_spm/ios/ExampleWidget/ExampleWidgetBundle.swift b/example_spm/ios/ExampleWidget/ExampleWidgetBundle.swift deleted file mode 100644 index 71407d0a..00000000 --- a/example_spm/ios/ExampleWidget/ExampleWidgetBundle.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// ExampleWidgetBundle.swift -// ExampleWidget -// -// Created by Brian Smith on 4/30/24. -// Copyright © 2024 The Chromium Authors. All rights reserved. -// - -import WidgetKit -import SwiftUI - -@main -struct ExampleWidgetBundle: WidgetBundle { - var body: some Widget { - ExampleWidgetLiveActivity() - } -} diff --git a/example_spm/ios/ExampleWidget/ExampleWidgetLiveActivity.swift b/example_spm/ios/ExampleWidget/ExampleWidgetLiveActivity.swift deleted file mode 100644 index f372e2ef..00000000 --- a/example_spm/ios/ExampleWidget/ExampleWidgetLiveActivity.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// ExampleWidgetLiveActivity.swift -// ExampleWidget -// -// Created by Brian Smith on 4/30/24. -// Copyright © 2024 The Chromium Authors. All rights reserved. -// - -import ActivityKit -import WidgetKit -import SwiftUI -import OneSignalLiveActivities - -struct ExampleWidgetLiveActivity: Widget { - var body: some WidgetConfiguration { - ActivityConfiguration(for: DefaultLiveActivityAttributes.self) { context in - // Lock screen/banner UI goes here\VStack(alignment: .leading) { - VStack { - Spacer() - Text("FLUTTER: " + (context.attributes.data["title"]?.asString() ?? "")).font(.headline) - Spacer() - HStack { - Spacer() - Label { - Text(context.state.data["message"]?.asDict()?["en"]?.asString() ?? "") - } icon: { - Image("onesignaldemo") - .resizable() - .scaledToFit() - .frame(width: 40.0, height: 40.0) - } - Spacer() - } - Text("INT: " + String(context.state.data["intValue"]?.asInt() ?? 0)) - Text("DBL: " + String(context.state.data["doubleValue"]?.asDouble() ?? 0.0)) - Text("BOL: " + String(context.state.data["boolValue"]?.asBool() ?? false)) - Spacer() - } - .activitySystemActionForegroundColor(.black) - .activityBackgroundTint(.white) - } dynamicIsland: { _ in - DynamicIsland { - // Expanded UI goes here. Compose the expanded UI through - // various regions, like leading/trailing/center/bottom - DynamicIslandExpandedRegion(.leading) { - Text("Leading") - } - DynamicIslandExpandedRegion(.trailing) { - Text("Trailing") - } - DynamicIslandExpandedRegion(.bottom) { - Text("Bottom") - // more content - } - } compactLeading: { - Text("L") - } compactTrailing: { - Text("T") - } minimal: { - Text("Min") - } - .widgetURL(URL(string: "http://www.apple.com")) - .keylineTint(Color.red) - } - } -} diff --git a/example_spm/ios/ExampleWidget/Info.plist b/example_spm/ios/ExampleWidget/Info.plist deleted file mode 100644 index 0f118fb7..00000000 --- a/example_spm/ios/ExampleWidget/Info.plist +++ /dev/null @@ -1,11 +0,0 @@ - - - - - NSExtension - - NSExtensionPointIdentifier - com.apple.widgetkit-extension - - - diff --git a/example_spm/ios/Flutter/AppFrameworkInfo.plist b/example_spm/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 1dc6cf76..00000000 --- a/example_spm/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +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 - MinimumOSVersion - 13.0 - - diff --git a/example_spm/ios/Flutter/Debug.xcconfig b/example_spm/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee8..00000000 --- a/example_spm/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/example_spm/ios/Flutter/Flutter.podspec b/example_spm/ios/Flutter/Flutter.podspec deleted file mode 100644 index 3aed58d3..00000000 --- a/example_spm/ios/Flutter/Flutter.podspec +++ /dev/null @@ -1,18 +0,0 @@ -# -# This podspec is NOT to be published. It is only used as a local source! -# This is a generated file; do not edit or check into version control. -# - -Pod::Spec.new do |s| - s.name = 'Flutter' - s.version = '1.0.0' - s.summary = 'A UI toolkit for beautiful and fast apps.' - s.homepage = 'https://flutter.dev' - s.license = { :type => 'BSD' } - s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } - s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } - s.ios.deployment_target = '13.0' - # Framework linking is handled by Flutter tooling, not CocoaPods. - # Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs. - s.vendored_frameworks = 'path/to/nothing' -end diff --git a/example_spm/ios/Flutter/Release.xcconfig b/example_spm/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee8..00000000 --- a/example_spm/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/example_spm/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Package.swift b/example_spm/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Package.swift deleted file mode 100644 index e73aa086..00000000 --- a/example_spm/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Package.swift +++ /dev/null @@ -1,28 +0,0 @@ -// swift-tools-version: 5.9 -// The swift-tools-version declares the minimum version of Swift required to build this package. -// -// Generated file. Do not edit. -// - -import PackageDescription - -let package = Package( - name: "FlutterGeneratedPluginSwiftPackage", - platforms: [ - .iOS("13.0") - ], - products: [ - .library(name: "FlutterGeneratedPluginSwiftPackage", type: .static, targets: ["FlutterGeneratedPluginSwiftPackage"]) - ], - dependencies: [ - .package(name: "onesignal_flutter", path: "../.packages/onesignal_flutter") - ], - targets: [ - .target( - name: "FlutterGeneratedPluginSwiftPackage", - dependencies: [ - .product(name: "onesignal-flutter", package: "onesignal_flutter") - ] - ) - ] -) diff --git a/example_spm/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Sources/FlutterGeneratedPluginSwiftPackage/FlutterGeneratedPluginSwiftPackage.swift b/example_spm/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Sources/FlutterGeneratedPluginSwiftPackage/FlutterGeneratedPluginSwiftPackage.swift deleted file mode 100644 index 62e7b11a..00000000 --- a/example_spm/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Sources/FlutterGeneratedPluginSwiftPackage/FlutterGeneratedPluginSwiftPackage.swift +++ /dev/null @@ -1,3 +0,0 @@ -// -// Generated file. Do not edit. -// diff --git a/example_spm/ios/Flutter/ephemeral/flutter_lldb_helper.py b/example_spm/ios/Flutter/ephemeral/flutter_lldb_helper.py deleted file mode 100644 index a88caf99..00000000 --- a/example_spm/ios/Flutter/ephemeral/flutter_lldb_helper.py +++ /dev/null @@ -1,32 +0,0 @@ -# -# Generated file, do not edit. -# - -import lldb - -def handle_new_rx_page(frame: lldb.SBFrame, bp_loc, extra_args, intern_dict): - """Intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGES and touch the pages.""" - base = frame.register["x0"].GetValueAsAddress() - page_len = frame.register["x1"].GetValueAsUnsigned() - - # Note: NOTIFY_DEBUGGER_ABOUT_RX_PAGES will check contents of the - # first page to see if handled it correctly. This makes diagnosing - # misconfiguration (e.g. missing breakpoint) easier. - data = bytearray(page_len) - data[0:8] = b'IHELPED!' - - error = lldb.SBError() - frame.GetThread().GetProcess().WriteMemory(base, data, error) - if not error.Success(): - print(f'Failed to write into {base}[+{page_len}]', error) - return - -def __lldb_init_module(debugger: lldb.SBDebugger, _): - target = debugger.GetDummyTarget() - # Caveat: must use BreakpointCreateByRegEx here and not - # BreakpointCreateByName. For some reasons callback function does not - # get carried over from dummy target for the later. - bp = target.BreakpointCreateByRegex("^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$") - bp.SetScriptCallbackFunction('{}.handle_new_rx_page'.format(__name__)) - bp.SetAutoContinue(True) - print("-- LLDB integration loaded --") diff --git a/example_spm/ios/Flutter/ephemeral/flutter_lldbinit b/example_spm/ios/Flutter/ephemeral/flutter_lldbinit deleted file mode 100644 index e3ba6fbe..00000000 --- a/example_spm/ios/Flutter/ephemeral/flutter_lldbinit +++ /dev/null @@ -1,5 +0,0 @@ -# -# Generated file, do not edit. -# - -command script import --relative-to-command-file flutter_lldb_helper.py diff --git a/example_spm/ios/OneSignalNotificationServiceExtension/NotificationService.h b/example_spm/ios/OneSignalNotificationServiceExtension/NotificationService.h deleted file mode 100644 index 7ae1037b..00000000 --- a/example_spm/ios/OneSignalNotificationServiceExtension/NotificationService.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// NotificationService.h -// OneSignalNotificationServiceExtension -// -// Created by Brad Hesse on 7/13/18. -// Copyright © 2018 The Chromium Authors. All rights reserved. -// - -#import - -@interface NotificationService : UNNotificationServiceExtension - -@end diff --git a/example_spm/ios/OneSignalNotificationServiceExtension/NotificationService.m b/example_spm/ios/OneSignalNotificationServiceExtension/NotificationService.m deleted file mode 100644 index a692bf33..00000000 --- a/example_spm/ios/OneSignalNotificationServiceExtension/NotificationService.m +++ /dev/null @@ -1,40 +0,0 @@ -// -// NotificationService.m -// OneSignalNotificationServiceExtension -// -// Created by Brad Hesse on 7/13/18. -// Copyright © 2018 The Chromium Authors. All rights reserved. -// - -#import - -#import "NotificationService.h" - -@interface NotificationService () - -@property (nonatomic, strong) void (^contentHandler)(UNNotificationContent *contentToDeliver); -@property (nonatomic, strong) UNNotificationRequest *receivedRequest; -@property (nonatomic, strong) UNMutableNotificationContent *bestAttemptContent; - -@end - -@implementation NotificationService - -- (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler { - self.receivedRequest = request; - self.contentHandler = contentHandler; - self.bestAttemptContent = [request.content mutableCopy]; - - [OneSignal didReceiveNotificationExtensionRequest:self.receivedRequest withMutableNotificationContent:self.bestAttemptContent withContentHandler:self.contentHandler]; -} - -- (void)serviceExtensionTimeWillExpire { - // Called just before the extension will be terminated by the system. - // Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used. - - [OneSignal serviceExtensionTimeWillExpireRequest:self.receivedRequest withMutableNotificationContent:self.bestAttemptContent]; - - self.contentHandler(self.bestAttemptContent); -} - -@end diff --git a/example_spm/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements b/example_spm/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements deleted file mode 100644 index c70461e8..00000000 --- a/example_spm/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements +++ /dev/null @@ -1,10 +0,0 @@ - - - - - com.apple.security.application-groups - - group.com.onesignal.example.onesignal - - - diff --git a/example_spm/ios/Runner.xcodeproj/project.pbxproj b/example_spm/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 4656ecdd..00000000 --- a/example_spm/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,861 +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 */; }; - 47CD9D252BE10D9400F8B006 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47CD9D242BE10D9400F8B006 /* WidgetKit.framework */; }; - 47CD9D272BE10D9400F8B006 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47CD9D262BE10D9400F8B006 /* SwiftUI.framework */; }; - 47CD9D2A2BE10D9400F8B006 /* ExampleWidgetBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47CD9D292BE10D9400F8B006 /* ExampleWidgetBundle.swift */; }; - 47CD9D2C2BE10D9400F8B006 /* ExampleWidgetLiveActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47CD9D2B2BE10D9400F8B006 /* ExampleWidgetLiveActivity.swift */; }; - 47CD9D302BE10D9500F8B006 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 47CD9D2F2BE10D9500F8B006 /* Assets.xcassets */; }; - 47CD9D342BE10D9500F8B006 /* ExampleWidgetExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 47CD9D232BE10D9400F8B006 /* ExampleWidgetExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; - 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; }; - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; - 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; - 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 */; }; - CA2C87DA21014E1800D5D35D /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA2C87D921014E1800D5D35D /* SystemConfiguration.framework */; }; - CA2C87DC21014E1C00D5D35D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA2C87DB21014E1C00D5D35D /* UIKit.framework */; }; - CA2C87F221015A8D00D5D35D /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA2C87F121015A8C00D5D35D /* UserNotifications.framework */; }; - CAB34E9320F96BDA0024CA6B /* NotificationService.m in Sources */ = {isa = PBXBuildFile; fileRef = CAB34E9220F96BDA0024CA6B /* NotificationService.m */; }; - CAB34E9D20F96F460024CA6B /* OneSignalNotificationServiceExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = CAB34E8F20F96BDA0024CA6B /* OneSignalNotificationServiceExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 47CD9D322BE10D9500F8B006 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 97C146E61CF9000F007C117D /* Project object */; - proxyType = 1; - remoteGlobalIDString = 47CD9D222BE10D9400F8B006; - remoteInfo = ExampleWidgetExtension; - }; - CAB34E9E20F96F460024CA6B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 97C146E61CF9000F007C117D /* Project object */; - proxyType = 1; - remoteGlobalIDString = CAB34E8E20F96BDA0024CA6B; - remoteInfo = OneSignalNotificationServiceExtension; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; - CAB34EA020F96F460024CA6B /* Embed App Extensions */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 13; - files = ( - CAB34E9D20F96F460024CA6B /* OneSignalNotificationServiceExtension.appex in Embed App Extensions */, - 47CD9D342BE10D9500F8B006 /* ExampleWidgetExtension.appex in Embed App Extensions */, - ); - name = "Embed App 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 = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 47CD9D232BE10D9400F8B006 /* ExampleWidgetExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = ExampleWidgetExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; - 47CD9D242BE10D9400F8B006 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; }; - 47CD9D262BE10D9400F8B006 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; }; - 47CD9D292BE10D9400F8B006 /* ExampleWidgetBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleWidgetBundle.swift; sourceTree = ""; }; - 47CD9D2B2BE10D9400F8B006 /* ExampleWidgetLiveActivity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleWidgetLiveActivity.swift; sourceTree = ""; }; - 47CD9D2F2BE10D9500F8B006 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 47CD9D312BE10D9500F8B006 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; 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; }; - 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 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 = ""; }; - CA23C3A020F4095B00835044 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; - CA2C87D921014E1800D5D35D /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; - CA2C87DB21014E1C00D5D35D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - CA2C87F121015A8C00D5D35D /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = System/Library/Frameworks/UserNotifications.framework; sourceTree = SDKROOT; }; - CAB34E8F20F96BDA0024CA6B /* OneSignalNotificationServiceExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = OneSignalNotificationServiceExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; - CAB34E9120F96BDA0024CA6B /* NotificationService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotificationService.h; sourceTree = ""; }; - CAB34E9220F96BDA0024CA6B /* NotificationService.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NotificationService.m; sourceTree = ""; }; - CAB34E9420F96BDA0024CA6B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - CAB34E9C20F96BE60024CA6B /* OneSignalNotificationServiceExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = OneSignalNotificationServiceExtension.entitlements; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 47CD9D202BE10D9400F8B006 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 47CD9D272BE10D9400F8B006 /* SwiftUI.framework in Frameworks */, - 47CD9D252BE10D9400F8B006 /* WidgetKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CAB34E8C20F96BDA0024CA6B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - CA2C87F221015A8D00D5D35D /* UserNotifications.framework in Frameworks */, - CA2C87DC21014E1C00D5D35D /* UIKit.framework in Frameworks */, - CA2C87DA21014E1800D5D35D /* SystemConfiguration.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 47CD9D282BE10D9400F8B006 /* ExampleWidget */ = { - isa = PBXGroup; - children = ( - 47CD9D292BE10D9400F8B006 /* ExampleWidgetBundle.swift */, - 47CD9D2B2BE10D9400F8B006 /* ExampleWidgetLiveActivity.swift */, - 47CD9D2F2BE10D9500F8B006 /* Assets.xcassets */, - 47CD9D312BE10D9500F8B006 /* Info.plist */, - ); - path = ExampleWidget; - sourceTree = ""; - }; - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */, - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - CAB34E9020F96BDA0024CA6B /* OneSignalNotificationServiceExtension */, - 47CD9D282BE10D9400F8B006 /* ExampleWidget */, - 97C146EF1CF9000F007C117D /* Products */, - E458450F0521E6D94C4900F1 /* Frameworks */, - BA809C1A17A51DB9BC859D35 /* Pods */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - CAB34E8F20F96BDA0024CA6B /* OneSignalNotificationServiceExtension.appex */, - 47CD9D232BE10D9400F8B006 /* ExampleWidgetExtension.appex */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - CA23C3A020F4095B00835044 /* Runner.entitlements */, - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - ); - path = Runner; - sourceTree = ""; - }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 97C146F21CF9000F007C117D /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - BA809C1A17A51DB9BC859D35 /* Pods */ = { - isa = PBXGroup; - children = ( - ); - path = Pods; - sourceTree = ""; - }; - CAB34E9020F96BDA0024CA6B /* OneSignalNotificationServiceExtension */ = { - isa = PBXGroup; - children = ( - CAB34E9C20F96BE60024CA6B /* OneSignalNotificationServiceExtension.entitlements */, - CAB34E9120F96BDA0024CA6B /* NotificationService.h */, - CAB34E9220F96BDA0024CA6B /* NotificationService.m */, - CAB34E9420F96BDA0024CA6B /* Info.plist */, - ); - path = OneSignalNotificationServiceExtension; - sourceTree = ""; - }; - E458450F0521E6D94C4900F1 /* Frameworks */ = { - isa = PBXGroup; - children = ( - CA2C87F121015A8C00D5D35D /* UserNotifications.framework */, - CA2C87DB21014E1C00D5D35D /* UIKit.framework */, - CA2C87D921014E1800D5D35D /* SystemConfiguration.framework */, - 47CD9D242BE10D9400F8B006 /* WidgetKit.framework */, - 47CD9D262BE10D9400F8B006 /* SwiftUI.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 47CD9D222BE10D9400F8B006 /* ExampleWidgetExtension */ = { - isa = PBXNativeTarget; - buildConfigurationList = 47CD9D352BE10D9500F8B006 /* Build configuration list for PBXNativeTarget "ExampleWidgetExtension" */; - buildPhases = ( - 47CD9D1F2BE10D9400F8B006 /* Sources */, - 47CD9D202BE10D9400F8B006 /* Frameworks */, - 47CD9D212BE10D9400F8B006 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = ExampleWidgetExtension; - productName = ExampleWidgetExtension; - productReference = 47CD9D232BE10D9400F8B006 /* ExampleWidgetExtension.appex */; - productType = "com.apple.product-type.app-extension"; - }; - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - CAB34EA020F96F460024CA6B /* Embed App Extensions */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - CAB34E9F20F96F460024CA6B /* PBXTargetDependency */, - 47CD9D332BE10D9500F8B006 /* PBXTargetDependency */, - ); - name = Runner; - packageProductDependencies = ( - 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */, - ); - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; - CAB34E8E20F96BDA0024CA6B /* OneSignalNotificationServiceExtension */ = { - isa = PBXNativeTarget; - buildConfigurationList = CAB34E9A20F96BDA0024CA6B /* Build configuration list for PBXNativeTarget "OneSignalNotificationServiceExtension" */; - buildPhases = ( - CAB34E8B20F96BDA0024CA6B /* Sources */, - CAB34E8C20F96BDA0024CA6B /* Frameworks */, - CAB34E8D20F96BDA0024CA6B /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = OneSignalNotificationServiceExtension; - productName = OneSignalNotificationServiceExtension; - productReference = CAB34E8F20F96BDA0024CA6B /* OneSignalNotificationServiceExtension.appex */; - productType = "com.apple.product-type.app-extension"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 1530; - LastUpgradeCheck = 1510; - ORGANIZATIONNAME = "The Chromium Authors"; - TargetAttributes = { - 47CD9D222BE10D9400F8B006 = { - CreatedOnToolsVersion = 15.3; - }; - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - DevelopmentTeam = 99SW8E36CT; - SystemCapabilities = { - com.apple.ApplicationGroups.iOS = { - enabled = 1; - }; - com.apple.Push = { - enabled = 1; - }; - }; - }; - CAB34E8E20F96BDA0024CA6B = { - CreatedOnToolsVersion = 9.4.1; - DevelopmentTeam = 99SW8E36CT; - ProvisioningStyle = Automatic; - SystemCapabilities = { - com.apple.ApplicationGroups.iOS = { - enabled = 1; - }; - }; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - English, - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - packageReferences = ( - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */, - ); - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - CAB34E8E20F96BDA0024CA6B /* OneSignalNotificationServiceExtension */, - 47CD9D222BE10D9400F8B006 /* ExampleWidgetExtension */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 47CD9D212BE10D9400F8B006 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 47CD9D302BE10D9500F8B006 /* Assets.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CAB34E8D20F96BDA0024CA6B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 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\n"; - }; - 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\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 47CD9D1F2BE10D9400F8B006 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 47CD9D2A2BE10D9400F8B006 /* ExampleWidgetBundle.swift in Sources */, - 47CD9D2C2BE10D9400F8B006 /* ExampleWidgetLiveActivity.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, - 97C146F31CF9000F007C117D /* main.m in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CAB34E8B20F96BDA0024CA6B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - CAB34E9320F96BDA0024CA6B /* NotificationService.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 47CD9D332BE10D9500F8B006 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 47CD9D222BE10D9400F8B006 /* ExampleWidgetExtension */; - targetProxy = 47CD9D322BE10D9500F8B006 /* PBXContainerItemProxy */; - }; - CAB34E9F20F96F460024CA6B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = CAB34E8E20F96BDA0024CA6B /* OneSignalNotificationServiceExtension */; - targetProxy = CAB34E9E20F96F460024CA6B /* 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 */ - 47CD9D362BE10D9500F8B006 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = ExampleWidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = ExampleWidget; - INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2024 The Chromium Authors. All rights reserved."; - IPHONEOS_DEPLOYMENT_TARGET = 17.4; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.ExampleWidget; - 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; - }; - 47CD9D372BE10D9500F8B006 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = ExampleWidget/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = ExampleWidget; - INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2024 The Chromium Authors. All rights reserved."; - IPHONEOS_DEPLOYMENT_TARGET = 17.4; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; - MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.ExampleWidget; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - 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_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_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; - 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 = 13.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; - 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_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_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; - 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 = 13.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 99SW8E36CT; - ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - CAB34E9820F96BDA0024CA6B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 99SW8E36CT; - ENABLE_BITCODE = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.OneSignalNotificationServiceExtensionA; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - CAB34E9920F96BDA0024CA6B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = 99SW8E36CT; - ENABLE_BITCODE = NO; - GCC_C_LANGUAGE_STANDARD = gnu11; - INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@executable_path/../../Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.OneSignalNotificationServiceExtensionA; - PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 47CD9D352BE10D9500F8B006 /* Build configuration list for PBXNativeTarget "ExampleWidgetExtension" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 47CD9D362BE10D9500F8B006 /* Debug */, - 47CD9D372BE10D9500F8B006 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - CAB34E9A20F96BDA0024CA6B /* Build configuration list for PBXNativeTarget "OneSignalNotificationServiceExtension" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - CAB34E9820F96BDA0024CA6B /* Debug */, - CAB34E9920F96BDA0024CA6B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - -/* Begin XCLocalSwiftPackageReference section */ - 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = { - isa = XCLocalSwiftPackageReference; - relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; - }; -/* End XCLocalSwiftPackageReference section */ - -/* Begin XCSwiftPackageProductDependency section */ - 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = { - isa = XCSwiftPackageProductDependency; - productName = FlutterGeneratedPluginSwiftPackage; - }; -/* End XCSwiftPackageProductDependency section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/example_spm/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example_spm/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6..00000000 --- a/example_spm/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/example_spm/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/example_spm/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index 81e531e0..00000000 --- a/example_spm/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,14 +0,0 @@ -{ - "pins" : [ - { - "identity" : "onesignal-xcframework", - "kind" : "remoteSourceControl", - "location" : "https://github.com/OneSignal/OneSignal-XCFramework", - "state" : { - "revision" : "8fcd9c4dbc8ab8bb6383dd4e9bde068a6b6d4f93", - "version" : "5.2.15" - } - } - ], - "version" : 2 -} diff --git a/example_spm/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example_spm/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index 851adedd..00000000 --- a/example_spm/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example_spm/ios/Runner.xcworkspace/contents.xcworkspacedata b/example_spm/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 21a3cc14..00000000 --- a/example_spm/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/example_spm/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example_spm/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/example_spm/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/example_spm/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved b/example_spm/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index 81e531e0..00000000 --- a/example_spm/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,14 +0,0 @@ -{ - "pins" : [ - { - "identity" : "onesignal-xcframework", - "kind" : "remoteSourceControl", - "location" : "https://github.com/OneSignal/OneSignal-XCFramework", - "state" : { - "revision" : "8fcd9c4dbc8ab8bb6383dd4e9bde068a6b6d4f93", - "version" : "5.2.15" - } - } - ], - "version" : 2 -} diff --git a/example_spm/ios/Runner/AppDelegate.h b/example_spm/ios/Runner/AppDelegate.h deleted file mode 100644 index 36e21bbf..00000000 --- a/example_spm/ios/Runner/AppDelegate.h +++ /dev/null @@ -1,6 +0,0 @@ -#import -#import - -@interface AppDelegate : FlutterAppDelegate - -@end diff --git a/example_spm/ios/Runner/AppDelegate.m b/example_spm/ios/Runner/AppDelegate.m deleted file mode 100644 index 59a72e90..00000000 --- a/example_spm/ios/Runner/AppDelegate.m +++ /dev/null @@ -1,13 +0,0 @@ -#include "AppDelegate.h" -#include "GeneratedPluginRegistrant.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application - didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - [GeneratedPluginRegistrant registerWithRegistry:self]; - // Override point for customization after application launch. - return [super application:application didFinishLaunchingWithOptions:launchOptions]; -} - -@end diff --git a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fab..00000000 --- a/example_spm/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/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index 3d43d11e..00000000 Binary files a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf03..00000000 Binary files a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd96..00000000 Binary files a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b0..00000000 Binary files a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde1211..00000000 Binary files a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e7..00000000 Binary files a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc2306..00000000 Binary files a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd96..00000000 Binary files a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8f..00000000 Binary files a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b860..00000000 Binary files a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b860..00000000 Binary files a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d164..00000000 Binary files a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d3..00000000 Binary files a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41e..00000000 Binary files a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f585..00000000 Binary files a/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/example_spm/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/example_spm/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2f..00000000 --- a/example_spm/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/example_spm/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/example_spm/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/example_spm/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/example_spm/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/example_spm/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/example_spm/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/example_spm/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/example_spm/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19eac..00000000 Binary files a/example_spm/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/example_spm/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/example_spm/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725b..00000000 --- a/example_spm/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/example_spm/ios/Runner/Base.lproj/LaunchScreen.storyboard b/example_spm/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c7..00000000 --- a/example_spm/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example_spm/ios/Runner/Base.lproj/Main.storyboard b/example_spm/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c28516..00000000 --- a/example_spm/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example_spm/ios/Runner/Runner.entitlements b/example_spm/ios/Runner/Runner.entitlements deleted file mode 100644 index 34463649..00000000 --- a/example_spm/ios/Runner/Runner.entitlements +++ /dev/null @@ -1,12 +0,0 @@ - - - - - aps-environment - development - com.apple.security.application-groups - - group.com.onesignal.example.onesignal - - - diff --git a/example_spm/ios/Runner/main.m b/example_spm/ios/Runner/main.m deleted file mode 100644 index dff6597e..00000000 --- a/example_spm/ios/Runner/main.m +++ /dev/null @@ -1,9 +0,0 @@ -#import -#import -#import "AppDelegate.h" - -int main(int argc, char* argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/example_spm/lib/main.dart b/example_spm/lib/main.dart deleted file mode 100644 index b77b9201..00000000 --- a/example_spm/lib/main.dart +++ /dev/null @@ -1,569 +0,0 @@ -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:onesignal_flutter/onesignal_flutter.dart'; - -void main() => runApp(new MyApp()); - -class MyApp extends StatefulWidget { - @override - _MyAppState createState() => new _MyAppState(); -} - -class _MyAppState extends State { - String _debugLabelString = ""; - String? _emailAddress; - String? _smsNumber; - String? _externalUserId; - String? _language; - String? _liveActivityId; - bool _enableConsentButton = false; - - // CHANGE THIS parameter to true if you want to test GDPR privacy consent - bool _requireConsent = false; - - @override - void initState() { - super.initState(); - initPlatformState(); - } - - // Platform messages are asynchronous, so we initialize in an async method. - Future initPlatformState() async { - if (!mounted) return; - - OneSignal.Debug.setLogLevel(OSLogLevel.verbose); - - OneSignal.Debug.setAlertLevel(OSLogLevel.none); - OneSignal.consentRequired(_requireConsent); - - // NOTE: Replace with your own app ID from https://www.onesignal.com - OneSignal.initialize("77e32082-ea27-42e3-a898-c72e141824ef"); - - OneSignal.LiveActivities.setupDefault(); - // OneSignal.LiveActivities.setupDefault(options: new LiveActivitySetupOptions(enablePushToStart: false, enablePushToUpdate: true)); - - // AndroidOnly stat only - // OneSignal.Notifications.removeNotification(1); - // OneSignal.Notifications.removeGroupedNotifications("group5"); - - OneSignal.Notifications.clearAll(); - - OneSignal.User.pushSubscription.addObserver((state) { - print(OneSignal.User.pushSubscription.optedIn); - print(OneSignal.User.pushSubscription.id); - print(OneSignal.User.pushSubscription.token); - print(state.current.jsonRepresentation()); - }); - - OneSignal.User.addObserver((state) { - var userState = state.jsonRepresentation(); - print('OneSignal user changed: $userState'); - }); - - OneSignal.Notifications.addPermissionObserver((state) { - print("Has permission " + state.toString()); - }); - - OneSignal.Notifications.addClickListener((event) { - print('NOTIFICATION CLICK LISTENER CALLED WITH EVENT: $event'); - this.setState(() { - _debugLabelString = - "Clicked notification: \n${event.notification.jsonRepresentation().replaceAll("\\n", "\n")}"; - }); - }); - - OneSignal.Notifications.addForegroundWillDisplayListener((event) { - print( - 'NOTIFICATION WILL DISPLAY LISTENER CALLED WITH: ${event.notification.jsonRepresentation()}'); - - /// Display Notification, preventDefault to not display - event.preventDefault(); - - /// Do async work - - /// notification.display() to display after preventing default - event.notification.display(); - - this.setState(() { - _debugLabelString = - "Notification received in foreground notification: \n${event.notification.jsonRepresentation().replaceAll("\\n", "\n")}"; - }); - }); - - OneSignal.InAppMessages.addClickListener((event) { - this.setState(() { - _debugLabelString = - "In App Message Clicked: \n${event.result.jsonRepresentation().replaceAll("\\n", "\n")}"; - }); - }); - OneSignal.InAppMessages.addWillDisplayListener((event) { - print("ON WILL DISPLAY IN APP MESSAGE ${event.message.messageId}"); - }); - OneSignal.InAppMessages.addDidDisplayListener((event) { - print("ON DID DISPLAY IN APP MESSAGE ${event.message.messageId}"); - }); - OneSignal.InAppMessages.addWillDismissListener((event) { - print("ON WILL DISMISS IN APP MESSAGE ${event.message.messageId}"); - }); - OneSignal.InAppMessages.addDidDismissListener((event) { - print("ON DID DISMISS IN APP MESSAGE ${event.message.messageId}"); - }); - - this.setState(() { - _enableConsentButton = _requireConsent; - }); - - // Some examples of how to use In App Messaging public methods with OneSignal SDK - oneSignalInAppMessagingTriggerExamples(); - - // Some examples of how to use Outcome Events public methods with OneSignal SDK - oneSignalOutcomeExamples(); - - OneSignal.InAppMessages.paused(true); - } - - void _handleSendTags() { - print("Sending tags"); - OneSignal.User.addTagWithKey("test2", "val2"); - - print("Sending tags array"); - var sendTags = {'test': 'value', 'test2': 'value2'}; - OneSignal.User.addTags(sendTags); - } - - void _handleRemoveTag() { - print("Deleting tag"); - OneSignal.User.removeTag("test2"); - - print("Deleting tags array"); - OneSignal.User.removeTags(['test']); - } - - void _handleGetTags() async { - print("Get tags"); - - var tags = await OneSignal.User.getTags(); - print(tags); - } - - void _handlePromptForPushPermission() { - print("Prompting for Permission"); - OneSignal.Notifications.requestPermission(true); - } - - void _handleSetLanguage() { - if (_language == null) return; - print("Setting language"); - OneSignal.User.setLanguage(_language!); - } - - void _handleSetEmail() { - if (_emailAddress == null) return; - print("Setting email"); - - OneSignal.User.addEmail(_emailAddress!); - } - - void _handleRemoveEmail() { - if (_emailAddress == null) return; - print("Remove email"); - - OneSignal.User.removeEmail(_emailAddress!); - } - - void _handleSetSMSNumber() { - if (_smsNumber == null) return; - print("Setting SMS Number"); - - OneSignal.User.addSms(_smsNumber!); - } - - void _handleRemoveSMSNumber() { - if (_smsNumber == null) return; - print("Remove smsNumber"); - - OneSignal.User.removeSms(_smsNumber!); - } - - void _handleConsent() { - print("Setting consent to true"); - OneSignal.consentGiven(true); - - print("Setting state"); - this.setState(() { - _enableConsentButton = false; - }); - } - - void _handleSetLocationShared() { - print("Setting location shared to true"); - OneSignal.Location.setShared(true); - } - - void _handleGetExternalId() async { - var externalId = await OneSignal.User.getExternalId(); - print('External ID: $externalId'); - } - - void _handleLogin() { - print("Setting external user ID"); - if (_externalUserId == null) return; - OneSignal.login(_externalUserId!); - OneSignal.User.addAlias("fb_id", "1341524"); - } - - void _handleLogout() { - OneSignal.logout(); - OneSignal.User.removeAlias("fb_id"); - } - - void _handleGetOnesignalId() async { - var onesignalId = await OneSignal.User.getOnesignalId(); - print('OneSignal ID: $onesignalId'); - } - - oneSignalInAppMessagingTriggerExamples() async { - /// Example addTrigger call for IAM - /// This will add 1 trigger so if there are any IAM satisfying it, it - /// will be shown to the user - OneSignal.InAppMessages.addTrigger("trigger_1", "one"); - - /// Example addTriggers call for IAM - /// This will add 2 triggers so if there are any IAM satisfying these, they - /// will be shown to the user - Map triggers = new Map(); - triggers["trigger_2"] = "two"; - triggers["trigger_3"] = "three"; - OneSignal.InAppMessages.addTriggers(triggers); - - // Removes a trigger by its key so if any future IAM are pulled with - // these triggers they will not be shown until the trigger is added back - OneSignal.InAppMessages.removeTrigger("trigger_2"); - - // Create a list and bulk remove triggers based on keys supplied - List keys = ["trigger_1", "trigger_3"]; - OneSignal.InAppMessages.removeTriggers(keys); - - // Toggle pausing (displaying or not) of IAMs - OneSignal.InAppMessages.paused(true); - var arePaused = await OneSignal.InAppMessages.arePaused(); - print('Notifications paused $arePaused'); - } - - oneSignalOutcomeExamples() async { - OneSignal.Session.addOutcome("normal_1"); - OneSignal.Session.addOutcome("normal_2"); - - OneSignal.Session.addUniqueOutcome("unique_1"); - OneSignal.Session.addUniqueOutcome("unique_2"); - - OneSignal.Session.addOutcomeWithValue("value_1", 3.2); - OneSignal.Session.addOutcomeWithValue("value_2", 3.9); - } - - void _handleOptIn() { - OneSignal.User.pushSubscription.optIn(); - } - - void _handleOptOut() { - OneSignal.User.pushSubscription.optOut(); - } - - void _handleStartDefaultLiveActivity() { - if (_liveActivityId == null) return; - print("Starting default live activity"); - OneSignal.LiveActivities.startDefault(_liveActivityId!, { - "title": "Welcome!" - }, { - "message": {"en": "Hello World!"}, - "intValue": 3, - "doubleValue": 3.14, - "boolValue": true - }); - } - - void _handleEnterLiveActivity() { - if (_liveActivityId == null) return; - print("Entering live activity"); - OneSignal.LiveActivities.enterLiveActivity(_liveActivityId!, "FAKE_TOKEN"); - } - - void _handleExitLiveActivity() { - if (_liveActivityId == null) return; - print("Exiting live activity"); - OneSignal.LiveActivities.exitLiveActivity(_liveActivityId!); - } - - void _handleSetPushToStartLiveActivity() { - if (_liveActivityId == null) return; - print("Setting Push-To-Start live activity"); - OneSignal.LiveActivities.setPushToStartToken( - _liveActivityId!, "FAKE_TOKEN"); - } - - void _handleRemovePushToStartLiveActivity() { - if (_liveActivityId == null) return; - print("Setting Push-To-Start live activity"); - OneSignal.LiveActivities.removePushToStartToken(_liveActivityId!); - } - - @override - Widget build(BuildContext context) { - return new MaterialApp( - home: new Scaffold( - appBar: new AppBar( - title: const Text('OneSignal Flutter Demo'), - backgroundColor: Color.fromARGB(255, 212, 86, 83), - ), - body: Container( - padding: EdgeInsets.all(10.0), - child: SingleChildScrollView( - child: new Table( - children: [ - new TableRow(children: [ - new OneSignalButton( - "Send Tags", _handleSendTags, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton( - "Get Tags", _handleGetTags, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Prompt for Push Permission", - _handlePromptForPushPermission, !_enableConsentButton) - ]), - new TableRow(children: [ - new TextField( - textAlign: TextAlign.center, - decoration: InputDecoration( - hintText: "Email Address", - labelStyle: TextStyle( - color: Color.fromARGB(255, 212, 86, 83), - )), - onChanged: (text) { - this.setState(() { - _emailAddress = text == "" ? null : text; - }); - }, - ) - ]), - new TableRow(children: [ - Container( - height: 8.0, - ) - ]), - new TableRow(children: [ - new OneSignalButton( - "Set Email", _handleSetEmail, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Logout Email", _handleRemoveEmail, - !_enableConsentButton) - ]), - new TableRow(children: [ - new TextField( - textAlign: TextAlign.center, - decoration: InputDecoration( - hintText: "SMS Number", - labelStyle: TextStyle( - color: Color.fromARGB(255, 212, 86, 83), - )), - onChanged: (text) { - this.setState(() { - _smsNumber = text == "" ? null : text; - }); - }, - ) - ]), - new TableRow(children: [ - Container( - height: 8.0, - ) - ]), - new TableRow(children: [ - new OneSignalButton("Set SMS Number", _handleSetSMSNumber, - !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Remove SMS Number", - _handleRemoveSMSNumber, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Provide GDPR Consent", _handleConsent, - _enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Set Location Shared", - _handleSetLocationShared, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton( - "Remove Tag", _handleRemoveTag, !_enableConsentButton) - ]), - new TableRow(children: [ - new TextField( - textAlign: TextAlign.center, - decoration: InputDecoration( - hintText: "External User ID", - labelStyle: TextStyle( - color: Color.fromARGB(255, 212, 86, 83), - )), - onChanged: (text) { - this.setState(() { - _externalUserId = text == "" ? null : text; - }); - }, - ) - ]), - new TableRow(children: [ - Container( - height: 8.0, - ) - ]), - new TableRow(children: [ - new OneSignalButton("Get External User ID", - _handleGetExternalId, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Set External User ID", _handleLogin, - !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Remove External User ID", - _handleLogout, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Get OneSignal ID", - _handleGetOnesignalId, !_enableConsentButton) - ]), - new TableRow(children: [ - new TextField( - textAlign: TextAlign.center, - decoration: InputDecoration( - hintText: "Language", - labelStyle: TextStyle( - color: Color.fromARGB(255, 212, 86, 83), - )), - onChanged: (text) { - this.setState(() { - _language = text == "" ? null : text; - }); - }, - ) - ]), - new TableRow(children: [ - Container( - height: 8.0, - ) - ]), - new TableRow(children: [ - new OneSignalButton("Set Language", _handleSetLanguage, - !_enableConsentButton) - ]), - new TableRow(children: [ - new Container( - child: new Text(_debugLabelString), - alignment: Alignment.center, - ) - ]), - new TableRow(children: [ - new OneSignalButton( - "Opt In", _handleOptIn, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton( - "Opt Out", _handleOptOut, !_enableConsentButton) - ]), - new TableRow(children: [ - new TextField( - textAlign: TextAlign.center, - decoration: InputDecoration( - hintText: "Live Activity ID", - labelStyle: TextStyle( - color: Color.fromARGB(255, 212, 86, 83), - )), - onChanged: (text) { - this.setState(() { - _liveActivityId = text == "" ? null : text; - }); - }, - ) - ]), - new TableRow(children: [ - Container( - height: 8.0, - ) - ]), - new TableRow(children: [ - new OneSignalButton("Start Default Live Activity", - _handleStartDefaultLiveActivity, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Enter Live Activity", - _handleEnterLiveActivity, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton("Exit Live Activity", - _handleExitLiveActivity, !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton( - "Set Push-To-Start Live Activity", - _handleSetPushToStartLiveActivity, - !_enableConsentButton) - ]), - new TableRow(children: [ - new OneSignalButton( - "Remove Push-To-Start Live Activity", - _handleRemovePushToStartLiveActivity, - !_enableConsentButton) - ]), - ], - ), - ), - )), - ); - } -} - -typedef void OnButtonPressed(); - -class OneSignalButton extends StatefulWidget { - final String title; - final OnButtonPressed onPressed; - final bool enabled; - - OneSignalButton(this.title, this.onPressed, this.enabled); - - State createState() => new OneSignalButtonState(); -} - -class OneSignalButtonState extends State { - @override - Widget build(BuildContext context) { - // TODO: implement build - return new Table( - children: [ - new TableRow(children: [ - new TextButton( - style: TextButton.styleFrom( - foregroundColor: Colors.white, - disabledForegroundColor: Colors.white, - backgroundColor: Color.fromARGB(255, 212, 86, 83), - disabledBackgroundColor: Color.fromARGB(180, 212, 86, 83), - padding: EdgeInsets.all(8.0), - ), - child: new Text(widget.title), - onPressed: widget.enabled ? widget.onPressed : null, - ) - ]), - new TableRow(children: [ - Container( - height: 8.0, - ) - ]), - ], - ); - } -} diff --git a/example_spm/pubspec.yaml b/example_spm/pubspec.yaml deleted file mode 100644 index a38ad68a..00000000 --- a/example_spm/pubspec.yaml +++ /dev/null @@ -1,62 +0,0 @@ -name: onesignal_example -description: Demonstrates how to use the onesignal plugin. -version: 1.0.0+1 - -dependencies: - flutter: - sdk: flutter - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.0 - -environment: - sdk: ">=2.12.0 <3.0.0" - -dev_dependencies: - flutter_test: - sdk: flutter - flutter_lints: ^2.0.0 - - onesignal_flutter: - path: ../ - -# For information on the generic Dart part of this file, see the -# following page: https://www.dartlang.org/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.io/assets-and-images/#resolution-aware. - - # For details regarding adding assets from package dependencies, see - # https://flutter.io/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.io/custom-fonts/#from-packages diff --git a/example_spm/test/widget_test.dart b/example_spm/test/widget_test.dart deleted file mode 100644 index 3127d8f4..00000000 --- a/example_spm/test/widget_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility in the flutter_test package. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:onesignal_example/main.dart'; - -void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(MyApp()); - - // Verify that our counter starts at 0. - expect(find.text('0'), findsOneWidget); - expect(find.text('1'), findsNothing); - - // Tap the '+' icon and trigger a frame. - await tester.tap(find.byIcon(Icons.add)); - await tester.pump(); - - // Verify that our counter has incremented. - expect(find.text('0'), findsNothing); - expect(find.text('1'), findsOneWidget); - }); -} diff --git a/examples/adjust.md b/examples/adjust.md new file mode 100644 index 00000000..592abd6c --- /dev/null +++ b/examples/adjust.md @@ -0,0 +1,146 @@ +## Visual Comparison & Adjustment + +### Overview + +``` +Two Android emulators should be running side by side: + 1. Reference emulator — has the existing native OneSignal demo app installed + 2. Flutter emulator — running the new Flutter demo app from examples/demo/ + +The goal is to visually compare the Flutter app against the reference app +section by section, then fix any inconsistencies in layout, spacing, colors, +section order, typography, dialog flows, or overall look and feel. +``` + +### Identify the emulators + +``` +Run `adb devices` to list connected emulators. You should see two entries. +Identify which is the reference app and which is the Flutter demo. + +A common setup: + emulator-5554 -> reference (native Android demo) + emulator-5556 -> Flutter demo + +Your emulator names may differ. Use whatever names appear in `adb devices`. +Assign them to variables for the steps below: + + REF=emulator-5554 + FLUTTER=emulator-5556 + +(Adjust these to match your actual device names.) +``` + +### Launch both apps + +``` +Launch the reference app on the reference emulator: + adb -s $REF shell am start -n com.onesignal.sdktest/.ui.main.MainActivity + +The Flutter app should already be running on the other emulator. If not: + cd examples/demo && flutter run -d $FLUTTER + +Before capturing screenshots, dismiss any in-app messages showing on +either emulator. Tap the X or click-through button on each IAM until +both apps show their main UI with no overlays. + +Then pause in-app messages on both emulators so new IAMs don't +interrupt the comparison. Scroll to the "In-App Messaging" section +on each emulator and toggle "Pause In-App Messages" on. +``` + +### Capture and compare screenshots + +``` +Create output directories: + mkdir -p /tmp/onesignal_reference /tmp/onesignal_flutter + +Layout note: Both apps have a sticky LOGS section pinned at the top. +On both emulators the scrollable content area starts at roughly y=800. +When calculating swipe distances or tap targets, account for this offset. +The screen resolution is 1344x2992 on both emulators, giving a visible +scrollable viewport of about 2200px below the LOGS section. + +Use uiautomator to find exact element positions before scrolling or tapping: + adb -s $REF shell uiautomator dump /sdcard/ui.xml && adb -s $REF pull /sdcard/ui.xml /tmp/onesignal_reference/ui.xml + adb -s $FLUTTER shell uiautomator dump /sdcard/ui.xml && adb -s $FLUTTER pull /sdcard/ui.xml /tmp/onesignal_flutter/ui.xml + +Parse bounds to locate section headers and buttons: + python3 -c " + import xml.etree.ElementTree as ET + tree = ET.parse('/tmp/onesignal_flutter/ui.xml') + for node in tree.iter(): + d = node.get('content-desc','') + b = node.get('bounds','') + if d.strip(): + print(d.split(chr(10))[0][:50], b) + " + +To scroll a specific section header into view, dump the UI hierarchy, +find the nearest visible element, and compute the swipe delta needed +to bring the target section just below the LOGS area (y~800). For example, +if the TAGS header is currently at y=2400 and you want it at y=850: + delta = 2400 - 850 = 1550 + adb -s $FLUTTER shell input swipe 672 2000 672 450 + (swipe from y=2000 up by ~1550px to y=450) + +After scrolling, re-dump the UI hierarchy to confirm the section is now +visible and get updated coordinates before tapping any buttons. + +Capture matching screenshots at each scroll position: + adb -s $REF shell screencap -p /sdcard/ref_01.png && adb -s $REF pull /sdcard/ref_01.png /tmp/onesignal_reference/ref_01.png + adb -s $FLUTTER shell screencap -p /sdcard/flutter_01.png && adb -s $FLUTTER pull /sdcard/flutter_01.png /tmp/onesignal_flutter/flutter_01.png + +Scroll section by section, aligning both emulators so the same section +header sits just below the LOGS area on each, then capture and compare. +Repeat until you have covered all sections from top to bottom. + +Compare each pair of screenshots side by side. Look for differences in: + - Section order and grouping + - Card spacing and padding + - Button styles, sizes, and colors + - Typography (font size, weight, color) + - Toggle/switch alignment + - List item layout (key-value pairs, delete icons) + - Empty state text + - Dialog layout and field arrangement (ignore dialog width — all Flutter + dialogs use full-width insetPadding by design) + - Logs section styling (background colors, text colors, header style) + must match the reference app screenshots + +Tap an element by computing the center of its bounds: + adb -s $FLUTTER shell input tap + +Type into a focused field: + adb -s $FLUTTER shell input text "test" + +Compare key dialogs on both emulators by tapping the corresponding +button on each, then capturing and comparing the dialog screenshots: + - Add Alias (single pair input) + - Add Multiple Aliases/Tags (dynamic rows with add/remove) + - Remove Selected Tags (checkbox multi-select) + - Login User + - Send Outcome (radio options) + - Track Event (with JSON properties field) + - Custom Notification (title + body) +For each dialog, compare field layout, button placement, spacing, +and validation behavior. Dismiss the dialog on both before moving on. +``` + +### Fix inconsistencies + +``` +After comparing, update the Flutter demo source code in examples/demo/lib/ +to fix any visual differences. Common things to adjust: + + - Padding/margin values in section widgets + - Font sizes or weights in theme.dart or individual sections + - Button colors or styles in action_button.dart + - Card elevation or border radius in theme.dart + - Section ordering in home_screen.dart + - Dialog field layout in dialogs.dart + +After each fix, hot reload by pressing 'r' in the user's active Flutter +terminal (check open terminals for a running flutter process) and +re-capture the Flutter screenshot to verify the change matches the reference. +``` diff --git a/examples/build.md b/examples/build.md new file mode 100644 index 00000000..f519597f --- /dev/null +++ b/examples/build.md @@ -0,0 +1,1120 @@ +# OneSignal Flutter Sample App - Build Guide + +This document contains all the prompts and requirements needed to build the OneSignal Flutter Sample App from scratch. Give these prompts to an AI assistant or follow them manually to recreate the app. + +--- + +## Phase 0: Reference Screenshots (REQUIRED) + +### Prompt 0.1 - Capture Reference UI + +``` +Before building anything, an Android emulator MUST be running with the +reference OneSignal demo app installed. These screenshots are the source +of truth for the UI you are building. Do NOT proceed to Phase 1 without them. + +Check for a connected emulator: + adb devices + +If no device is listed, stop and ask the user to start one. + +Launch the reference app: + adb shell am start -n com.onesignal.sdktest/.ui.main.MainActivity + +Dismiss any in-app messages that appear on launch. Tap the X or +click-through button on each IAM until the main UI is fully visible +with no overlays. + +Create an output directory: + mkdir -p /tmp/onesignal_reference + +Capture screenshots by scrolling through the full UI: +1. Take a screenshot from the top of the screen: + adb shell screencap -p /sdcard/ref_01.png && adb pull /sdcard/ref_01.png /tmp/onesignal_reference/ref_01.png +2. Scroll down by roughly one viewport height: + adb shell input swipe 500 1500 500 500 +3. Take the next screenshot (ref_02.png, ref_03.png, etc.) +4. Repeat until you've reached the bottom of the scrollable content + +You MUST read each captured screenshot image so you can see the actual UI. +These images define the visual target for every section you build later. +Pay close attention to: + - Section header style and casing + - Card vs non-card content grouping + - Button placement (inside vs outside cards) + - List item layout (stacked vs inline key-value) + - Icon choices (delete, close, info, etc.) + - Typography, spacing, and colors + +You can also interact with the reference app to observe specific flows: + +Dump the UI hierarchy to find elements by resource-id, text, or content-desc: + adb shell uiautomator dump /sdcard/ui.xml && adb pull /sdcard/ui.xml /tmp/onesignal_reference/ui.xml + +Parse the XML to find an element's bounds, then tap it: + adb shell input tap + +Type into a focused text field: + adb shell input text "test" + +Example flow to observe "Add Tag" behavior: + 1. Dump UI -> find the ADD button bounds -> tap it + 2. Dump UI -> find the Key and Value fields -> tap and type into them + 3. Tap the confirm button -> screenshot the result + 4. Compare the tag list state before and after + +Also capture screenshots of key dialogs to match their layout: + - Add Alias (single pair input) + - Add Multiple Aliases/Tags (dynamic rows with add/remove) + - Remove Selected Tags (checkbox multi-select) + - Login User + - Send Outcome (radio options) + - Track Event (with JSON properties field) + - Custom Notification (title + body) +These dialog screenshots are important for matching field layout, +button placement, spacing, and validation behavior. + +Refer back to these screenshots throughout all remaining phases whenever +you need to decide on layout, spacing, section order, dialog flows, or +overall look and feel. +``` + +--- + +## Phase 1: Initial Setup + +### Prompt 1.1 - Project Foundation + +``` +Create a new Flutter project at examples/demo/ (relative to the SDK repo root). + +Build the app with: +- Clean architecture: repository pattern with ChangeNotifier-based state management (Provider) +- Dart 3+ with null safety +- Material 3 theming with OneSignal brand colors +- Support for both Android and iOS +- Android package name: com.onesignal.example +- iOS bundle identifier: com.onesignal.example +- All dialogs should have EMPTY input fields (for Appium testing - test framework enters values) +- Use const constructors wherever possible for performance +- Separate widget files per section to keep files focused and readable + +Download the app bar logo SVG from: + https://raw.githubusercontent.com/OneSignal/sdk-shared/refs/heads/main/assets/onesignal_logo.svg +Save it to the demo project at assets/onesignal_logo.svg and use it for the AppBar logo via flutter_svg. + +Download the padded app icon PNG from: + https://raw.githubusercontent.com/OneSignal/sdk-shared/refs/heads/main/assets/onesignal_logo_icon_padded.png +Save it to assets/onesignal_logo_icon_padded.png, generate all platform app icons, then delete the downloaded file: + dart run flutter_launcher_icons + rm assets/onesignal_logo_icon_padded.png + +Reference the OneSignal Flutter SDK from the parent repo using a path dependency: + onesignal_flutter: + path: ../../ +``` + +### Prompt 1.2 - Dependencies (pubspec.yaml) + +``` +Add these dependencies to pubspec.yaml: + +dependencies: + flutter: + sdk: flutter + onesignal_flutter: ^5.4.0 # OneSignal SDK + provider: ^6.1.0 # State management + shared_preferences: ^2.3.0 # Local persistence + http: ^1.2.0 # REST API calls + flutter_svg: ^2.0.0 # SVG rendering (AppBar logo) + +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" +``` + +### Prompt 1.3 - OneSignal Repository + +``` +Create a OneSignalRepository class that centralizes all OneSignal SDK calls. +This is a plain Dart class (not a ChangeNotifier) injected into the ViewModel. + +User operations: +- loginUser(String externalUserId) -> Future +- logoutUser() -> Future + +Alias operations: +- addAlias(String label, String id) -> void +- addAliases(Map aliases) -> void + +Email operations: +- addEmail(String email) -> void +- removeEmail(String email) -> void + +SMS operations: +- addSms(String smsNumber) -> void +- removeSms(String smsNumber) -> void + +Tag operations: +- addTag(String key, String value) -> void +- addTags(Map tags) -> void +- removeTag(String key) -> void +- removeTags(List keys) -> void +- getTags() -> Future> + +Trigger operations (via OneSignal.InAppMessages): +- addTrigger(String key, String value) -> void +- addTriggers(Map triggers) -> void +- removeTrigger(String key) -> void +- removeTriggers(List keys) -> void +- clearTriggers() -> void + +Outcome operations (via OneSignal.Session): +- sendOutcome(String name) -> void +- sendUniqueOutcome(String name) -> void +- sendOutcomeWithValue(String name, double value) -> void + +Track Event: +- trackEvent(String name, Map? properties) -> void + +Push subscription: +- getPushSubscriptionId() -> String? +- isPushOptedIn() -> bool? +- optInPush() -> void +- optOutPush() -> void + +Notifications: +- hasPermission() -> bool +- requestPermission(bool fallbackToSettings) -> Future + +In-App Messages: +- setInAppMessagesPaused(bool paused) -> void +- isInAppMessagesPaused() -> Future + +Location: +- setLocationShared(bool shared) -> void +- isLocationShared() -> Future +- requestLocationPermission() -> void + +Privacy consent: +- setConsentRequired(bool required) -> void +- setConsentGiven(bool granted) -> void + +User IDs: +- getExternalId() -> Future +- getOnesignalId() -> Future + +Notification sending (via REST API, delegated to OneSignalApiService): +- sendNotification(NotificationType type) -> Future +- sendCustomNotification(String title, String body) -> Future +- fetchUser(String onesignalId) -> Future +``` + +### Prompt 1.4 - OneSignalApiService (REST API Client) + +``` +Create OneSignalApiService class for REST API calls using the http package: + +Properties: +- _appId: String (set during initialization) + +Methods: +- setAppId(String appId) +- getAppId() -> String +- sendNotification(NotificationType type, String subscriptionId) -> Future +- sendCustomNotification(String title, String body, String subscriptionId) -> Future +- fetchUser(String onesignalId) -> Future + +sendNotification endpoint: +- POST https://onesignal.com/api/v1/notifications +- Accept header: "application/vnd.onesignal.v1+json" +- Uses include_subscription_ids (not include_player_ids) +- Includes big_picture for Android image notifications +- Includes ios_attachments for iOS image notifications (needed for the NSE to download and attach images) + +fetchUser endpoint: +- GET https://api.onesignal.com/apps/{app_id}/users/by/onesignal_id/{onesignal_id} +- NO Authorization header needed (public endpoint) +- Returns UserData with aliases, tags, emails, smsNumbers, externalId +``` + +### Prompt 1.5 - SDK Observers + +``` +In main.dart, set up OneSignal initialization and listeners before runApp(): + +OneSignal.Debug.setLogLevel(OSLogLevel.verbose); +OneSignal.consentRequired(cachedConsentRequired); +OneSignal.consentGiven(cachedPrivacyConsent); +OneSignal.initialize(appId); + +Then register listeners: +- OneSignal.InAppMessages.addWillDisplayListener(...) +- OneSignal.InAppMessages.addDidDisplayListener(...) +- OneSignal.InAppMessages.addWillDismissListener(...) +- OneSignal.InAppMessages.addDidDismissListener(...) +- OneSignal.InAppMessages.addClickListener(...) +- OneSignal.Notifications.addClickListener(...) +- OneSignal.Notifications.addForegroundWillDisplayListener(...) + +After initialization, restore cached SDK states from SharedPreferences: +- OneSignal.InAppMessages.paused(cachedPausedStatus) +- OneSignal.Location.setShared(cachedLocationShared) + +In AppViewModel (ChangeNotifier), register observers: +- OneSignal.User.pushSubscription.addObserver(...) - react to push subscription changes +- OneSignal.Notifications.addPermissionObserver(...) - react to permission changes +- OneSignal.User.addObserver(...) - call fetchUserDataFromApi() when user changes +``` + +--- + +## Phase 2: UI Sections + +### Section Order (top to bottom) + +1. **App Section** (App ID, Guidance Banner, Consent Toggle, Logged-in-as display, Login/Logout) +2. **Push Section** (Push ID, Enabled Toggle, Auto-prompts permission on load) +3. **Send Push Notification Section** (Simple, With Image, Custom buttons) +4. **In-App Messaging Section** (Pause toggle) +5. **Send In-App Message Section** (Top Banner, Bottom Banner, Center Modal, Full Screen - with icons) +6. **Aliases Section** (Add/Add Multiple, read-only list) +7. **Emails Section** (Collapsible list >5 items) +8. **SMS Section** (Collapsible list >5 items) +9. **Tags Section** (Add/Add Multiple/Remove Selected) +10. **Outcome Events Section** (Send Outcome dialog with type selection) +11. **Triggers Section** (Add/Add Multiple/Remove Selected/Clear All - IN MEMORY ONLY) +12. **Track Event Section** (Track Event with JSON validation) +13. **Location Section** (Location Shared toggle, Prompt Location button) +14. **Next Page Button** + +### Prompt 2.1 - App Section + +``` +App Section layout: + +1. App ID display (readonly Text showing the OneSignal App ID) + +2. Sticky guidance banner below App ID: + - Text: "Add your own App ID, then rebuild to fully test all functionality." + - Link text: "Get your keys at onesignal.com" (clickable, opens browser via url_launcher) + - Light background color to stand out + +3. Consent card with up to two toggles: + a. "Consent Required" toggle (always visible): + - Label: "Consent Required" + - Description: "Require consent before SDK processes data" + - Calls OneSignal.consentRequired(value) + b. "Privacy Consent" toggle (only visible when Consent Required is ON): + - Label: "Privacy Consent" + - Description: "Consent given for data collection" + - Calls OneSignal.consentGiven(value) + - Separated from the above toggle by a horizontal divider + - NOT a blocking overlay - user can interact with app regardless of state + +4. User status card (always visible, ABOVE the login/logout buttons): + - Card with two rows separated by a divider + - Row 1: "Status" label on the left, value on the right + - Row 2: "External ID" label on the left, value on the right + - When logged out: + - Status shows "Anonymous" + - External ID shows "–" (dash) + - When logged in: + - Status shows "Logged In" with green styling (Color(0xFF2E7D32)) + - External ID shows the actual external user ID + +5. LOGIN USER button: + - Shows "LOGIN USER" when no user is logged in + - Shows "SWITCH USER" when a user is logged in + - Opens dialog with empty "External User Id" field + +6. LOGOUT USER button (only visible when a user is logged in) +``` + +### Prompt 2.2 - Push Section + +``` +Push Section: +- Section title: "Push" with info icon for tooltip +- Push Subscription ID display (readonly) +- Enabled toggle switch (controls optIn/optOut) +- Notification permission is automatically requested when home screen loads +- PROMPT PUSH button: + - Only visible when notification permission is NOT granted (fallback if user denied) + - Requests notification permission when clicked + - Hidden once permission is granted +``` + +### Prompt 2.3 - Send Push Notification Section + +``` +Send Push Notification Section (placed right after Push Section): +- Section title: "Send Push Notification" with info icon for tooltip +- Three buttons: + 1. SIMPLE - title: "Simple Notification", body: "This is a simple push notification" + 2. WITH IMAGE - title: "Image Notification", body: "This notification includes an image" + big_picture (Android): https://media.onesignal.com/automated_push_templates/ratings_template.png + ios_attachments (iOS): {"image": "https://media.onesignal.com/automated_push_templates/ratings_template.png"} + 3. CUSTOM - opens dialog for custom title and body + +Tooltip should explain each button type. +``` + +### Prompt 2.4 - In-App Messaging Section + +``` +In-App Messaging Section (placed right after Send Push): +- Section title: "In-App Messaging" with info icon for tooltip +- Pause In-App Messages toggle switch: + - Label: "Pause In-App Messages" + - Description: "Toggle in-app message display" +``` + +### Prompt 2.5 - Send In-App Message Section + +``` +Send In-App Message Section (placed right after In-App Messaging): +- Section title: "Send In-App Message" with info icon for tooltip +- Four FULL-WIDTH buttons (not a grid): + 1. TOP BANNER - Icons.vertical_align_top, trigger: "iam_type" = "top_banner" + 2. BOTTOM BANNER - Icons.vertical_align_bottom, trigger: "iam_type" = "bottom_banner" + 3. CENTER MODAL - Icons.crop_square, trigger: "iam_type" = "center_modal" + 4. FULL SCREEN - Icons.fullscreen, trigger: "iam_type" = "full_screen" +- Button styling: + - RED background color (Color(0xFFE9444E)) + - WHITE text + - Type-specific icon on LEFT side only (no right side icon) + - Full width of the card + - Left-aligned text and icon content (not centered) + - UPPERCASE button text +- On tap: adds trigger and shows SnackBar "Sent In-App Message: {type}" + +Tooltip should explain each IAM type. +``` + +### Prompt 2.6 - Aliases Section + +``` +Aliases Section (placed after Send In-App Message): +- Section title: "Aliases" with info icon for tooltip +- List showing key-value pairs (read-only, no delete icons) +- Each item shows: Label | ID +- Filter out "external_id" and "onesignal_id" from display (these are special) +- "No Aliases Added" text when empty +- ADD button -> PairInputDialog with empty Label and ID fields (single add) +- ADD MULTIPLE button -> MultiPairInputDialog (dynamic rows, add/remove) +- No remove/delete functionality (aliases are add-only from the UI) +``` + +### Prompt 2.7 - Emails Section + +``` +Emails Section: +- Section title: "Emails" with info icon for tooltip +- List showing email addresses +- Each item shows email with delete icon +- "No Emails Added" text when empty +- ADD EMAIL button -> dialog with empty email field +- Collapse behavior when >5 items: + - Show first 5 items + - Show "X more" text (tappable) + - Expand to show all when tapped +``` + +### Prompt 2.8 - SMS Section + +``` +SMS Section: +- Section title: "SMS" with info icon for tooltip +- List showing phone numbers +- Each item shows phone number with delete icon +- "No SMS Added" text when empty +- ADD SMS button -> dialog with empty SMS field +- Collapse behavior when >5 items (same as Emails) +``` + +### Prompt 2.9 - Tags Section + +``` +Tags Section: +- Section title: "Tags" with info icon for tooltip +- List showing key-value pairs +- Each item shows: Key | Value with delete icon +- "No Tags Added" text when empty +- ADD button -> PairInputDialog with empty Key and Value fields (single add) +- ADD MULTIPLE button -> MultiPairInputDialog (dynamic rows) +- REMOVE SELECTED button: + - Only visible when at least one tag exists + - Opens MultiSelectRemoveDialog with checkboxes +``` + +### Prompt 2.10 - Outcome Events Section + +``` +Outcome Events Section: +- Section title: "Outcome Events" with info icon for tooltip +- SEND OUTCOME button -> opens dialog with 3 radio options: + 1. Normal Outcome -> shows name input field + 2. Unique Outcome -> shows name input field + 3. Outcome with Value -> shows name and value (double) input fields +``` + +### Prompt 2.11 - Triggers Section (IN MEMORY ONLY) + +``` +Triggers Section: +- Section title: "Triggers" with info icon for tooltip +- List showing key-value pairs +- Each item shows: Key | Value with delete icon +- "No Triggers Added" text when empty +- ADD button -> PairInputDialog with empty Key and Value fields (single add) +- ADD MULTIPLE button -> MultiPairInputDialog (dynamic rows) +- Two action buttons (only visible when triggers exist): + - REMOVE SELECTED -> MultiSelectRemoveDialog with checkboxes + - CLEAR ALL -> Removes all triggers at once + +IMPORTANT: Triggers are stored IN MEMORY ONLY during the app session. +- triggersList is a List> in AppViewModel +- Triggers are NOT persisted to SharedPreferences +- Triggers are cleared when the app is killed/restarted +- This is intentional - triggers are transient test data for IAM testing +``` + +### Prompt 2.12 - Track Event Section + +``` +Track Event Section: +- Section title: "Track Event" with info icon for tooltip +- TRACK EVENT button -> opens TrackEventDialog with: + - "Event Name" label + empty input field (required, shows error if empty on submit) + - "Properties (optional, JSON)" label + input field with placeholder hint {"key": "value"} + - If non-empty and not valid JSON, shows "Invalid JSON format" error on the field + - If valid JSON, parsed via jsonDecode and converted to Map for the SDK call + - If empty, passes null + - TRACK button disabled until name is filled AND JSON is valid (or empty) +- Calls OneSignal.User.trackEvent(name, properties) +``` + +### Prompt 2.13 - Location Section + +``` +Location Section: +- Section title: "Location" with info icon for tooltip +- Location Shared toggle switch: + - Label: "Location Shared" + - Description: "Share device location with OneSignal" +- PROMPT LOCATION button +``` + +### Prompt 2.14 - Secondary Activity + +``` +Secondary Activity (launched by "Next Activity" button at bottom of main screen): +- Activity title: "Secondary Activity" +- Page content: centered text "Secondary Activity" using headlineMedium style +- Simple screen, no additional functionality needed +``` + +--- + +## Phase 3: View User API Integration + +### Prompt 3.1 - Data Loading Flow + +``` +Loading indicator overlay: +- Full-screen semi-transparent overlay with centered CircularProgressIndicator +- isLoading flag in AppViewModel +- Show/hide via Stack + Visibility based on isLoading state +- IMPORTANT: Add 100ms delay after populating data before dismissing loading indicator + - This ensures UI has time to render + - Use await Future.delayed(const Duration(milliseconds: 100)) after setting state + +On cold start: +- Check if OneSignal onesignalId is not null (via getOnesignalId()) +- If exists: show loading -> call fetchUserDataFromApi() -> populate UI -> delay 100ms -> hide loading +- If null: just show empty state (no loading indicator) + +On login (LOGIN USER / SWITCH USER): +- Show loading indicator immediately +- Call OneSignal.login(externalUserId) +- Clear old user data (aliases, emails, sms, triggers) +- Wait for onUserStateChange callback +- onUserStateChange calls fetchUserDataFromApi() +- fetchUserDataFromApi() populates UI, delays 100ms, then hides loading + +On logout: +- Show loading indicator +- Call OneSignal.logout() +- Clear local lists (aliases, emails, sms, triggers) +- Hide loading indicator + +On onUserStateChange callback: +- Call fetchUserDataFromApi() to sync with server state +- Update UI with new data (aliases, tags, emails, sms) + +Note: REST API key is NOT required for fetchUser endpoint. +``` + +### Prompt 3.2 - UserData Model + +``` +class UserData { + final Map aliases; // From identity object (filter out external_id, onesignal_id) + final Map tags; // From properties.tags object + final List emails; // From subscriptions where type=="Email" -> token + final List smsNumbers; // From subscriptions where type=="SMS" -> token + final String? externalId; // From identity.external_id + + const UserData({ + required this.aliases, + required this.tags, + required this.emails, + required this.smsNumbers, + this.externalId, + }); + + factory UserData.fromJson(Map json) { ... } +} +``` + +--- + +## Phase 4: Info Tooltips + +### Prompt 4.1 - Tooltip Content (Remote) + +``` +Tooltip content is fetched at runtime from the sdk-shared repo. Do NOT bundle a local copy. + +URL: +https://raw.githubusercontent.com/OneSignal/sdk-shared/main/demo/tooltip_content.json + +This file is maintained in the sdk-shared repo and shared across all platform demo apps. +``` + +### Prompt 4.2 - Tooltip Helper + +``` +Create TooltipHelper as a singleton: + +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 { + // Fetch tooltip_content.json from _tooltipUrl using http.get + // Parse JSON into _tooltips map + // On failure (no network, etc.), leave _tooltips empty — tooltips are non-critical + } catch (_) {} + + _initialized = true; + } + + TooltipData? getTooltip(String key) => _tooltips[key]; +} + +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}); +} +``` + +### Prompt 4.3 - Tooltip UI Integration + +``` +For each section, pass an onInfoTap callback to SectionCard: +- SectionCard has an optional info icon that calls onInfoTap when tapped +- In HomeScreen, wire onInfoTap to show a TooltipDialog +- TooltipDialog displays title, description, and options (if present) + +Example in HomeScreen: +AliasesSection( + ..., + onInfoTap: () => _showTooltipDialog(context, 'aliases'), +) + +void _showTooltipDialog(BuildContext context, String key) { + final tooltip = TooltipHelper().getTooltip(key); + if (tooltip != null) { + showDialog( + context: context, + builder: (_) => TooltipDialog(tooltip: tooltip), + ); + } +} +``` + +--- + +## Phase 5: Data Persistence & Initialization + +### What IS Persisted (SharedPreferences) + +``` +PreferencesService stores: +- OneSignal App ID +- Consent required status +- Privacy consent status +- External user ID (for login state restoration) +- Location shared status +- In-app messaging paused status +``` + +### Initialization Flow + +``` +On app startup, state is restored in two layers: + +1. main.dart restores SDK state from SharedPreferences cache BEFORE initialize: + - OneSignal.consentRequired(cachedConsentRequired) + - OneSignal.consentGiven(cachedPrivacyConsent) + - OneSignal.initialize(appId) + Then AFTER initialize, restores remaining SDK state: + - OneSignal.InAppMessages.paused(cachedPausedStatus) + - OneSignal.Location.setShared(cachedLocationShared) + This ensures consent settings are in place before the SDK initializes. + +2. AppViewModel.loadInitialState() reads UI state from the SDK (not SharedPreferences): + - consentRequired from cached prefs (no SDK getter) + - privacyConsentGiven from cached prefs (no SDK getter) + - inAppMessagesPaused from OneSignal.InAppMessages.arePaused() + - locationShared from OneSignal.Location.isShared() + - externalUserId from OneSignal.User.getExternalId() + - appId from PreferencesService (app-level config) + +This two-layer approach ensures: +- The SDK is configured with the user's last preferences before anything else runs +- The ViewModel reads the SDK's actual state as the source of truth for the UI +- The UI always reflects what the SDK reports, not stale cache values +``` + +### What is NOT Persisted (In-Memory Only) + +``` +AppViewModel holds in memory: +- triggersList: List> + - Triggers are session-only + - Cleared on app restart + - Used for testing IAM trigger conditions + +- aliasesList: + - Populated from REST API on each session start + - When user adds alias locally, added to list immediately (SDK syncs async) + - Fetched fresh via fetchUserDataFromApi() on login/app start + +- emailsList, smsNumbersList: + - Populated from REST API on each session + - Not cached locally + - Fetched fresh via fetchUserDataFromApi() + +- tagsList: + - Can be read from SDK via getTags() + - Also fetched from API for consistency +``` + +--- + +## Phase 6: Testing Values (Appium Compatibility) + +``` +All dialog input fields should be EMPTY by default. +The test automation framework (Appium) will enter these values: + +- Login Dialog: External User Id = "test" +- Add Alias Dialog: Key = "Test", Value = "Value" +- Add Multiple Aliases Dialog: Key = "Test", Value = "Value" (first row; supports multiple rows) +- Add Email Dialog: Email = "test@onesignal.com" +- Add SMS Dialog: SMS = "123-456-5678" +- Add Tag Dialog: Key = "Test", Value = "Value" +- Add Multiple Tags Dialog: Key = "Test", Value = "Value" (first row; supports multiple rows) +- Add Trigger Dialog: Key = "trigger_key", Value = "trigger_value" +- Add Multiple Triggers Dialog: Key = "trigger_key", Value = "trigger_value" (first row; supports multiple rows) +- Outcome Dialog: Name = "test_outcome", Value = "1.5" +- Track Event Dialog: Name = "test_event", Properties = "{\"key\": \"value\"}" +- Custom Notification Dialog: Title = "Test Title", Body = "Test Body" +``` + +--- + +## Phase 7: Important Implementation Details + +### Alias Management + +``` +Aliases are managed with a hybrid approach: + +1. On app start/login: Fetched from REST API via fetchUserDataFromApi() +2. When user adds alias locally: + - Call OneSignal.User.addAlias(label, id) - syncs to server async + - Immediately add to local aliasesList (don't wait for API) + - This ensures instant UI feedback while SDK syncs in background +3. On next app launch: Fresh data from API includes the synced alias +``` + +### Notification Permission + +``` +Notification permission is automatically requested when the home screen loads: +- Call viewModel.promptPush() in initState() of HomeScreen +- This ensures prompt appears after user sees the app UI +- PROMPT PUSH button remains as fallback if user initially denied +- Button hidden once permission is granted +``` + +--- + +## Phase 8: Flutter Architecture + +### Prompt 8.1 - State Management with Provider + +``` +Use Provider for dependency injection and ChangeNotifier for state management. + +main.dart: +- ChangeNotifierProvider at the root of the widget tree +- Initialize OneSignal SDK before runApp() +- Fetch tooltips in the background (non-blocking) + +AppViewModel extends ChangeNotifier: +- Holds all UI state as private fields with public getters +- Exposes action methods that update state and call notifyListeners() +- Receives OneSignalRepository via constructor injection +- Receives PreferencesService via constructor injection +``` + +### Prompt 8.2 - Reusable Widgets + +``` +Create reusable widgets in lib/widgets/: + +section_card.dart: +- Card with title Text and optional info IconButton +- Column child slot +- onInfoTap callback for tooltips +- Consistent padding and styling + +toggle_row.dart: +- Label, optional description, Switch +- Row layout with MainAxisAlignment.spaceBetween + +action_button.dart: +- PrimaryButton (filled, primary color background) +- DestructiveButton (outlined, red accent) +- Full-width buttons with SizedBox(width: double.infinity) + +list_widgets.dart: +- PairItem (key-value with optional delete IconButton) +- SingleItem (single value with delete IconButton) +- EmptyState (centered "No items" Text) +- CollapsibleList (shows 5 items, expandable) +- PairList (simple list of key-value pairs) + +loading_overlay.dart: +- Semi-transparent full-screen overlay using Stack + Container +- Centered CircularProgressIndicator +- Shown via isLoading state from AppViewModel + +dialogs.dart: +- All dialogs use insetPadding: EdgeInsets.symmetric(horizontal: 16) and SizedBox(width: double.maxFinite) on content for full-width layout +- SingleInputDialog (one TextField) +- PairInputDialog (key-value TextFields, single pair) +- MultiPairInputDialog (dynamic rows with dividers between them, X icon to delete a row, full-width dialog, batch submit) +- MultiSelectRemoveDialog (CheckboxListTile for batch remove) +- LoginDialog, OutcomeDialog, TrackEventDialog +- CustomNotificationDialog, TooltipDialog +``` + +### Prompt 8.3 - Reusable Multi-Pair Dialog + +``` +Tags, Aliases, and Triggers all share a reusable MultiPairInputDialog widget +for adding multiple key-value pairs at once. + +Behavior: +- Dialog opens full-width (insetPadding: EdgeInsets.symmetric(horizontal: 16)) +- Starts with one empty key-value row (Key and Value fields side by side) +- "Add Row" TextButton below the rows adds another empty row +- Dividers separate each row for visual clarity +- Each row shows an X (Icons.close) delete button on the right (hidden when only one row) +- "Add All" button is disabled until ALL key and value fields in every row are filled +- Validation runs on every text change and after row add/remove +- On "Add All" press, all rows are collected and submitted as a batch +- Batch operations use SDK bulk APIs (addAliases, addTags, addTriggers) +- TextEditingControllers are properly disposed in the StatefulWidget + +Used by: +- ADD MULTIPLE button (Aliases section) -> calls viewModel.addAliases(pairs) +- ADD MULTIPLE button (Tags section) -> calls viewModel.addTags(pairs) +- ADD MULTIPLE button (Triggers section) -> calls viewModel.addTriggers(pairs) +``` + +### Prompt 8.4 - Reusable Remove Multi Dialog + +``` +Tags and Triggers share a reusable MultiSelectRemoveDialog widget +for selectively removing items from the current list. + +Behavior: +- Accepts the current list of items as List> +- Renders one Checkbox per item on the left with just the key as the label (not "key: value") +- User can check 0, 1, or more items +- "Remove (N)" button shows count of selected items, disabled when none selected +- On confirm, checked items' keys are collected as List and passed to the callback + +Used by: +- REMOVE SELECTED button (Tags section) -> calls viewModel.removeSelectedTags(keys) +- REMOVE SELECTED button (Triggers section) -> calls viewModel.removeSelectedTriggers(keys) +``` + +### Prompt 8.5 - Theme + +``` +Create OneSignal theme in lib/theme.dart: + +Colors: +- oneSignalRed = Color(0xFFE54B4D) (primary) +- oneSignalGreen = Color(0xFF34A853) (success) +- oneSignalGreenLight = Color(0xFFE6F4EA) (success background) +- lightBackground = Color(0xFFF8F9FA) +- cardBackground = Colors.white +- dividerColor = Color(0xFFE8EAED) +- warningBackground = Color(0xFFFFF8E1) + +AppTheme class with static ThemeData get light: +- useMaterial3: true +- ColorScheme.fromSeed with OneSignalRed as seed +- Override primary to oneSignalRed +- Custom CardTheme with rounded corners (12dp) +- Custom ElevatedButtonTheme with rounded corners (8dp) +- Custom InputDecorationTheme with OutlineInputBorder +``` + +### Prompt 8.6 - Log View (Appium-Ready) + +``` +Add collapsible log view at top of screen for debugging and Appium testing. + +Files: +- lib/services/log_manager.dart - Singleton logger +- lib/widgets/log_view.dart - Log viewer widget with Semantics labels + +LogManager Features: +- Singleton with ChangeNotifier for reactive UI updates +- Thread-safe (all updates on main isolate via Flutter's single-thread model) +- API: LogManager().d(tag, message), .i(), .w(), .e() mimics debugPrint levels +- Also prints to console via debugPrint for development + +LogView Features: +- STICKY at the top of the screen (always visible while scrolling content below) +- Full width, no horizontal margin, no rounded corners, no top margin (touches appbar) +- Background color: 0xFF1A1B1E +- Single horizontal scroll on the entire log list (not per-row), no text truncation +- Use LayoutBuilder + ConstrainedBox(minWidth) so content is at least screen-wide +- Use vertical SingleChildScrollView + Column instead of ListView.builder (100dp container is small) +- Fixed 100dp height +- Default expanded +- Trash icon button (Icons.delete) for clearing logs, not a text button +- Auto-scroll to newest using ScrollController + +Appium Semantic Labels: +| Label | Description | +|-------|-------------| +| log_view_container | Main container | +| log_view_header | Tappable expand/collapse | +| log_view_count | Shows "(N)" log count | +| log_view_clear_button | Clear all logs | +| log_view_list | Scrollable ListView | +| log_view_empty | "No logs yet" state | +| log_entry_N | Each log row (N=index) | +| log_entry_N_timestamp | Timestamp text | +| log_entry_N_level | D/I/W/E indicator | +| log_entry_N_message | Log message content | + +Use Semantics widget with label property for Appium accessibility: +Semantics(label: 'log_entry_${index}_message', child: Text(entry.message)) +``` + +### Prompt 8.7 - SnackBar Messages + +``` +All user actions should display SnackBar messages: + +- Login: "Logged in as: {userId}" +- Logout: "Logged out" +- Add alias: "Alias added: {label}" +- Add multiple aliases: "{count} alias(es) added" +- Similar patterns for tags, triggers, emails, SMS +- Notifications: "Notification sent: {type}" or "Failed to send notification" +- In-App Messages: "Sent In-App Message: {type}" +- Outcomes: "Outcome sent: {name}" +- Events: "Event tracked: {name}" +- Location: "Location sharing enabled/disabled" +- Push: "Push enabled/disabled" + +Implementation: +- AppViewModel exposes a snackBarMessage stream or ValueNotifier +- HomeScreen listens and shows ScaffoldMessenger.of(context).showSnackBar() +- All SnackBar messages are also logged via LogManager().i() +- Clear previous SnackBar before showing new one via ScaffoldMessenger.of(context).clearSnackBars() +``` + +--- + +## Key Files Structure + +``` +examples/demo/ +├── lib/ +│ ├── main.dart # App entry, SDK init, Provider setup +│ ├── theme.dart # OneSignal Material 3 theme +│ ├── models/ +│ │ ├── user_data.dart # UserData model from API +│ │ ├── notification_type.dart # Enum with bigPicture and iosAttachments +│ │ └── in_app_message_type.dart # Enum with Material icons +│ ├── services/ +│ │ ├── onesignal_api_service.dart # REST API client (http) +│ │ ├── preferences_service.dart # SharedPreferences wrapper +│ │ ├── tooltip_helper.dart # Fetches tooltips from remote URL +│ │ └── log_manager.dart # Singleton logger with ChangeNotifier +│ ├── repositories/ +│ │ └── onesignal_repository.dart # Centralized SDK calls +│ ├── viewmodels/ +│ │ └── app_viewmodel.dart # ChangeNotifier with all UI state +│ ├── screens/ +│ │ ├── home_screen.dart # Main scrollable screen (includes LogView) +│ │ └── secondary_screen.dart # "Secondary Activity" page +│ └── widgets/ +│ ├── section_card.dart # Card with title and info icon +│ ├── toggle_row.dart # Label + Switch +│ ├── action_button.dart # Primary/Destructive buttons +│ ├── list_widgets.dart # PairList, SingleList, EmptyState +│ ├── loading_overlay.dart # Full-screen loading spinner +│ ├── log_view.dart # Collapsible log viewer (Appium-ready) +│ ├── dialogs.dart # All dialog widgets +│ └── sections/ +│ ├── app_section.dart # App ID, consent, login/logout +│ ├── push_section.dart # Push subscription controls +│ ├── send_push_section.dart # Send notification buttons +│ ├── in_app_section.dart # IAM pause toggle +│ ├── send_iam_section.dart # Send IAM buttons with icons +│ ├── aliases_section.dart # Alias management +│ ├── emails_section.dart # Email management +│ ├── sms_section.dart # SMS management +│ ├── tags_section.dart # Tag management +│ ├── outcomes_section.dart # Outcome events +│ ├── triggers_section.dart # Trigger management (in-memory) +│ ├── track_event_section.dart # Event tracking with JSON +│ └── location_section.dart # Location controls +├── android/ +│ └── app/ +│ └── src/main/ +│ └── AndroidManifest.xml # Package: com.onesignal.example +├── ios/ +│ └── Runner/ +│ └── Info.plist +├── pubspec.yaml # Dependencies +├── google-services.json # Firebase config (Android) +└── agconnect-services.json # Huawei config (Android, if needed) +``` + +Note: +- All UI is Flutter widgets (no platform-specific UI) +- Tooltip content is fetched from remote URL (not bundled locally) +- LogView at top of screen displays SDK and app logs for debugging/Appium testing +- Provider is used at the root for dependency injection and state management + +--- + +## Configuration + +### App ID Placeholder + +```dart +// In main.dart or a constants file +const String oneSignalAppId = '77e32082-ea27-42e3-a898-c72e141824ef'; +``` + +Note: REST API key is NOT required for the fetchUser endpoint. + +### Package / Bundle Identifier + +The identifiers MUST be `com.onesignal.example` to work with the existing: +- `google-services.json` (Firebase configuration) +- `agconnect-services.json` (Huawei configuration) + +If you change the identifier, you must also update these files with your own Firebase/Huawei project configuration. + +--- + +## Flutter Best Practices Applied + +- **const constructors** on all stateless widgets and immutable data classes +- **Provider** for dependency injection and reactive state, avoiding global mutable state +- **Single responsibility** per file: one widget/class per file, sections split into their own files +- **TextEditingController disposal** in all StatefulWidgets that create controllers +- **Keys** on list items via ValueKey for efficient rebuilds +- **Semantics** widgets for accessibility and Appium test automation +- **async/await** over raw Future chaining for readability +- **Immutable state** where possible; lists exposed as unmodifiable views from the ViewModel +- **Material 3** theming with ColorScheme.fromSeed for consistent design tokens +- **Minimal rebuilds** by using Consumer/Selector from Provider to scope rebuilds +- **Error handling** with try/catch on all network and SDK async calls +- **No platform channels needed** since the OneSignal Flutter SDK handles all bridging + +--- + +## Summary + +This app demonstrates all OneSignal Flutter SDK features: +- User management (login/logout, aliases with batch add) +- Push notifications (subscription, sending with images, auto-permission prompt) +- Email and SMS subscriptions +- Tags for segmentation (batch add/remove support) +- Triggers for in-app message targeting (in-memory only, batch operations) +- Outcomes for conversion tracking +- Event tracking with JSON properties validation +- In-app messages (display testing with type-specific icons) +- Location sharing +- Privacy consent management + +The app is designed to be: +1. **Testable** - Empty dialogs with Semantics labels for Appium automation +2. **Comprehensive** - All SDK features demonstrated +3. **Clean** - Repository pattern with Provider-based state management +4. **Cross-platform** - Single codebase for Android and iOS +5. **Session-based triggers** - Triggers stored in memory only, cleared on restart +6. **Responsive UI** - Loading indicator with delay to ensure UI populates before dismissing +7. **Performant** - Tooltip JSON loaded asynchronously, const widgets, scoped rebuilds +8. **Modern UI** - Material 3 theming with reusable widget components +9. **Batch Operations** - Add multiple items at once, select and remove multiple items diff --git a/examples/build_ios.md b/examples/build_ios.md new file mode 100644 index 00000000..90f070d9 --- /dev/null +++ b/examples/build_ios.md @@ -0,0 +1,304 @@ +# iOS Setup: Push Notifications + Live Activities + +Configure the demo Flutter iOS project (`com.onesignal.example`) for OneSignal push notifications and live activities. All paths below are relative to the `ios/` directory. + +--- + +## 1. Podfile + +Open `ios/Podfile` and make the following changes. + +**Uncomment the platform line** (or add it if missing): + +```ruby +platform :ios, '13.0' +``` + +**Add two new targets** after the `Runner` target block and before `post_install`: + +```ruby +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 +``` + +--- + +## 2. Runner: entitlements + Info.plist + +### Runner.entitlements + +Create `Runner/Runner.entitlements`: + +```xml + + + + + aps-environment + development + com.apple.security.application-groups + + group.com.onesignal.example.onesignal + + + +``` + +This enables push notifications (`aps-environment`) and an App Group shared with the extensions. + +### Info.plist + +In `Runner/Info.plist`, add the `UIBackgroundModes` array inside the top-level ``: + +```xml +UIBackgroundModes + + remote-notification + +``` + +--- + +## 3. Notification Service Extension + +Allows OneSignal to process notifications before display (rich media, badges, etc). Create the `OneSignalNotificationServiceExtension/` folder with three files. + +### NotificationService.swift + +```swift +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) + } + } +} +``` + +### Info.plist + +All standard `CFBundle*` keys are required for the simulator to install the extension. + +```xml + + + + + CFBundleDisplayName + OneSignalNotificationServiceExtension + 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) + NSExtension + + NSExtensionPointIdentifier + com.apple.usernotifications.service + NSExtensionPrincipalClass + $(PRODUCT_MODULE_NAME).NotificationService + + + +``` + +### OneSignalNotificationServiceExtension.entitlements + +The App Group must match the one in `Runner.entitlements`. + +```xml + + + + + com.apple.security.application-groups + + group.com.onesignal.example.onesignal + + + +``` + +--- + +## 4. Widget Extension (Live Activities) + +Create the `OneSignalWidget/` folder with the following files. + +Note: the on-disk folder is `OneSignalWidget` but the Xcode target name is `OneSignalWidgetExtension` (matching the Podfile target). + +### Info.plist + +Same standard `CFBundle*` keys as the NSE, plus `NSSupportsLiveActivities`. + +```xml + + + + + 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 + + + +``` + +### OneSignalWidgetLiveActivity.swift + +`OneSignalWidgetAttributes` must conform to `OneSignalLiveActivityAttributes` (with `var onesignal: OneSignalLiveActivityAttributeData`), and `ContentState` must conform to `OneSignalLiveActivityContentState` (with `var onesignal: OneSignalLiveActivityContentStateData?`). + +```swift +import ActivityKit +import WidgetKit +import SwiftUI +import OneSignalLiveActivities + +struct OneSignalWidgetAttributes: OneSignalLiveActivityAttributes { + public struct ContentState: OneSignalLiveActivityContentState { + var emoji: String + var onesignal: OneSignalLiveActivityContentStateData? + } + var name: String + var onesignal: OneSignalLiveActivityAttributeData +} + +struct OneSignalWidgetLiveActivity: Widget { + var body: some WidgetConfiguration { + ActivityConfiguration(for: OneSignalWidgetAttributes.self) { context in + VStack { + Text("Hello \(context.attributes.name) \(context.state.emoji)") + } + .activityBackgroundTint(Color.cyan) + .activitySystemActionForegroundColor(Color.black) + + } dynamicIsland: { context in + DynamicIsland { + DynamicIslandExpandedRegion(.leading) { + Text("Leading") + } + DynamicIslandExpandedRegion(.trailing) { + Text("Trailing") + } + DynamicIslandExpandedRegion(.bottom) { + Text("Bottom \(context.state.emoji)") + } + } compactLeading: { + Text("L") + } compactTrailing: { + Text("T \(context.state.emoji)") + } minimal: { + Text(context.state.emoji) + } + .widgetURL(URL(string: "http://www.apple.com")) + .keylineTint(Color.red) + } + } +} +``` + +### OneSignalWidgetBundle.swift + +```swift +import WidgetKit +import SwiftUI + +@main +struct OneSignalWidgetBundle: WidgetBundle { + var body: some Widget { + OneSignalWidgetLiveActivity() + } +} +``` + +--- + +## 5. project.pbxproj + +The `project.pbxproj` needs native target entries for both extensions. These are complex (UUIDs, build phases, configuration lists) and are best done by opening the `.xcodeproj` in Xcode. The key requirements: + +**Runner target changes:** +- Add `CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements` to all Runner build configurations (Debug/Release/Profile) +- Add an `Embed Foundation Extensions` copy-files phase (`dstSubfolderSpec = 13`) embedding both `.appex` products. This phase must appear **before** the `Thin Binary` script phase to avoid a build cycle. +- Add target dependencies from Runner to both extension targets + +**OneSignalNotificationServiceExtension target** (`com.apple.product-type.app-extension`): +- Sources, Frameworks, Resources build phases +- `PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.OneSignalNotificationServiceExtension` (must be prefixed with parent app's bundle ID) +- `CODE_SIGN_ENTITLEMENTS = OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements` +- `INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist` +- `SKIP_INSTALL = YES`, `SWIFT_VERSION = 5.0`, `IPHONEOS_DEPLOYMENT_TARGET = 13.0` + +**OneSignalWidgetExtension target** (`com.apple.product-type.app-extension`): +- Sources, Frameworks (linking WidgetKit.framework and SwiftUI.framework), Resources build phases +- `PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.OneSignalWidgetExtension` +- `INFOPLIST_FILE = OneSignalWidget/Info.plist` (note: folder is `OneSignalWidget`, not `OneSignalWidgetExtension`) +- `SKIP_INSTALL = YES`, `SWIFT_VERSION = 5.0`, `IPHONEOS_DEPLOYMENT_TARGET = 16.2` (Live Activities require iOS 16.2+) + +--- + +## 6. Install dependencies + +Run `flutter pub get` first (the Podfile reads `Generated.xcconfig` which this creates), then `pod install`: + +```sh +flutter pub get +cd ios && pod install +``` + +This generates the Pods workspace, xcconfig files, and CocoaPods build phases (`[CP] Check Pods Manifest.lock`, `[CP] Embed Pods Frameworks`). Open the `.xcworkspace` file (not `.xcodeproj`) going forward. + +Note: avoid setting `CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER` in extension build configurations since CocoaPods provides it via xcconfig. diff --git a/examples/demo/.gitignore b/examples/demo/.gitignore new file mode 100644 index 00000000..3820a95c --- /dev/null +++ b/examples/demo/.gitignore @@ -0,0 +1,45 @@ +# 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 diff --git a/example/.metadata b/examples/demo/.metadata similarity index 59% rename from example/.metadata rename to examples/demo/.metadata index 0f6195d3..a046c411 100644 --- a/example/.metadata +++ b/examples/demo/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: "ac4e799d237041cf905519190471f657b657155a" + revision: "f6ff1529fd6d8af5f706051d9251ac9231c83407" channel: "stable" project_type: app @@ -13,11 +13,14 @@ project_type: app migration: platforms: - platform: root - create_revision: ac4e799d237041cf905519190471f657b657155a - base_revision: ac4e799d237041cf905519190471f657b657155a + create_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 + base_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 - platform: android - create_revision: ac4e799d237041cf905519190471f657b657155a - base_revision: ac4e799d237041cf905519190471f657b657155a + create_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 + base_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 + - platform: ios + create_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 + base_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407 # User provided section diff --git a/examples/demo/README.md b/examples/demo/README.md new file mode 100644 index 00000000..b07b8c36 --- /dev/null +++ b/examples/demo/README.md @@ -0,0 +1,41 @@ +# 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 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 +``` + +If multiple devices are connected, select one when prompted or specify it: + +```bash +flutter run -d +``` + +## Configuration + +The app uses a default OneSignal App ID for testing. To use your own, update the `oneSignalAppId` constant in `lib/main.dart`. + +## Build Guide + +See [../build.md](../build.md) for the full set of prompts and requirements used to build this app. diff --git a/example_pod/analysis_options.yaml b/examples/demo/analysis_options.yaml similarity index 68% rename from example_pod/analysis_options.yaml rename to examples/demo/analysis_options.yaml index 241a690a..0d290213 100644 --- a/example_pod/analysis_options.yaml +++ b/examples/demo/analysis_options.yaml @@ -21,21 +21,8 @@ linter: # `// ignore_for_file: name_of_lint` syntax on the line or in the file # producing the lint. rules: - # Disable style lints for example app - avoid_print: false - unnecessary_new: false - unnecessary_this: false - prefer_const_constructors: false - prefer_const_constructors_in_immutables: false - use_key_in_widget_constructors: false - library_private_types_in_public_api: false - prefer_final_fields: false - prefer_interpolation_to_compose_strings: false - prefer_collection_literals: false - sort_child_properties_last: false - prefer_generic_function_type_aliases: false - annotate_overrides: false - depend_on_referenced_packages: false + # 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/example/android/.gitignore b/examples/demo/android/.gitignore similarity index 100% rename from example/android/.gitignore rename to examples/demo/android/.gitignore diff --git a/example/android/app/build.gradle.kts b/examples/demo/android/app/build.gradle.kts similarity index 80% rename from example/android/app/build.gradle.kts rename to examples/demo/android/app/build.gradle.kts index 5001623b..2ab47f29 100644 --- a/example/android/app/build.gradle.kts +++ b/examples/demo/android/app/build.gradle.kts @@ -6,22 +6,22 @@ plugins { } android { - namespace = "com.onesignal.onesignal_example" + namespace = "com.onesignal.example" compileSdk = flutter.compileSdkVersion ndkVersion = flutter.ndkVersion compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = JavaVersion.VERSION_11.toString() + jvmTarget = JavaVersion.VERSION_17.toString() } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId = "com.onesignal.onesignal_example" + applicationId = "com.onesignal.example" // 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 diff --git a/example/android/app/src/debug/AndroidManifest.xml b/examples/demo/android/app/src/debug/AndroidManifest.xml similarity index 100% rename from example/android/app/src/debug/AndroidManifest.xml rename to examples/demo/android/app/src/debug/AndroidManifest.xml diff --git a/example_spm/android/app/src/main/AndroidManifest.xml b/examples/demo/android/app/src/main/AndroidManifest.xml similarity index 98% rename from example_spm/android/app/src/main/AndroidManifest.xml rename to examples/demo/android/app/src/main/AndroidManifest.xml index 4dc65895..4891d16a 100644 --- a/example_spm/android/app/src/main/AndroidManifest.xml +++ b/examples/demo/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ + + + + + + diff --git a/examples/demo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/demo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000..1e8ecc72 Binary files /dev/null and b/examples/demo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/examples/demo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/demo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000..d2c144f1 Binary files /dev/null and b/examples/demo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/examples/demo/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/demo/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000..680b2f0b Binary files /dev/null and b/examples/demo/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/examples/demo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/demo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..8b1ef4b6 Binary files /dev/null and b/examples/demo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/examples/demo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/demo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 00000000..6062e282 Binary files /dev/null and b/examples/demo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/example/android/app/src/main/res/values-night/styles.xml b/examples/demo/android/app/src/main/res/values-night/styles.xml similarity index 100% rename from example/android/app/src/main/res/values-night/styles.xml rename to examples/demo/android/app/src/main/res/values-night/styles.xml diff --git a/examples/demo/android/app/src/main/res/values/colors.xml b/examples/demo/android/app/src/main/res/values/colors.xml new file mode 100644 index 00000000..f42ada65 --- /dev/null +++ b/examples/demo/android/app/src/main/res/values/colors.xml @@ -0,0 +1,4 @@ + + + #FFFFFF + diff --git a/example/android/app/src/main/res/values/styles.xml b/examples/demo/android/app/src/main/res/values/styles.xml similarity index 100% rename from example/android/app/src/main/res/values/styles.xml rename to examples/demo/android/app/src/main/res/values/styles.xml diff --git a/example/android/app/src/profile/AndroidManifest.xml b/examples/demo/android/app/src/profile/AndroidManifest.xml similarity index 100% rename from example/android/app/src/profile/AndroidManifest.xml rename to examples/demo/android/app/src/profile/AndroidManifest.xml diff --git a/example/android/build.gradle.kts b/examples/demo/android/build.gradle.kts similarity index 100% rename from example/android/build.gradle.kts rename to examples/demo/android/build.gradle.kts diff --git a/example/android/gradle.properties b/examples/demo/android/gradle.properties similarity index 83% rename from example/android/gradle.properties rename to examples/demo/android/gradle.properties index f018a618..fbee1d8c 100644 --- a/example/android/gradle.properties +++ b/examples/demo/android/gradle.properties @@ -1,3 +1,2 @@ org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true -android.enableJetifier=true diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/examples/demo/android/gradle/wrapper/gradle-wrapper.properties similarity index 92% rename from example/android/gradle/wrapper/gradle-wrapper.properties rename to examples/demo/android/gradle/wrapper/gradle-wrapper.properties index 02767eb1..e4ef43fb 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/examples/demo/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip diff --git a/example_pod/android/settings.gradle.kts b/examples/demo/android/settings.gradle.kts similarity index 83% rename from example_pod/android/settings.gradle.kts rename to examples/demo/android/settings.gradle.kts index 75af8a40..ca7fe065 100644 --- a/example_pod/android/settings.gradle.kts +++ b/examples/demo/android/settings.gradle.kts @@ -19,8 +19,8 @@ pluginManagement { plugins { id("dev.flutter.flutter-plugin-loader") version "1.0.0" - id("com.android.application") version "8.13.0" apply false - id("org.jetbrains.kotlin.android") version "2.1.0" apply false + id("com.android.application") version "8.11.1" apply false + id("org.jetbrains.kotlin.android") version "2.2.20" apply false } include(":app") diff --git a/examples/demo/assets/onesignal_logo.svg b/examples/demo/assets/onesignal_logo.svg new file mode 100644 index 00000000..8bb8d138 --- /dev/null +++ b/examples/demo/assets/onesignal_logo.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/demo/assets/onesignal_logo_icon_padded.png b/examples/demo/assets/onesignal_logo_icon_padded.png new file mode 100644 index 00000000..4ff809f4 Binary files /dev/null and b/examples/demo/assets/onesignal_logo_icon_padded.png differ diff --git a/examples/demo/ios/.gitignore b/examples/demo/ios/.gitignore new file mode 100644 index 00000000..7a7f9873 --- /dev/null +++ b/examples/demo/ios/.gitignore @@ -0,0 +1,34 @@ +**/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/example/ios/Flutter/AppFrameworkInfo.plist b/examples/demo/ios/Flutter/AppFrameworkInfo.plist similarity index 100% rename from example/ios/Flutter/AppFrameworkInfo.plist rename to examples/demo/ios/Flutter/AppFrameworkInfo.plist diff --git a/examples/demo/ios/Flutter/Debug.xcconfig b/examples/demo/ios/Flutter/Debug.xcconfig new file mode 100644 index 00000000..ec97fc6f --- /dev/null +++ b/examples/demo/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/examples/demo/ios/Flutter/Release.xcconfig b/examples/demo/ios/Flutter/Release.xcconfig new file mode 100644 index 00000000..c4855bfe --- /dev/null +++ b/examples/demo/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/example_spm/ios/OneSignalNotificationServiceExtension/Info.plist b/examples/demo/ios/OneSignalNotificationServiceExtension/Info.plist similarity index 74% rename from example_spm/ios/OneSignalNotificationServiceExtension/Info.plist rename to examples/demo/ios/OneSignalNotificationServiceExtension/Info.plist index 7fe6f1d2..4471f170 100644 --- a/example_spm/ios/OneSignalNotificationServiceExtension/Info.plist +++ b/examples/demo/ios/OneSignalNotificationServiceExtension/Info.plist @@ -2,8 +2,6 @@ - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName OneSignalNotificationServiceExtension CFBundleExecutable @@ -15,22 +13,17 @@ CFBundleName $(PRODUCT_NAME) CFBundlePackageType - XPC! + $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 1.0 + $(MARKETING_VERSION) CFBundleVersion - 1 - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - + $(CURRENT_PROJECT_VERSION) NSExtension NSExtensionPointIdentifier com.apple.usernotifications.service NSExtensionPrincipalClass - NotificationService + $(PRODUCT_MODULE_NAME).NotificationService diff --git a/examples/demo/ios/OneSignalNotificationServiceExtension/NotificationService.swift b/examples/demo/ios/OneSignalNotificationServiceExtension/NotificationService.swift new file mode 100644 index 00000000..d39912d3 --- /dev/null +++ b/examples/demo/ios/OneSignalNotificationServiceExtension/NotificationService.swift @@ -0,0 +1,25 @@ +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/example/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements b/examples/demo/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements similarity index 100% rename from example/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements rename to examples/demo/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements diff --git a/example/ios/OneSignalNotificationServiceExtension/Info.plist b/examples/demo/ios/OneSignalWidget/Info.plist similarity index 60% rename from example/ios/OneSignalNotificationServiceExtension/Info.plist rename to examples/demo/ios/OneSignalWidget/Info.plist index 7fe6f1d2..78d358a5 100644 --- a/example/ios/OneSignalNotificationServiceExtension/Info.plist +++ b/examples/demo/ios/OneSignalWidget/Info.plist @@ -2,10 +2,8 @@ - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName - OneSignalNotificationServiceExtension + OneSignalWidgetExtension CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -15,22 +13,17 @@ CFBundleName $(PRODUCT_NAME) CFBundlePackageType - XPC! + $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 1.0 + $(MARKETING_VERSION) CFBundleVersion - 1 - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - + $(CURRENT_PROJECT_VERSION) + NSSupportsLiveActivities + NSExtension NSExtensionPointIdentifier - com.apple.usernotifications.service - NSExtensionPrincipalClass - NotificationService + com.apple.widgetkit-extension diff --git a/examples/demo/ios/OneSignalWidget/OneSignalWidgetBundle.swift b/examples/demo/ios/OneSignalWidget/OneSignalWidgetBundle.swift new file mode 100644 index 00000000..eef16a52 --- /dev/null +++ b/examples/demo/ios/OneSignalWidget/OneSignalWidgetBundle.swift @@ -0,0 +1,9 @@ +import WidgetKit +import SwiftUI + +@main +struct OneSignalWidgetBundle: WidgetBundle { + var body: some Widget { + OneSignalWidgetLiveActivity() + } +} diff --git a/examples/demo/ios/OneSignalWidget/OneSignalWidgetLiveActivity.swift b/examples/demo/ios/OneSignalWidget/OneSignalWidgetLiveActivity.swift new file mode 100644 index 00000000..f28886e8 --- /dev/null +++ b/examples/demo/ios/OneSignalWidget/OneSignalWidgetLiveActivity.swift @@ -0,0 +1,46 @@ +import ActivityKit +import WidgetKit +import SwiftUI +import OneSignalLiveActivities + +struct OneSignalWidgetAttributes: OneSignalLiveActivityAttributes { + public struct ContentState: OneSignalLiveActivityContentState { + var emoji: String + var onesignal: OneSignalLiveActivityContentStateData? + } + var name: String + var onesignal: OneSignalLiveActivityAttributeData +} + +struct OneSignalWidgetLiveActivity: Widget { + var body: some WidgetConfiguration { + ActivityConfiguration(for: OneSignalWidgetAttributes.self) { context in + VStack { + Text("Hello \(context.attributes.name) \(context.state.emoji)") + } + .activityBackgroundTint(Color.cyan) + .activitySystemActionForegroundColor(Color.black) + + } dynamicIsland: { context in + DynamicIsland { + DynamicIslandExpandedRegion(.leading) { + Text("Leading") + } + DynamicIslandExpandedRegion(.trailing) { + Text("Trailing") + } + DynamicIslandExpandedRegion(.bottom) { + Text("Bottom \(context.state.emoji)") + } + } compactLeading: { + Text("L") + } compactTrailing: { + Text("T \(context.state.emoji)") + } minimal: { + Text(context.state.emoji) + } + .widgetURL(URL(string: "http://www.apple.com")) + .keylineTint(Color.red) + } + } +} diff --git a/example_pod/ios/Podfile b/examples/demo/ios/Podfile similarity index 84% rename from example_pod/ios/Podfile rename to examples/demo/ios/Podfile index 2f6ad5d0..f7d7afad 100644 --- a/example_pod/ios/Podfile +++ b/examples/demo/ios/Podfile @@ -28,15 +28,22 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe flutter_ios_podfile_setup target 'Runner' do + use_frameworks! + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end end target 'OneSignalNotificationServiceExtension' do - pod 'OneSignalXCFramework', '>= 5.0.2', '< 6.0.0' + use_frameworks! + pod 'OneSignalXCFramework', '>= 5.0.0', '< 6.0' end -target 'ExampleWidgetExtension' do - pod 'OneSignalXCFramework', '>= 5.0.2', '< 6.0.0' +target 'OneSignalWidgetExtension' do + use_frameworks! + pod 'OneSignalXCFramework', '>= 5.0.0', '< 6.0' end post_install do |installer| diff --git a/example/ios/Podfile.lock b/examples/demo/ios/Podfile.lock similarity index 77% rename from example/ios/Podfile.lock rename to examples/demo/ios/Podfile.lock index a250d69f..b4227689 100644 --- a/example/ios/Podfile.lock +++ b/examples/demo/ios/Podfile.lock @@ -49,11 +49,18 @@ PODS: - 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.0, >= 5.0.2) + - 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: @@ -64,12 +71,18 @@ EXTERNAL SOURCES: :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: cabc95a1d2626b1b06e7179b784ebcf0c0cde467 - onesignal_flutter: 86fd91022e69dfe6ad3766c160b947e42d8260a9 + onesignal_flutter: d706835865d1adf2f03afc7c7b6d237494e693e3 OneSignalXCFramework: 0b85a8d949247f80809a9d5598200cc263591129 + shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb + url_launcher_ios: 7a95fa5b60cc718a708b8f2966718e93db0cef1b -PODFILE CHECKSUM: 008ee3527530ade7ae7311fc02a615df31949c2e +PODFILE CHECKSUM: 957a1a5eaa09049081a89f4ec3fce88562fe0294 COCOAPODS: 1.16.2 diff --git a/examples/demo/ios/Runner.xcodeproj/project.pbxproj b/examples/demo/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000..853be55f --- /dev/null +++ b/examples/demo/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,1216 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 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 */; }; + 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 */; }; + 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, ); }; }; + E136047CBA6463056CAFE6AA /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F4C80DF527D85592B0E6C158 /* Pods_RunnerTests.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; + 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 = ""; }; + 2498217F5BED01DE8F78E0A9 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 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 = ""; }; + 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 = ""; }; + A0D4AD3A23C1019EC5C3CA1A /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.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; }; + 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 = ""; }; + F4C80DF527D85592B0E6C158 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + FA1153E70A142A707DAB6259 /* Pods_OneSignalNotificationServiceExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_OneSignalNotificationServiceExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + FB8C395E9EDA3BCD0A566BD1 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B2FEE5FC37F5386D74141E35 /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9977B3E88B946B09D5DA998B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E136047CBA6463056CAFE6AA /* Pods_RunnerTests.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 */, + F4C80DF527D85592B0E6C158 /* Pods_RunnerTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + 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 */, + 2498217F5BED01DE8F78E0A9 /* Pods-RunnerTests.debug.xcconfig */, + A0D4AD3A23C1019EC5C3CA1A /* Pods-RunnerTests.release.xcconfig */, + FB8C395E9EDA3BCD0A566BD1 /* Pods-RunnerTests.profile.xcconfig */, + ); + name = Pods; + 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 */, + 331C8082294A63A400263BE5 /* RunnerTests */, + AABB00110000000000000006 /* OneSignalNotificationServiceExtension */, + BBCC00220000000000000007 /* OneSignalWidget */, + BBCC00220000000000000012 /* WidgetKit.framework */, + BBCC00220000000000000013 /* SwiftUI.framework */, + 54FFF5546D86218B1F41ECCA /* Pods */, + 05A87DB5EF999057FBF1692F /* Frameworks */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + 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 */, + ); + 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 */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + A73A57EB97C85E6E839AEA2D /* [CP] Check Pods Manifest.lock */, + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + 9977B3E88B946B09D5DA998B /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 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 */, + 331C8080294A63A400263BE5 /* RunnerTests */, + AABB00110000000000000007 /* OneSignalNotificationServiceExtension */, + BBCC00220000000000000008 /* OneSignalWidgetExtension */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + 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 */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + AABB0011000000000000000A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + 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"; + }; + A73A57EB97C85E6E839AEA2D /* [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-RunnerTests-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; + }; + 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 */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 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 */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; + 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 = 13.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 = Q5P523GR3H; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 2498217F5BED01DE8F78E0A9 /* Pods-RunnerTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = A0D4AD3A23C1019EC5C3CA1A /* Pods-RunnerTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = FB8C395E9EDA3BCD0A566BD1 /* Pods-RunnerTests.profile.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + 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 = 13.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 = 13.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 = Q5P523GR3H; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; + 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 = Q5P523GR3H; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example; + 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 = Q5P523GR3H; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = OneSignalNotificationServiceExtension; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.OneSignalNotificationServiceExtension; + 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 = Q5P523GR3H; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = OneSignalNotificationServiceExtension; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.OneSignalNotificationServiceExtension; + 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 = Q5P523GR3H; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = OneSignalNotificationServiceExtension; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.OneSignalNotificationServiceExtension; + 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 = Q5P523GR3H; + 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.example.OneSignalWidgetExtension; + 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 = Q5P523GR3H; + 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.example.OneSignalWidgetExtension; + 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 = Q5P523GR3H; + 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.example.OneSignalWidgetExtension; + 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 */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 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/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/demo/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to examples/demo/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/demo/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to examples/demo/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/example_pod/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/examples/demo/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 78% rename from example_pod/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to examples/demo/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings index 18d98100..f9b0d7c5 100644 --- a/example_pod/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ b/examples/demo/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -2,7 +2,7 @@ - IDEDidComputeMac32BitWarning - + PreviewsEnabled + diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/examples/demo/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme similarity index 78% rename from example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme rename to examples/demo/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 851adedd..e3773d42 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/examples/demo/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -5,24 +5,6 @@ - - - - - - - - - - + + + + - IDEDidComputeMac32BitWarning - + PreviewsEnabled + diff --git a/examples/demo/ios/Runner/AppDelegate.swift b/examples/demo/ios/Runner/AppDelegate.swift new file mode 100644 index 00000000..62666446 --- /dev/null +++ b/examples/demo/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import Flutter +import UIKit + +@main +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..d0d98aa1 --- /dev/null +++ b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1 @@ +{"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/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 00000000..d4295e38 Binary files /dev/null and b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 00000000..97658bfe Binary files /dev/null and b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 00000000..b1bf42f9 Binary files /dev/null and b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 00000000..76b737e0 Binary files /dev/null and b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 00000000..b8ac6697 Binary files /dev/null and b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 00000000..d3de94d2 Binary files /dev/null and b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 00000000..f0559d2b Binary files /dev/null and b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 00000000..b1bf42f9 Binary files /dev/null and b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 00000000..59124a76 Binary files /dev/null and b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 00000000..dd146ada Binary files /dev/null and b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png new file mode 100644 index 00000000..388750c5 Binary files /dev/null and b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png differ diff --git a/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png new file mode 100644 index 00000000..5ede07ab Binary files /dev/null and b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png differ diff --git a/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png new file mode 100644 index 00000000..9edc8622 Binary files /dev/null and b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png differ diff --git a/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png new file mode 100644 index 00000000..7a6e7e45 Binary files /dev/null and b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png differ diff --git a/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 00000000..dd146ada Binary files /dev/null and b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 00000000..8e943138 Binary files /dev/null and b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png new file mode 100644 index 00000000..4fb86630 Binary files /dev/null and b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png differ diff --git a/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png new file mode 100644 index 00000000..afe9e327 Binary files /dev/null and b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png differ diff --git a/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 00000000..e6c88550 Binary files /dev/null and b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 00000000..1826d27a Binary files /dev/null and b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 00000000..1757b996 Binary files /dev/null and b/examples/demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/examples/demo/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json similarity index 100% rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json rename to examples/demo/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/examples/demo/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png rename to examples/demo/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/examples/demo/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png rename to examples/demo/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/examples/demo/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png similarity index 100% rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png rename to examples/demo/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/examples/demo/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md similarity index 100% rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md rename to examples/demo/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md diff --git a/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/examples/demo/ios/Runner/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from example/ios/Runner/Base.lproj/LaunchScreen.storyboard rename to examples/demo/ios/Runner/Base.lproj/LaunchScreen.storyboard diff --git a/example/ios/Runner/Base.lproj/Main.storyboard b/examples/demo/ios/Runner/Base.lproj/Main.storyboard similarity index 100% rename from example/ios/Runner/Base.lproj/Main.storyboard rename to examples/demo/ios/Runner/Base.lproj/Main.storyboard diff --git a/example_spm/ios/Runner/Info.plist b/examples/demo/ios/Runner/Info.plist similarity index 81% rename from example_spm/ios/Runner/Info.plist rename to examples/demo/ios/Runner/Info.plist index fa946f24..33355e85 100644 --- a/example_spm/ios/Runner/Info.plist +++ b/examples/demo/ios/Runner/Info.plist @@ -2,12 +2,10 @@ - CADisableMinimumFrameDurationOnPhone - CFBundleDevelopmentRegion - en + $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName - OneSignalDemo + OneSignal Demo CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -15,26 +13,17 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - onesignal_example + OneSignal Demo CFBundlePackageType APPL CFBundleShortVersionString - 1.0 + $(FLUTTER_BUILD_NAME) CFBundleSignature ???? CFBundleVersion - 1 + $(FLUTTER_BUILD_NUMBER) LSRequiresIPhoneOS - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - - NSSupportsLiveActivities - - UIApplicationSupportsIndirectInputEvents - UILaunchStoryboardName LaunchScreen UIMainStoryboardFile @@ -52,7 +41,13 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - UIViewControllerBasedStatusBarAppearance - + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + UIBackgroundModes + + remote-notification + diff --git a/examples/demo/ios/Runner/Runner-Bridging-Header.h b/examples/demo/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 00000000..308a2a56 --- /dev/null +++ b/examples/demo/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/example/ios/Runner/Runner.entitlements b/examples/demo/ios/Runner/Runner.entitlements similarity index 100% rename from example/ios/Runner/Runner.entitlements rename to examples/demo/ios/Runner/Runner.entitlements diff --git a/examples/demo/ios/RunnerTests/RunnerTests.swift b/examples/demo/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 00000000..86a7c3b1 --- /dev/null +++ b/examples/demo/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Flutter +import UIKit +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/examples/demo/lib/main.dart b/examples/demo/lib/main.dart new file mode 100644 index 00000000..c0298e01 --- /dev/null +++ b/examples/demo/lib/main.dart @@ -0,0 +1,98 @@ +import 'package:flutter/material.dart'; +import 'package:onesignal_flutter/onesignal_flutter.dart'; +import 'package:provider/provider.dart'; + +import 'repositories/onesignal_repository.dart'; +import 'screens/home_screen.dart'; +import 'services/log_manager.dart'; +import 'services/onesignal_api_service.dart'; +import 'services/preferences_service.dart'; +import 'services/tooltip_helper.dart'; +import 'theme.dart'; +import 'viewmodels/app_viewmodel.dart'; + +const String oneSignalAppId = '77e32082-ea27-42e3-a898-c72e141824ef'; + +Future main() async { + WidgetsFlutterBinding.ensureInitialized(); + + // Initialize preferences + final prefs = PreferencesService(); + await prefs.init(); + + final appId = prefs.appId ?? oneSignalAppId; + + // Initialize OneSignal SDK + OneSignal.Debug.setLogLevel(OSLogLevel.verbose); + OneSignal.consentRequired(prefs.consentRequired); + OneSignal.consentGiven(prefs.privacyConsent); + await OneSignal.initialize(appId); + + // 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) { + LogManager().i('IAM', 'Will display: ${event.message.messageId}'); + }); + OneSignal.InAppMessages.addDidDisplayListener((event) { + LogManager().i('IAM', 'Did display: ${event.message.messageId}'); + }); + OneSignal.InAppMessages.addWillDismissListener((event) { + LogManager().i('IAM', 'Will dismiss: ${event.message.messageId}'); + }); + OneSignal.InAppMessages.addDidDismissListener((event) { + LogManager().i('IAM', 'Did dismiss: ${event.message.messageId}'); + }); + OneSignal.InAppMessages.addClickListener((event) { + LogManager().i('IAM', 'Clicked: ${event.result.actionId}'); + }); + + // Register notification listeners + OneSignal.Notifications.addClickListener((event) { + LogManager().i('Notification', 'Clicked: ${event.notification.title}'); + }); + OneSignal.Notifications.addForegroundWillDisplayListener((event) { + LogManager().i( + 'Notification', + 'Foreground will display: ${event.notification.title}', + ); + event.notification.display(); + }); + + // Set up API service + final apiService = OneSignalApiService()..setAppId(appId); + final repository = OneSignalRepository(apiService); + + // Fetch tooltips in background + TooltipHelper().init(); + + LogManager().i('App', 'OneSignal initialized with app ID: $appId'); + + runApp( + ChangeNotifierProvider( + create: (_) { + final vm = AppViewModel(repository, 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/lib/models/in_app_message_type.dart b/examples/demo/lib/models/in_app_message_type.dart new file mode 100644 index 00000000..01b6f721 --- /dev/null +++ b/examples/demo/lib/models/in_app_message_type.dart @@ -0,0 +1,14 @@ +import 'package:flutter/material.dart'; + +enum InAppMessageType { + topBanner('Top Banner', 'top_banner', Icons.vertical_align_top), + bottomBanner('Bottom Banner', 'bottom_banner', Icons.vertical_align_bottom), + centerModal('Center Modal', 'center_modal', Icons.crop_square), + fullScreen('Full Screen', 'full_screen', Icons.fullscreen); + + final String label; + final String triggerValue; + final IconData icon; + + const InAppMessageType(this.label, this.triggerValue, this.icon); +} diff --git a/examples/demo/lib/models/notification_type.dart b/examples/demo/lib/models/notification_type.dart new file mode 100644 index 00000000..69c80cd6 --- /dev/null +++ b/examples/demo/lib/models/notification_type.dart @@ -0,0 +1,28 @@ +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' + }, + ); + + final String title; + final String body; + final String? bigPicture; + final Map? iosAttachments; + + const NotificationType({ + required this.title, + required this.body, + this.bigPicture, + this.iosAttachments, + }); +} diff --git a/examples/demo/lib/models/user_data.dart b/examples/demo/lib/models/user_data.dart new file mode 100644 index 00000000..b03b46d2 --- /dev/null +++ b/examples/demo/lib/models/user_data.dart @@ -0,0 +1,56 @@ +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/lib/repositories/onesignal_repository.dart b/examples/demo/lib/repositories/onesignal_repository.dart new file mode 100644 index 00000000..9f1a2dbf --- /dev/null +++ b/examples/demo/lib/repositories/onesignal_repository.dart @@ -0,0 +1,220 @@ +import 'package:onesignal_flutter/onesignal_flutter.dart'; + +import '../models/notification_type.dart'; +import '../models/user_data.dart'; +import '../services/log_manager.dart'; +import '../services/onesignal_api_service.dart'; + +class OneSignalRepository { + final OneSignalApiService _apiService; + + OneSignalRepository(this._apiService); + + // User operations + Future loginUser(String externalUserId) async { + LogManager().i('SDK', 'Login user: $externalUserId'); + await OneSignal.login(externalUserId); + } + + Future logoutUser() async { + LogManager().i('SDK', 'Logout user'); + await OneSignal.logout(); + } + + // Alias operations + void addAlias(String label, String id) { + LogManager().i('SDK', 'Add alias: $label = $id'); + OneSignal.User.addAlias(label, id); + } + + void addAliases(Map aliases) { + LogManager().i('SDK', 'Add aliases: $aliases'); + OneSignal.User.addAliases(aliases); + } + + // Email operations + void addEmail(String email) { + LogManager().i('SDK', 'Add email: $email'); + OneSignal.User.addEmail(email); + } + + void removeEmail(String email) { + LogManager().i('SDK', 'Remove email: $email'); + OneSignal.User.removeEmail(email); + } + + // SMS operations + void addSms(String smsNumber) { + LogManager().i('SDK', 'Add SMS: $smsNumber'); + OneSignal.User.addSms(smsNumber); + } + + void removeSms(String smsNumber) { + LogManager().i('SDK', 'Remove SMS: $smsNumber'); + OneSignal.User.removeSms(smsNumber); + } + + // Tag operations + void addTag(String key, String value) { + LogManager().i('SDK', 'Add tag: $key = $value'); + OneSignal.User.addTagWithKey(key, value); + } + + void addTags(Map tags) { + LogManager().i('SDK', 'Add tags: $tags'); + OneSignal.User.addTags(tags); + } + + void removeTag(String key) { + LogManager().i('SDK', 'Remove tag: $key'); + OneSignal.User.removeTag(key); + } + + void removeTags(List keys) { + LogManager().i('SDK', 'Remove tags: $keys'); + OneSignal.User.removeTags(keys); + } + + Future> getTags() async { + return await OneSignal.User.getTags(); + } + + // Trigger operations + void addTrigger(String key, String value) { + LogManager().i('SDK', 'Add trigger: $key = $value'); + OneSignal.InAppMessages.addTrigger(key, value); + } + + void addTriggers(Map triggers) { + LogManager().i('SDK', 'Add triggers: $triggers'); + OneSignal.InAppMessages.addTriggers(triggers); + } + + void removeTrigger(String key) { + LogManager().i('SDK', 'Remove trigger: $key'); + OneSignal.InAppMessages.removeTrigger(key); + } + + void removeTriggers(List keys) { + LogManager().i('SDK', 'Remove triggers: $keys'); + OneSignal.InAppMessages.removeTriggers(keys); + } + + void clearTriggers() { + LogManager().i('SDK', 'Clear all triggers'); + OneSignal.InAppMessages.clearTriggers(); + } + + // Outcome operations + void sendOutcome(String name) { + LogManager().i('SDK', 'Send outcome: $name'); + OneSignal.Session.addOutcome(name); + } + + void sendUniqueOutcome(String name) { + LogManager().i('SDK', 'Send unique outcome: $name'); + OneSignal.Session.addUniqueOutcome(name); + } + + void sendOutcomeWithValue(String name, double value) { + LogManager().i('SDK', 'Send outcome with value: $name = $value'); + OneSignal.Session.addOutcomeWithValue(name, value); + } + + // Track event + void trackEvent(String name, Map? properties) { + LogManager().i('SDK', 'Track event: $name, properties: $properties'); + OneSignal.User.trackEvent(name, properties); + } + + // Push subscription + String? getPushSubscriptionId() => OneSignal.User.pushSubscription.id; + + bool? isPushOptedIn() => OneSignal.User.pushSubscription.optedIn; + + void optInPush() { + LogManager().i('SDK', 'Opt in push'); + OneSignal.User.pushSubscription.optIn(); + } + + void optOutPush() { + LogManager().i('SDK', 'Opt out push'); + OneSignal.User.pushSubscription.optOut(); + } + + // Notifications + bool hasPermission() => OneSignal.Notifications.permission; + + Future requestPermission(bool fallbackToSettings) async { + LogManager().i('SDK', 'Request permission (fallback: $fallbackToSettings)'); + return await OneSignal.Notifications.requestPermission(fallbackToSettings); + } + + // In-app messages + void setInAppMessagesPaused(bool paused) { + LogManager().i('SDK', 'Set IAM paused: $paused'); + OneSignal.InAppMessages.paused(paused); + } + + Future isInAppMessagesPaused() async { + return await OneSignal.InAppMessages.arePaused(); + } + + // Location + void setLocationShared(bool shared) { + LogManager().i('SDK', 'Set location shared: $shared'); + OneSignal.Location.setShared(shared); + } + + Future isLocationShared() async { + return await OneSignal.Location.isShared(); + } + + void requestLocationPermission() { + LogManager().i('SDK', 'Request location permission'); + OneSignal.Location.requestPermission(); + } + + // Privacy consent + void setConsentRequired(bool required) { + LogManager().i('SDK', 'Set consent required: $required'); + OneSignal.consentRequired(required); + } + + void setConsentGiven(bool granted) { + LogManager().i('SDK', 'Set consent given: $granted'); + OneSignal.consentGiven(granted); + } + + // User IDs + Future getExternalId() async { + return await OneSignal.User.getExternalId(); + } + + Future getOnesignalId() async { + return await OneSignal.User.getOnesignalId(); + } + + // REST API calls + Future sendNotification(NotificationType type) async { + final subscriptionId = getPushSubscriptionId(); + if (subscriptionId == null) { + LogManager().w('SDK', 'No subscription ID for notification'); + return false; + } + return _apiService.sendNotification(type, subscriptionId); + } + + Future sendCustomNotification(String title, String body) async { + final subscriptionId = getPushSubscriptionId(); + if (subscriptionId == null) { + LogManager().w('SDK', 'No subscription ID for custom notification'); + return false; + } + return _apiService.sendCustomNotification(title, body, subscriptionId); + } + + Future fetchUser(String onesignalId) async { + return _apiService.fetchUser(onesignalId); + } +} diff --git a/examples/demo/lib/screens/home_screen.dart b/examples/demo/lib/screens/home_screen.dart new file mode 100644 index 00000000..3eccc1a0 --- /dev/null +++ b/examples/demo/lib/screens/home_screen.dart @@ -0,0 +1,173 @@ +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/loading_overlay.dart'; +import '../widgets/log_view.dart'; +import '../widgets/sections/aliases_section.dart'; +import '../widgets/sections/app_section.dart'; +import '../widgets/sections/emails_section.dart'; +import '../widgets/sections/in_app_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/track_event_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) { + final vm = context.watch(); + + // Listen for snackbar messages + WidgetsBinding.instance.addPostFrameCallback((_) { + final message = vm.snackBarMessage; + if (message != null) { + ScaffoldMessenger.of(context) + ..clearSnackBars() + ..showSnackBar(SnackBar(content: Text(message))); + vm.clearSnackBar(); + } + }); + + return Scaffold( + appBar: AppBar( + 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), + const Text( + 'Sample App', + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w400, + ), + ), + ], + ), + ), + body: LoadingOverlay( + isLoading: vm.isLoading, + child: Column( + children: [ + const LogView(), + Expanded( + child: ListView( + padding: const EdgeInsets.only(bottom: 24), + children: [ + AppSection( + onInfoTap: () => _showTooltipDialog(context, 'app'), + ), + PushSection( + onInfoTap: () => _showTooltipDialog(context, 'push'), + ), + SendPushSection( + onInfoTap: () => + _showTooltipDialog(context, 'send_push_notification'), + ), + InAppSection( + onInfoTap: () => + _showTooltipDialog(context, 'in_app_messaging'), + ), + SendIamSection( + onInfoTap: () => + _showTooltipDialog(context, 'send_in_app_message'), + ), + AliasesSection( + onInfoTap: () => _showTooltipDialog(context, 'aliases'), + ), + EmailsSection( + onInfoTap: () => _showTooltipDialog(context, 'emails'), + ), + SmsSection( + onInfoTap: () => _showTooltipDialog(context, 'sms'), + ), + TagsSection( + onInfoTap: () => _showTooltipDialog(context, 'tags'), + ), + OutcomesSection( + onInfoTap: () => + _showTooltipDialog(context, 'outcome_events'), + ), + TriggersSection( + onInfoTap: () => _showTooltipDialog(context, 'triggers'), + ), + TrackEventSection( + onInfoTap: () => + _showTooltipDialog(context, 'track_event'), + ), + LocationSection( + onInfoTap: () => _showTooltipDialog(context, 'location'), + ), + 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.oneSignalRed, + foregroundColor: Colors.white, + ), + child: const Text('NEXT ACTIVITY'), + ), + ), + const SizedBox(height: 16), + ], + ), + ), + ], + ), + ), + ); + } +} diff --git a/examples/demo/lib/screens/secondary_screen.dart b/examples/demo/lib/screens/secondary_screen.dart new file mode 100644 index 00000000..9701cec9 --- /dev/null +++ b/examples/demo/lib/screens/secondary_screen.dart @@ -0,0 +1,21 @@ +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 Activity'), + centerTitle: true, + ), + body: Center( + child: Text( + 'Secondary Activity', + style: Theme.of(context).textTheme.headlineMedium, + ), + ), + ); + } +} diff --git a/examples/demo/lib/services/log_manager.dart b/examples/demo/lib/services/log_manager.dart new file mode 100644 index 00000000..3e66c7c8 --- /dev/null +++ b/examples/demo/lib/services/log_manager.dart @@ -0,0 +1,69 @@ +import 'package:flutter/foundation.dart'; + +enum LogLevel { debug, info, warn, error } + +class LogEntry { + final DateTime timestamp; + final LogLevel level; + final String tag; + final String message; + + const LogEntry({ + required this.timestamp, + required this.level, + required this.tag, + required this.message, + }); + + String get levelLabel { + switch (level) { + case LogLevel.debug: + return 'D'; + case LogLevel.info: + return 'I'; + case LogLevel.warn: + return 'W'; + case LogLevel.error: + return 'E'; + } + } + + String get formattedTime { + final h = timestamp.hour.toString().padLeft(2, '0'); + final m = timestamp.minute.toString().padLeft(2, '0'); + final s = timestamp.second.toString().padLeft(2, '0'); + return '$h:$m:$s'; + } +} + +class LogManager extends ChangeNotifier { + static final LogManager _instance = LogManager._internal(); + factory LogManager() => _instance; + LogManager._internal(); + + final List _logs = []; + + List get logs => List.unmodifiable(_logs); + + void _log(LogLevel level, String tag, String message) { + final entry = LogEntry( + timestamp: DateTime.now(), + level: level, + tag: tag, + message: message, + ); + _logs.add(entry); + debugPrint('[${entry.levelLabel}] $tag: $message'); + notifyListeners(); + } + + void d(String tag, String message) => _log(LogLevel.debug, tag, message); + void i(String tag, String message) => _log(LogLevel.info, tag, message); + void w(String tag, String message) => _log(LogLevel.warn, tag, message); + void e(String tag, String message) => _log(LogLevel.error, tag, message); + + void clear() { + _logs.clear(); + notifyListeners(); + } +} diff --git a/examples/demo/lib/services/onesignal_api_service.dart b/examples/demo/lib/services/onesignal_api_service.dart new file mode 100644 index 00000000..051cdb55 --- /dev/null +++ b/examples/demo/lib/services/onesignal_api_service.dart @@ -0,0 +1,106 @@ +import 'dart:convert'; + +import 'package:http/http.dart' as http; + +import '../models/notification_type.dart'; +import '../models/user_data.dart'; +import '../services/log_manager.dart'; + +class OneSignalApiService { + String _appId = ''; + + void setAppId(String appId) => _appId = appId; + String get appId => _appId; + + Future sendNotification( + NotificationType type, + String subscriptionId, + ) async { + try { + final body = { + 'app_id': _appId, + 'include_subscription_ids': [subscriptionId], + '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; + } + + 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(body), + ); + + LogManager().i( + 'API', + 'Send notification response: ${response.statusCode}', + ); + return response.statusCode == 200; + } catch (e) { + LogManager().e('API', 'Send notification error: $e'); + return false; + } + } + + Future sendCustomNotification( + String title, + String body, + String subscriptionId, + ) async { + try { + final payload = { + 'app_id': _appId, + 'include_subscription_ids': [subscriptionId], + 'headings': {'en': title}, + 'contents': {'en': body}, + }; + + 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), + ); + + LogManager().i( + 'API', + 'Send custom notification response: ${response.statusCode}', + ); + return response.statusCode == 200; + } catch (e) { + LogManager().e('API', 'Send custom notification 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); + } + LogManager().w('API', 'Fetch user returned ${response.statusCode}'); + return null; + } catch (e) { + LogManager().e('API', 'Fetch user error: $e'); + return null; + } + } +} diff --git a/examples/demo/lib/services/preferences_service.dart b/examples/demo/lib/services/preferences_service.dart new file mode 100644 index 00000000..9d4a282b --- /dev/null +++ b/examples/demo/lib/services/preferences_service.dart @@ -0,0 +1,47 @@ +import 'package:shared_preferences/shared_preferences.dart'; + +class PreferencesService { + static const _keyAppId = 'app_id'; + 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'; + + late final SharedPreferences _prefs; + + Future init() async { + _prefs = await SharedPreferences.getInstance(); + } + + // App ID + String? get appId => _prefs.getString(_keyAppId); + Future setAppId(String value) => _prefs.setString(_keyAppId, value); + + // 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); +} diff --git a/examples/demo/lib/services/tooltip_helper.dart b/examples/demo/lib/services/tooltip_helper.dart new file mode 100644 index 00000000..ab05a96f --- /dev/null +++ b/examples/demo/lib/services/tooltip_helper.dart @@ -0,0 +1,75 @@ +import 'dart:convert'; + +import 'package:http/http.dart' as http; + +import 'log_manager.dart'; + +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, + ), + ); + }); + LogManager().i('Tooltip', 'Loaded ${_tooltips.length} tooltips'); + } + } catch (e) { + LogManager().w('Tooltip', 'Failed to load tooltips: $e'); + } + + _initialized = true; + } + + TooltipData? getTooltip(String key) => _tooltips[key]; +} diff --git a/examples/demo/lib/theme.dart b/examples/demo/lib/theme.dart new file mode 100644 index 00000000..b852c8a5 --- /dev/null +++ b/examples/demo/lib/theme.dart @@ -0,0 +1,65 @@ +import 'package:flutter/material.dart'; + +class AppColors { + static const oneSignalRed = Color(0xFFE54B4D); + static const oneSignalGreen = Color(0xFF34A853); + static const oneSignalGreenLight = Color(0xFFE6F4EA); + static const lightBackground = Color(0xFFF8F9FA); + static const cardBackground = Colors.white; + static const dividerColor = Color(0xFFE8EAED); + static const warningBackground = Color(0xFFFFF8E1); + + AppColors._(); +} + +class AppTheme { + static ThemeData get light { + return ThemeData( + useMaterial3: true, + colorScheme: ColorScheme.fromSeed( + seedColor: AppColors.oneSignalRed, + ).copyWith(primary: AppColors.oneSignalRed), + scaffoldBackgroundColor: AppColors.lightBackground, + appBarTheme: const AppBarTheme( + backgroundColor: AppColors.oneSignalRed, + foregroundColor: Colors.white, + elevation: 0, + ), + cardTheme: CardThemeData( + color: AppColors.cardBackground, + elevation: 1, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12), + ), + 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), + ), + ), + outlinedButtonTheme: OutlinedButtonThemeData( + style: OutlinedButton.styleFrom( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + ), + minimumSize: const Size(double.infinity, 48), + ), + ), + inputDecorationTheme: InputDecorationTheme( + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(8), + ), + contentPadding: const EdgeInsets.symmetric( + horizontal: 12, + vertical: 14, + ), + ), + ); + } + + AppTheme._(); +} diff --git a/examples/demo/lib/viewmodels/app_viewmodel.dart b/examples/demo/lib/viewmodels/app_viewmodel.dart new file mode 100644 index 00000000..bce0ddd6 --- /dev/null +++ b/examples/demo/lib/viewmodels/app_viewmodel.dart @@ -0,0 +1,438 @@ +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 '../repositories/onesignal_repository.dart'; +import '../services/log_manager.dart'; +import '../services/preferences_service.dart'; + +class AppViewModel extends ChangeNotifier { + final OneSignalRepository _repository; + final PreferencesService _prefs; + + AppViewModel(this._repository, this._prefs); + + // Loading state + bool _isLoading = false; + bool get isLoading => _isLoading; + + // SnackBar message + String? _snackBarMessage; + String? get snackBarMessage => _snackBarMessage; + void clearSnackBar() { + _snackBarMessage = null; + } + + void _showSnackBar(String message) { + _snackBarMessage = message; + LogManager().i('App', message); + notifyListeners(); + } + + // 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; + + // Push state + String? _pushSubscriptionId; + String? get pushSubscriptionId => _pushSubscriptionId; + + bool _pushEnabled = false; + bool get pushEnabled => _pushEnabled; + + bool _hasNotificationPermission = false; + bool get hasNotificationPermission => _hasNotificationPermission; + + // IAM state + bool _iamPaused = false; + bool get iamPaused => _iamPaused; + + // Location state + bool _locationShared = false; + bool get locationShared => _locationShared; + + // 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; + + try { + _iamPaused = await _repository.isInAppMessagesPaused(); + _locationShared = await _repository.isLocationShared(); + _externalUserId = await _repository.getExternalId(); + } catch (e) { + LogManager().e('App', 'Error loading initial state: $e'); + } + + _pushSubscriptionId = _repository.getPushSubscriptionId(); + _pushEnabled = _repository.isPushOptedIn() ?? false; + _hasNotificationPermission = _repository.hasPermission(); + + notifyListeners(); + + // Fetch user data if we have a OneSignal ID + try { + final onesignalId = await _repository.getOnesignalId(); + if (onesignalId != null) { + _isLoading = true; + notifyListeners(); + await fetchUserDataFromApi(); + await Future.delayed(const Duration(milliseconds: 100)); + _isLoading = false; + notifyListeners(); + } + } catch (e) { + _isLoading = false; + notifyListeners(); + LogManager().e('App', 'Error fetching initial user data: $e'); + } + } + + // Observers + void setupObservers() { + OneSignal.User.pushSubscription.addObserver((state) { + _pushSubscriptionId = state.current.id; + _pushEnabled = state.current.optedIn; + LogManager().i('Observer', 'Push subscription changed: id=${state.current.id}, optedIn=${state.current.optedIn}'); + notifyListeners(); + }); + + OneSignal.Notifications.addPermissionObserver((permission) { + _hasNotificationPermission = permission; + LogManager().i('Observer', 'Permission changed: $permission'); + notifyListeners(); + }); + + OneSignal.User.addObserver((state) { + LogManager().i('Observer', 'User state changed'); + fetchUserDataFromApi(); + }); + } + + // Fetch user data from API + Future fetchUserDataFromApi() async { + try { + final onesignalId = await _repository.getOnesignalId(); + if (onesignalId == null) return; + + final userData = await _repository.fetchUser(onesignalId); + if (userData != null) { + _aliasesList = userData.aliases.entries.toList(); + _tagsList = userData.tags.entries.toList(); + _emailsList = List.from(userData.emails); + _smsNumbersList = List.from(userData.smsNumbers); + + if (userData.externalId != null) { + _externalUserId = userData.externalId; + await _prefs.setExternalUserId(userData.externalId); + } + + notifyListeners(); + } + } catch (e) { + LogManager().e('App', 'Error fetching user data: $e'); + } + } + + // Login / Logout + Future loginUser(String externalUserId) async { + _isLoading = true; + notifyListeners(); + + try { + _aliasesList = []; + _emailsList = []; + _smsNumbersList = []; + _tagsList = []; + _triggersList = []; + + await _repository.loginUser(externalUserId); + _externalUserId = externalUserId; + await _prefs.setExternalUserId(externalUserId); + + _isLoading = false; + notifyListeners(); + _showSnackBar('Logged in as: $externalUserId'); + } catch (e) { + _isLoading = false; + notifyListeners(); + LogManager().e('App', 'Login error: $e'); + _showSnackBar('Login failed'); + } + } + + Future logoutUser() async { + _isLoading = true; + notifyListeners(); + + try { + await _repository.logoutUser(); + _externalUserId = null; + _aliasesList = []; + _emailsList = []; + _smsNumbersList = []; + _tagsList = []; + _triggersList = []; + await _prefs.setExternalUserId(null); + + _isLoading = false; + notifyListeners(); + _showSnackBar('Logged out'); + } catch (e) { + _isLoading = false; + notifyListeners(); + LogManager().e('App', 'Logout error: $e'); + } + } + + // Consent + Future setConsentRequired(bool value) async { + _consentRequired = value; + _repository.setConsentRequired(value); + await _prefs.setConsentRequired(value); + if (!value) { + _privacyConsentGiven = false; + await _prefs.setPrivacyConsent(false); + } + notifyListeners(); + } + + Future setPrivacyConsent(bool value) async { + _privacyConsentGiven = value; + _repository.setConsentGiven(value); + await _prefs.setPrivacyConsent(value); + notifyListeners(); + } + + // Push + void togglePush(bool enabled) { + if (enabled) { + _repository.optInPush(); + } else { + _repository.optOutPush(); + } + _pushEnabled = enabled; + notifyListeners(); + _showSnackBar('Push ${enabled ? "enabled" : "disabled"}'); + } + + Future promptPush() async { + final granted = await _repository.requestPermission(true); + _hasNotificationPermission = granted; + notifyListeners(); + } + + // Notifications + Future sendNotification(NotificationType type) async { + final success = await _repository.sendNotification(type); + _showSnackBar(success ? 'Notification sent: ${type.name}' : 'Failed to send notification'); + } + + Future sendCustomNotification(String title, String body) async { + final success = await _repository.sendCustomNotification(title, body); + _showSnackBar(success ? 'Custom notification sent' : 'Failed to send notification'); + } + + // IAM + Future setIamPaused(bool paused) async { + _iamPaused = paused; + _repository.setInAppMessagesPaused(paused); + await _prefs.setIamPaused(paused); + notifyListeners(); + } + + void sendInAppMessage(InAppMessageType type) { + _repository.addTrigger('iam_type', type.triggerValue); + _showSnackBar('Sent In-App Message: ${type.label}'); + } + + // Aliases + void addAlias(String label, String id) { + _repository.addAlias(label, id); + _aliasesList = List.from(_aliasesList)..add(MapEntry(label, id)); + notifyListeners(); + _showSnackBar('Alias added: $label'); + } + + void addAliases(Map aliases) { + _repository.addAliases(aliases); + _aliasesList = List.from(_aliasesList) + ..addAll(aliases.entries); + notifyListeners(); + _showSnackBar('${aliases.length} alias(es) added'); + } + + // Emails + void addEmail(String email) { + _repository.addEmail(email); + _emailsList = List.from(_emailsList)..add(email); + notifyListeners(); + _showSnackBar('Email added: $email'); + } + + void removeEmail(String email) { + _repository.removeEmail(email); + _emailsList = List.from(_emailsList)..remove(email); + notifyListeners(); + _showSnackBar('Email removed: $email'); + } + + // SMS + void addSms(String smsNumber) { + _repository.addSms(smsNumber); + _smsNumbersList = List.from(_smsNumbersList)..add(smsNumber); + notifyListeners(); + _showSnackBar('SMS added: $smsNumber'); + } + + void removeSms(String smsNumber) { + _repository.removeSms(smsNumber); + _smsNumbersList = List.from(_smsNumbersList)..remove(smsNumber); + notifyListeners(); + _showSnackBar('SMS removed: $smsNumber'); + } + + // Tags + void addTag(String key, String value) { + _repository.addTag(key, value); + _tagsList = List.from(_tagsList)..add(MapEntry(key, value)); + notifyListeners(); + _showSnackBar('Tag added: $key'); + } + + void addTags(Map tags) { + _repository.addTags(tags); + _tagsList = List.from(_tagsList)..addAll(tags.entries); + notifyListeners(); + _showSnackBar('${tags.length} tag(s) added'); + } + + void removeTag(String key) { + _repository.removeTag(key); + _tagsList = List.from(_tagsList) + ..removeWhere((e) => e.key == key); + notifyListeners(); + _showSnackBar('Tag removed: $key'); + } + + void removeSelectedTags(List keys) { + _repository.removeTags(keys); + _tagsList = List.from(_tagsList) + ..removeWhere((e) => keys.contains(e.key)); + notifyListeners(); + _showSnackBar('${keys.length} tag(s) removed'); + } + + // Triggers (in-memory only) + void addTrigger(String key, String value) { + _repository.addTrigger(key, value); + _triggersList = List.from(_triggersList)..add(MapEntry(key, value)); + notifyListeners(); + _showSnackBar('Trigger added: $key'); + } + + void addTriggers(Map triggers) { + _repository.addTriggers(triggers); + _triggersList = List.from(_triggersList)..addAll(triggers.entries); + notifyListeners(); + _showSnackBar('${triggers.length} trigger(s) added'); + } + + void removeTrigger(String key) { + _repository.removeTrigger(key); + _triggersList = List.from(_triggersList) + ..removeWhere((e) => e.key == key); + notifyListeners(); + _showSnackBar('Trigger removed: $key'); + } + + void removeSelectedTriggers(List keys) { + _repository.removeTriggers(keys); + _triggersList = List.from(_triggersList) + ..removeWhere((e) => keys.contains(e.key)); + notifyListeners(); + _showSnackBar('${keys.length} trigger(s) removed'); + } + + void clearAllTriggers() { + _repository.clearTriggers(); + _triggersList = []; + notifyListeners(); + _showSnackBar('All triggers cleared'); + } + + // Outcomes + void sendOutcome(String name) { + _repository.sendOutcome(name); + _showSnackBar('Outcome sent: $name'); + } + + void sendUniqueOutcome(String name) { + _repository.sendUniqueOutcome(name); + _showSnackBar('Unique outcome sent: $name'); + } + + void sendOutcomeWithValue(String name, double value) { + _repository.sendOutcomeWithValue(name, value); + _showSnackBar('Outcome sent: $name = $value'); + } + + // Track Event + void trackEvent(String name, Map? properties) { + _repository.trackEvent(name, properties); + _showSnackBar('Event tracked: $name'); + } + + // Location + Future setLocationShared(bool shared) async { + _locationShared = shared; + _repository.setLocationShared(shared); + await _prefs.setLocationShared(shared); + notifyListeners(); + _showSnackBar('Location sharing ${shared ? "enabled" : "disabled"}'); + } + + void promptLocation() { + _repository.requestLocationPermission(); + } + + // Dismiss loading (called from user state change observer) + void dismissLoading() { + if (_isLoading) { + _isLoading = false; + notifyListeners(); + } + } +} diff --git a/examples/demo/lib/widgets/action_button.dart b/examples/demo/lib/widgets/action_button.dart new file mode 100644 index 00000000..45cf3373 --- /dev/null +++ b/examples/demo/lib/widgets/action_button.dart @@ -0,0 +1,66 @@ +import 'package:flutter/material.dart'; + +import '../theme.dart'; + +class PrimaryButton extends StatelessWidget { + final String label; + final VoidCallback? onPressed; + final IconData? icon; + + const PrimaryButton({ + super.key, + required this.label, + this.onPressed, + this.icon, + }); + + @override + Widget build(BuildContext context) { + return SizedBox( + width: double.infinity, + child: ElevatedButton( + onPressed: onPressed, + style: ElevatedButton.styleFrom( + backgroundColor: AppColors.oneSignalRed, + foregroundColor: Colors.white, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + if (icon != null) ...[ + Icon(icon, size: 18), + const SizedBox(width: 8), + ], + Text(label), + ], + ), + ), + ); + } +} + +class DestructiveButton extends StatelessWidget { + final String label; + final VoidCallback? onPressed; + + const DestructiveButton({ + super.key, + required this.label, + this.onPressed, + }); + + @override + Widget build(BuildContext context) { + return SizedBox( + width: double.infinity, + child: OutlinedButton( + onPressed: onPressed, + style: OutlinedButton.styleFrom( + foregroundColor: AppColors.oneSignalRed, + side: const BorderSide(color: AppColors.oneSignalRed), + ), + child: Text(label), + ), + ); + } +} diff --git a/examples/demo/lib/widgets/dialogs.dart b/examples/demo/lib/widgets/dialogs.dart new file mode 100644 index 00000000..b309b4aa --- /dev/null +++ b/examples/demo/lib/widgets/dialogs.dart @@ -0,0 +1,727 @@ +import 'dart:convert'; + +import 'package:flutter/material.dart'; + +import '../services/tooltip_helper.dart'; + +// Single input dialog (login, email, sms) +class SingleInputDialog extends StatefulWidget { + final String title; + final String fieldLabel; + final String confirmLabel; + final TextInputType keyboardType; + + const SingleInputDialog({ + super.key, + required this.title, + required this.fieldLabel, + this.confirmLabel = 'Add', + this.keyboardType = TextInputType.text, + }); + + @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: const EdgeInsets.symmetric(horizontal: 16), + title: Text(widget.title), + content: SizedBox( + width: double.maxFinite, + child: Semantics( + label: '${widget.fieldLabel}_input', + child: TextField( + controller: _controller, + decoration: InputDecoration(labelText: widget.fieldLabel), + keyboardType: widget.keyboardType, + onChanged: (_) => setState(() {}), + ), + ), + ), + actions: [ + TextButton( + onPressed: () => Navigator.pop(context), + child: const Text('Cancel'), + ), + 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; + + const PairInputDialog({ + super.key, + required this.title, + this.keyLabel = 'Key', + this.valueLabel = 'Value', + }); + + @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: const EdgeInsets.symmetric(horizontal: 16), + title: Text(widget.title), + content: SizedBox( + width: double.maxFinite, + child: Row( + children: [ + Expanded( + child: Semantics( + label: '${widget.keyLabel}_input', + child: TextField( + controller: _keyController, + decoration: InputDecoration(labelText: widget.keyLabel), + onChanged: (_) => setState(() {}), + ), + ), + ), + const SizedBox(width: 12), + Expanded( + child: Semantics( + label: '${widget.valueLabel}_input', + child: TextField( + controller: _valueController, + decoration: InputDecoration(labelText: widget.valueLabel), + onChanged: (_) => setState(() {}), + ), + ), + ), + ], + ), + ), + actions: [ + TextButton( + onPressed: () => Navigator.pop(context), + child: const Text('Cancel'), + ), + 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: const EdgeInsets.symmetric(horizontal: 16), + 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: TextField( + controller: _keyControllers[i], + decoration: InputDecoration( + labelText: widget.keyLabel, + isDense: true, + ), + ), + ), + const SizedBox(width: 8), + Expanded( + child: TextField( + 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), + ), + ], + ), + ], + 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'), + ), + 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: const EdgeInsets.symmetric(horizontal: 16), + title: Text(widget.title), + content: SizedBox( + width: double.maxFinite, + child: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + children: widget.items.map((item) { + return 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'), + ), + TextButton( + onPressed: _selected.isEmpty + ? null + : () => Navigator.pop(context, _selected.toList()), + child: Text('Remove (${_selected.length})'), + ), + ], + ); + } +} + +// Login dialog +class LoginDialog extends StatefulWidget { + const LoginDialog({super.key}); + + @override + State createState() => _LoginDialogState(); +} + +class _LoginDialogState extends State { + final _controller = TextEditingController(); + + @override + void dispose() { + _controller.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return AlertDialog( + insetPadding: const EdgeInsets.symmetric(horizontal: 16), + title: const Text('Login User'), + content: SizedBox( + width: double.maxFinite, + child: Semantics( + label: 'external_user_id_input', + child: TextField( + controller: _controller, + decoration: const InputDecoration(labelText: 'External User Id'), + onChanged: (_) => setState(() {}), + ), + ), + ), + actions: [ + TextButton( + onPressed: () => Navigator.pop(context), + child: const Text('Cancel'), + ), + TextButton( + onPressed: _controller.text.isEmpty + ? null + : () => Navigator.pop(context, _controller.text), + child: const Text('Login'), + ), + ], + ); + } +} + +// 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: const EdgeInsets.symmetric(horizontal: 16), + 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: [ + RadioListTile( + title: const Text('Normal Outcome'), + value: OutcomeType.normal, + contentPadding: EdgeInsets.zero, + ), + RadioListTile( + title: const Text('Unique Outcome'), + value: OutcomeType.unique, + contentPadding: EdgeInsets.zero, + ), + RadioListTile( + title: const Text('Outcome with Value'), + value: OutcomeType.withValue, + contentPadding: EdgeInsets.zero, + ), + ], + ), + ), + const SizedBox(height: 8), + TextField( + controller: _nameController, + decoration: const InputDecoration(labelText: 'Outcome Name'), + onChanged: (_) => setState(() {}), + ), + if (_type == OutcomeType.withValue) ...[ + const SizedBox(height: 12), + TextField( + 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'), + ), + 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: const EdgeInsets.symmetric(horizontal: 16), + title: const Text('Track Event'), + content: SizedBox( + width: double.maxFinite, + child: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + TextField( + controller: _nameController, + decoration: const InputDecoration(labelText: 'Event Name'), + onChanged: (_) => setState(() {}), + ), + const SizedBox(height: 12), + TextField( + 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'), + ), + 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: const EdgeInsets.symmetric(horizontal: 16), + title: const Text('Custom Notification'), + content: SizedBox( + width: double.maxFinite, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + TextField( + controller: _titleController, + decoration: const InputDecoration(labelText: 'Title'), + onChanged: (_) => setState(() {}), + ), + const SizedBox(height: 12), + TextField( + 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: const EdgeInsets.symmetric(horizontal: 16), + title: Text(tooltip.title), + content: SizedBox( + width: double.maxFinite, + child: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + 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: const TextStyle(fontWeight: FontWeight.bold), + ), + Text( + option.description, + style: TextStyle(color: Colors.grey[600]), + ), + ], + ), + )), + ], + ], + ), + ), + ), + actions: [ + TextButton( + onPressed: () => Navigator.pop(context), + child: const Text('OK'), + ), + ], + ); + } +} diff --git a/examples/demo/lib/widgets/list_widgets.dart b/examples/demo/lib/widgets/list_widgets.dart new file mode 100644 index 00000000..5b3d3f9d --- /dev/null +++ b/examples/demo/lib/widgets/list_widgets.dart @@ -0,0 +1,190 @@ +import 'package:flutter/material.dart'; + +class PairItem extends StatelessWidget { + final String keyText; + final String valueText; + final VoidCallback? onDelete; + + const PairItem({ + super.key, + 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: [ + Text( + keyText, + style: const TextStyle( + fontWeight: FontWeight.w500, + fontSize: 14, + ), + ), + Text( + valueText, + style: TextStyle( + fontSize: 13, + color: Colors.grey[600], + ), + ), + ], + ), + ), + if (onDelete != null) + GestureDetector( + onTap: onDelete, + child: Icon(Icons.close, size: 18, color: Colors.grey[500]), + ), + ], + ), + ); + } +} + +class SingleItem extends StatelessWidget { + final String text; + final VoidCallback? onDelete; + + const SingleItem({ + super.key, + 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: Text(text, style: const TextStyle(fontSize: 14))), + if (onDelete != null) + GestureDetector( + onTap: onDelete, + child: Icon(Icons.close, size: 18, color: Colors.grey[500]), + ), + ], + ), + ); + } +} + +class EmptyState extends StatelessWidget { + final String text; + + const EmptyState({super.key, required this.text}); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 12), + child: Center( + child: Text( + text, + style: TextStyle(color: Colors.grey[400], fontSize: 14), + ), + ), + ); + } +} + +class PairList extends StatelessWidget { + final List> items; + final String emptyText; + final void Function(String key)? onDelete; + + const PairList({ + super.key, + required this.items, + required this.emptyText, + this.onDelete, + }); + + @override + Widget build(BuildContext context) { + if (items.isEmpty) return EmptyState(text: emptyText); + + return Column( + children: [ + for (var i = 0; i < items.length; i++) ...[ + PairItem( + key: ValueKey('${items[i].key}_${items[i].value}'), + 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 List items; + final String emptyText; + final void Function(String item) onDelete; + final int maxVisible; + + const CollapsibleList({ + super.key, + required this.items, + required this.emptyText, + required this.onDelete, + this.maxVisible = 5, + }); + + @override + State createState() => _CollapsibleListState(); +} + +class _CollapsibleListState extends State { + bool _expanded = false; + + @override + Widget build(BuildContext context) { + if (widget.items.isEmpty) return EmptyState(text: widget.emptyText); + + 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]), + 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/lib/widgets/loading_overlay.dart b/examples/demo/lib/widgets/loading_overlay.dart new file mode 100644 index 00000000..14bcf968 --- /dev/null +++ b/examples/demo/lib/widgets/loading_overlay.dart @@ -0,0 +1,28 @@ +import 'package:flutter/material.dart'; + +class LoadingOverlay extends StatelessWidget { + final bool isLoading; + final Widget child; + + const LoadingOverlay({ + super.key, + required this.isLoading, + required this.child, + }); + + @override + Widget build(BuildContext context) { + return Stack( + children: [ + child, + if (isLoading) + Container( + color: Colors.black26, + child: const Center( + child: CircularProgressIndicator(), + ), + ), + ], + ); + } +} diff --git a/examples/demo/lib/widgets/log_view.dart b/examples/demo/lib/widgets/log_view.dart new file mode 100644 index 00000000..24f056bc --- /dev/null +++ b/examples/demo/lib/widgets/log_view.dart @@ -0,0 +1,203 @@ +import 'package:flutter/material.dart'; + +import '../services/log_manager.dart'; + +class LogView extends StatefulWidget { + const LogView({super.key}); + + @override + State createState() => _LogViewState(); +} + +class _LogViewState extends State { + bool _expanded = true; + final ScrollController _scrollController = ScrollController(); + + @override + void initState() { + super.initState(); + LogManager().addListener(_onLogChanged); + } + + @override + void dispose() { + LogManager().removeListener(_onLogChanged); + _scrollController.dispose(); + super.dispose(); + } + + void _onLogChanged() { + setState(() {}); + WidgetsBinding.instance.addPostFrameCallback((_) { + if (_scrollController.hasClients) { + _scrollController.animateTo( + _scrollController.position.maxScrollExtent, + duration: const Duration(milliseconds: 100), + curve: Curves.easeOut, + ); + } + }); + } + + Color _levelColor(LogLevel level) { + switch (level) { + case LogLevel.debug: + return Colors.blue; + case LogLevel.info: + return Colors.green; + case LogLevel.warn: + return Colors.amber; + case LogLevel.error: + return Colors.red; + } + } + + @override + Widget build(BuildContext context) { + final logs = LogManager().logs; + + const logBackground = Color(0xFF1A1B1E); + + return Semantics( + label: 'log_view_container', + child: Card( + margin: EdgeInsets.zero, + color: logBackground, + shape: const RoundedRectangleBorder(), + child: Column( + children: [ + Semantics( + label: 'log_view_header', + child: InkWell( + onTap: () => setState(() => _expanded = !_expanded), + borderRadius: BorderRadius.zero, + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 16, + vertical: 12, + ), + child: Row( + children: [ + const Text( + 'LOGS', + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.white, + ), + ), + const SizedBox(width: 8), + Semantics( + label: 'log_view_count', + child: Text( + '(${logs.length})', + style: TextStyle(color: Colors.grey[400]), + ), + ), + const Spacer(), + if (logs.isNotEmpty) + Semantics( + label: 'log_view_clear_button', + child: GestureDetector( + onTap: () => LogManager().clear(), + child: Icon( + Icons.delete, + size: 18, + color: Colors.grey[400], + ), + ), + ), + const SizedBox(width: 8), + Icon( + _expanded + ? Icons.expand_less + : Icons.expand_more, + size: 20, + color: Colors.grey[400], + ), + ], + ), + ), + ), + ), + if (_expanded) + Semantics( + label: 'log_view_list', + child: SizedBox( + height: 100, + child: logs.isEmpty + ? Semantics( + label: 'log_view_empty', + child: Center( + child: Text( + 'No logs yet', + style: TextStyle(color: Colors.grey[500]), + ), + ), + ) + : ListView.builder( + controller: _scrollController, + itemCount: logs.length, + padding: const EdgeInsets.symmetric(horizontal: 12), + itemBuilder: (context, index) { + final entry = logs[index]; + return Semantics( + label: 'log_entry_$index', + child: Padding( + padding: const EdgeInsets.symmetric( + vertical: 1, + ), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Semantics( + label: 'log_entry_${index}_timestamp', + child: Text( + entry.formattedTime, + style: TextStyle( + fontSize: 11, + color: Colors.grey[500], + fontFamily: 'monospace', + ), + ), + ), + const SizedBox(width: 4), + Semantics( + label: 'log_entry_${index}_level', + child: Text( + entry.levelLabel, + style: TextStyle( + fontSize: 11, + fontWeight: FontWeight.bold, + color: _levelColor(entry.level), + fontFamily: 'monospace', + ), + ), + ), + const SizedBox(width: 4), + Expanded( + child: Semantics( + label: 'log_entry_${index}_message', + child: Text( + '${entry.tag}: ${entry.message}', + style: const TextStyle( + fontSize: 11, + fontFamily: 'monospace', + color: Colors.white70, + ), + ), + ), + ), + ], + ), + ), + ); + }, + ), + ), + ), + ], + ), + ), + ); + } +} diff --git a/examples/demo/lib/widgets/section_card.dart b/examples/demo/lib/widgets/section_card.dart new file mode 100644 index 00000000..df86cd44 --- /dev/null +++ b/examples/demo/lib/widgets/section_card.dart @@ -0,0 +1,55 @@ +import 'package:flutter/material.dart'; + +class SectionCard extends StatelessWidget { + final String title; + final VoidCallback? onInfoTap; + final Widget child; + + const SectionCard({ + super.key, + required this.title, + this.onInfoTap, + required this.child, + }); + + @override + Widget build(BuildContext context) { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 6), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // Section header (outside card, ALL CAPS like reference) + Padding( + padding: const EdgeInsets.only(bottom: 6), + child: Row( + children: [ + Expanded( + child: Text( + title.toUpperCase(), + style: Theme.of(context).textTheme.bodySmall?.copyWith( + fontWeight: FontWeight.bold, + color: Colors.grey[700], + letterSpacing: 0.5, + ), + ), + ), + if (onInfoTap != null) + GestureDetector( + onTap: onInfoTap, + child: Icon( + Icons.info_outline, + size: 18, + color: Colors.grey[500], + ), + ), + ], + ), + ), + // Card content + child, + ], + ), + ); + } +} diff --git a/examples/demo/lib/widgets/sections/aliases_section.dart b/examples/demo/lib/widgets/sections/aliases_section.dart new file mode 100644 index 00000000..b05a720f --- /dev/null +++ b/examples/demo/lib/widgets/sections/aliases_section.dart @@ -0,0 +1,72 @@ +import 'package:flutter/material.dart'; +import 'package:provider/provider.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', + onInfoTap: onInfoTap, + child: Column( + children: [ + Card( + margin: EdgeInsets.zero, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), + child: PairList( + items: vm.aliasesList, + emptyText: 'No aliases added', + ), + ), + ), + const SizedBox(height: 8), + PrimaryButton( + label: 'ADD', + onPressed: () async { + final result = await showDialog>( + context: context, + builder: (_) => const PairInputDialog( + title: 'Add Alias', + keyLabel: 'Label', + valueLabel: 'ID', + ), + ); + if (result != null) { + vm.addAlias(result.key, result.value); + } + }, + ), + const SizedBox(height: 8), + PrimaryButton( + label: 'ADD MULTIPLE', + 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/lib/widgets/sections/app_section.dart b/examples/demo/lib/widgets/sections/app_section.dart new file mode 100644 index 00000000..9add8c26 --- /dev/null +++ b/examples/demo/lib/widgets/sections/app_section.dart @@ -0,0 +1,199 @@ +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 '../dialogs.dart'; +import '../action_button.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', + onInfoTap: onInfoTap, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // App ID card (single row like reference) + Card( + margin: EdgeInsets.zero, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14), + child: Row( + children: [ + const Text('App ID', style: TextStyle(fontSize: 14)), + const SizedBox(width: 12), + Expanded( + child: SelectableText( + vm.appId, + style: const TextStyle( + fontFamily: 'monospace', + fontSize: 12, + ), + textAlign: TextAlign.end, + ), + ), + ], + ), + ), + ), + const SizedBox(height: 8), + + // Guidance banner + Container( + width: double.infinity, + padding: const EdgeInsets.all(12), + decoration: BoxDecoration( + color: AppColors.warningBackground, + borderRadius: BorderRadius.circular(8), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text( + 'Add your own App ID, then rebuild to fully test all functionality.', + style: TextStyle(fontSize: 13), + ), + const SizedBox(height: 4), + GestureDetector( + onTap: () => launchUrl( + Uri.parse('https://onesignal.com'), + mode: LaunchMode.externalApplication, + ), + child: Text( + 'Get your keys at onesignal.com', + style: TextStyle( + fontSize: 13, + color: Theme.of(context).colorScheme.primary, + decoration: TextDecoration.underline, + ), + ), + ), + ], + ), + ), + const SizedBox(height: 8), + + // Consent card + Card( + margin: EdgeInsets.zero, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), + 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, + ), + ], + ], + ), + ), + ), + const SizedBox(height: 16), + + // USER section header + Padding( + padding: const EdgeInsets.only(bottom: 6), + child: Text( + 'USER', + style: Theme.of(context).textTheme.bodySmall?.copyWith( + fontWeight: FontWeight.bold, + color: Colors.grey[700], + letterSpacing: 0.5, + ), + ), + ), + + // User status card + Card( + margin: EdgeInsets.zero, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text('Status', style: TextStyle(fontSize: 14)), + Text( + vm.isLoggedIn ? 'Logged In' : 'Anonymous', + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w500, + color: vm.isLoggedIn + ? AppColors.oneSignalGreen + : Colors.grey[600], + ), + ), + ], + ), + const Divider(), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text( + 'External ID', + style: TextStyle(fontSize: 14), + ), + SelectableText( + vm.isLoggedIn + ? (vm.externalUserId ?? '') + : '–', + style: const TextStyle(fontSize: 14), + ), + ], + ), + ], + ), + ), + ), + const SizedBox(height: 8), + + // Login / Switch User button + PrimaryButton( + label: vm.isLoggedIn ? 'SWITCH USER' : 'LOGIN USER', + onPressed: () async { + final result = await showDialog( + context: context, + builder: (_) => const LoginDialog(), + ); + if (result != null && context.mounted) { + vm.loginUser(result); + } + }, + ), + if (vm.isLoggedIn) ...[ + const SizedBox(height: 8), + + // Logout button + DestructiveButton( + label: 'LOGOUT USER', + onPressed: vm.logoutUser, + ), + ], + ], + ), + ); + } +} diff --git a/examples/demo/lib/widgets/sections/emails_section.dart b/examples/demo/lib/widgets/sections/emails_section.dart new file mode 100644 index 00000000..76170e61 --- /dev/null +++ b/examples/demo/lib/widgets/sections/emails_section.dart @@ -0,0 +1,56 @@ +import 'package:flutter/material.dart'; +import 'package:provider/provider.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', + onInfoTap: onInfoTap, + child: Column( + children: [ + Card( + margin: EdgeInsets.zero, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), + child: CollapsibleList( + items: vm.emailsList, + emptyText: 'No emails added', + onDelete: vm.removeEmail, + ), + ), + ), + const SizedBox(height: 8), + PrimaryButton( + label: 'ADD EMAIL', + onPressed: () async { + final result = await showDialog( + context: context, + builder: (_) => const SingleInputDialog( + title: 'Add Email', + fieldLabel: 'Email', + keyboardType: TextInputType.emailAddress, + ), + ); + if (result != null) { + vm.addEmail(result); + } + }, + ), + ], + ), + ); + } +} diff --git a/examples/demo/lib/widgets/sections/in_app_section.dart b/examples/demo/lib/widgets/sections/in_app_section.dart new file mode 100644 index 00000000..3fb90dd5 --- /dev/null +++ b/examples/demo/lib/widgets/sections/in_app_section.dart @@ -0,0 +1,34 @@ +import 'package:flutter/material.dart'; +import 'package:provider/provider.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', + onInfoTap: onInfoTap, + child: Card( + margin: EdgeInsets.zero, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), + child: ToggleRow( + label: 'Pause In-App Messages', + description: 'Toggle in-app message display', + value: vm.iamPaused, + onChanged: vm.setIamPaused, + ), + ), + ), + ); + } +} diff --git a/examples/demo/lib/widgets/sections/location_section.dart b/examples/demo/lib/widgets/sections/location_section.dart new file mode 100644 index 00000000..7805bc4e --- /dev/null +++ b/examples/demo/lib/widgets/sections/location_section.dart @@ -0,0 +1,44 @@ +import 'package:flutter/material.dart'; +import 'package:provider/provider.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', + onInfoTap: onInfoTap, + child: Column( + children: [ + Card( + margin: EdgeInsets.zero, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), + child: ToggleRow( + label: 'Location Shared', + description: 'Share device location with OneSignal', + value: vm.locationShared, + onChanged: vm.setLocationShared, + ), + ), + ), + const SizedBox(height: 8), + PrimaryButton( + label: 'PROMPT LOCATION', + onPressed: vm.promptLocation, + ), + ], + ), + ); + } +} diff --git a/examples/demo/lib/widgets/sections/outcomes_section.dart b/examples/demo/lib/widgets/sections/outcomes_section.dart new file mode 100644 index 00000000..bfa08ac3 --- /dev/null +++ b/examples/demo/lib/widgets/sections/outcomes_section.dart @@ -0,0 +1,44 @@ +import 'package:flutter/material.dart'; +import 'package:provider/provider.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: 'Outcome Events', + onInfoTap: onInfoTap, + child: PrimaryButton( + label: 'SEND OUTCOME', + 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; + switch (type) { + case OutcomeType.normal: + vm.sendOutcome(name); + case OutcomeType.unique: + vm.sendUniqueOutcome(name); + case OutcomeType.withValue: + vm.sendOutcomeWithValue(name, result['value'] as double); + } + } + }, + ), + ); + } +} diff --git a/examples/demo/lib/widgets/sections/push_section.dart b/examples/demo/lib/widgets/sections/push_section.dart new file mode 100644 index 00000000..d2352584 --- /dev/null +++ b/examples/demo/lib/widgets/sections/push_section.dart @@ -0,0 +1,69 @@ +import 'package:flutter/material.dart'; +import 'package:provider/provider.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', + onInfoTap: onInfoTap, + child: Column( + children: [ + Card( + margin: EdgeInsets.zero, + child: Padding( + padding: const EdgeInsets.all(16), + child: Column( + children: [ + Row( + children: [ + const Text( + 'Push ID', + style: TextStyle(fontSize: 14), + ), + const SizedBox(width: 12), + Expanded( + child: SelectableText( + vm.pushSubscriptionId ?? 'N/A', + style: const TextStyle( + fontFamily: 'monospace', + fontSize: 12, + ), + textAlign: TextAlign.end, + ), + ), + ], + ), + const Divider(), + ToggleRow( + label: 'Enabled', + value: vm.pushEnabled, + onChanged: vm.togglePush, + ), + ], + ), + ), + ), + if (!vm.hasNotificationPermission) ...[ + const SizedBox(height: 8), + PrimaryButton( + label: 'PROMPT PUSH', + onPressed: vm.promptPush, + ), + ], + ], + ), + ); + } +} diff --git a/examples/demo/lib/widgets/sections/send_iam_section.dart b/examples/demo/lib/widgets/sections/send_iam_section.dart new file mode 100644 index 00000000..a89b7b1d --- /dev/null +++ b/examples/demo/lib/widgets/sections/send_iam_section.dart @@ -0,0 +1,51 @@ +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../../models/in_app_message_type.dart'; +import '../../viewmodels/app_viewmodel.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(); + + return SectionCard( + title: 'Send In-App Message', + onInfoTap: onInfoTap, + child: Column( + children: InAppMessageType.values.map((type) { + return Padding( + padding: const EdgeInsets.only(bottom: 8), + child: SizedBox( + width: double.infinity, + child: ElevatedButton( + onPressed: () => vm.sendInAppMessage(type), + style: ElevatedButton.styleFrom( + backgroundColor: const Color(0xFFE9444E), + foregroundColor: Colors.white, + minimumSize: const Size(double.infinity, 48), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + ), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Icon(type.icon, size: 18), + const SizedBox(width: 8), + Text(type.label.toUpperCase()), + ], + ), + ), + ), + ); + }).toList(), + ), + ); + } +} diff --git a/examples/demo/lib/widgets/sections/send_push_section.dart b/examples/demo/lib/widgets/sections/send_push_section.dart new file mode 100644 index 00000000..e5a8bc0e --- /dev/null +++ b/examples/demo/lib/widgets/sections/send_push_section.dart @@ -0,0 +1,50 @@ +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', + onInfoTap: onInfoTap, + child: Column( + children: [ + PrimaryButton( + label: 'SIMPLE', + onPressed: () => vm.sendNotification(NotificationType.simple), + ), + const SizedBox(height: 8), + PrimaryButton( + label: 'WITH IMAGE', + onPressed: () => vm.sendNotification(NotificationType.withImage), + ), + const SizedBox(height: 8), + PrimaryButton( + label: 'CUSTOM', + onPressed: () async { + final result = await showDialog>( + context: context, + builder: (_) => const CustomNotificationDialog(), + ); + if (result != null) { + vm.sendCustomNotification(result['title']!, result['body']!); + } + }, + ), + ], + ), + ); + } +} diff --git a/examples/demo/lib/widgets/sections/sms_section.dart b/examples/demo/lib/widgets/sections/sms_section.dart new file mode 100644 index 00000000..ab22a7a9 --- /dev/null +++ b/examples/demo/lib/widgets/sections/sms_section.dart @@ -0,0 +1,56 @@ +import 'package:flutter/material.dart'; +import 'package:provider/provider.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', + onInfoTap: onInfoTap, + child: Column( + children: [ + Card( + margin: EdgeInsets.zero, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), + child: CollapsibleList( + items: vm.smsNumbersList, + emptyText: 'No SMS added', + onDelete: vm.removeSms, + ), + ), + ), + const SizedBox(height: 8), + PrimaryButton( + label: 'ADD SMS', + onPressed: () async { + final result = await showDialog( + context: context, + builder: (_) => const SingleInputDialog( + title: 'Add SMS', + fieldLabel: 'SMS Number', + keyboardType: TextInputType.phone, + ), + ); + if (result != null) { + vm.addSms(result); + } + }, + ), + ], + ), + ); + } +} diff --git a/examples/demo/lib/widgets/sections/tags_section.dart b/examples/demo/lib/widgets/sections/tags_section.dart new file mode 100644 index 00000000..bfc59cf9 --- /dev/null +++ b/examples/demo/lib/widgets/sections/tags_section.dart @@ -0,0 +1,84 @@ +import 'package:flutter/material.dart'; +import 'package:provider/provider.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', + onInfoTap: onInfoTap, + child: Column( + children: [ + Card( + margin: EdgeInsets.zero, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), + child: PairList( + items: vm.tagsList, + emptyText: 'No tags added', + onDelete: vm.removeTag, + ), + ), + ), + const SizedBox(height: 8), + PrimaryButton( + label: 'ADD', + onPressed: () async { + final result = await showDialog>( + context: context, + builder: (_) => const PairInputDialog(title: 'Add Tag'), + ); + if (result != null) { + vm.addTag(result.key, result.value); + } + }, + ), + const SizedBox(height: 8), + PrimaryButton( + label: 'ADD MULTIPLE', + 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) ...[ + const SizedBox(height: 8), + DestructiveButton( + label: 'REMOVE SELECTED', + 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/lib/widgets/sections/track_event_section.dart b/examples/demo/lib/widgets/sections/track_event_section.dart new file mode 100644 index 00000000..0b53962e --- /dev/null +++ b/examples/demo/lib/widgets/sections/track_event_section.dart @@ -0,0 +1,38 @@ +import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; + +import '../../viewmodels/app_viewmodel.dart'; +import '../action_button.dart'; +import '../dialogs.dart'; +import '../section_card.dart'; + +class TrackEventSection extends StatelessWidget { + final VoidCallback? onInfoTap; + + const TrackEventSection({super.key, this.onInfoTap}); + + @override + Widget build(BuildContext context) { + final vm = context.read(); + + return SectionCard( + title: 'Track Event', + onInfoTap: onInfoTap, + child: PrimaryButton( + label: 'TRACK EVENT', + onPressed: () async { + final result = await showDialog>( + context: context, + builder: (_) => const TrackEventDialog(), + ); + if (result != null) { + vm.trackEvent( + result['name'] as String, + result['properties'] as Map?, + ); + } + }, + ), + ); + } +} diff --git a/examples/demo/lib/widgets/sections/triggers_section.dart b/examples/demo/lib/widgets/sections/triggers_section.dart new file mode 100644 index 00000000..cd2d1e05 --- /dev/null +++ b/examples/demo/lib/widgets/sections/triggers_section.dart @@ -0,0 +1,90 @@ +import 'package:flutter/material.dart'; +import 'package:provider/provider.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', + onInfoTap: onInfoTap, + child: Column( + children: [ + Card( + margin: EdgeInsets.zero, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), + child: PairList( + items: vm.triggersList, + emptyText: 'No triggers added', + onDelete: vm.removeTrigger, + ), + ), + ), + const SizedBox(height: 8), + PrimaryButton( + label: 'ADD', + onPressed: () async { + final result = await showDialog>( + context: context, + builder: (_) => const PairInputDialog(title: 'Add Trigger'), + ); + if (result != null) { + vm.addTrigger(result.key, result.value); + } + }, + ), + const SizedBox(height: 8), + PrimaryButton( + label: 'ADD MULTIPLE', + 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) ...[ + const SizedBox(height: 8), + DestructiveButton( + label: 'REMOVE SELECTED', + onPressed: () async { + final result = await showDialog>( + context: context, + builder: (_) => MultiSelectRemoveDialog( + title: 'Remove Triggers', + items: vm.triggersList, + ), + ); + if (result != null) { + vm.removeSelectedTriggers(result); + } + }, + ), + const SizedBox(height: 8), + DestructiveButton( + label: 'CLEAR ALL', + onPressed: vm.clearAllTriggers, + ), + ], + ], + ), + ); + } +} diff --git a/examples/demo/lib/widgets/toggle_row.dart b/examples/demo/lib/widgets/toggle_row.dart new file mode 100644 index 00000000..1abfb9ff --- /dev/null +++ b/examples/demo/lib/widgets/toggle_row.dart @@ -0,0 +1,40 @@ +import 'package:flutter/material.dart'; + +class ToggleRow extends StatelessWidget { + final String label; + final String? description; + final bool value; + final ValueChanged onChanged; + + const ToggleRow({ + super.key, + required this.label, + this.description, + required this.value, + required this.onChanged, + }); + + @override + Widget build(BuildContext context) { + return Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(label, style: Theme.of(context).textTheme.bodyLarge), + if (description != null) + Text( + description!, + style: Theme.of(context).textTheme.bodySmall?.copyWith( + color: Colors.grey[600], + ), + ), + ], + ), + ), + Switch(value: value, onChanged: onChanged), + ], + ); + } +} diff --git a/examples/demo/pubspec.yaml b/examples/demo/pubspec.yaml new file mode 100644 index 00000000..7062405b --- /dev/null +++ b/examples/demo/pubspec.yaml @@ -0,0 +1,37 @@ +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 + +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: + uses-material-design: true + assets: + - assets/onesignal_logo.svg diff --git a/examples/demo/test/widget_test.dart b/examples/demo/test/widget_test.dart new file mode 100644 index 00000000..d4a07e51 --- /dev/null +++ b/examples/demo/test/widget_test.dart @@ -0,0 +1,8 @@ +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/lib/onesignal_flutter.dart b/lib/onesignal_flutter.dart index e6d79248..922ea569 100644 --- a/lib/onesignal_flutter.dart +++ b/lib/onesignal_flutter.dart @@ -47,12 +47,14 @@ class OneSignal { /// /// The initializer accepts an [appId] which the developer can get /// from the OneSignal consoleas well as a dictonary of [launchOptions] - static void initialize(String appId) { - _channel.invokeMethod('OneSignal#initialize', {'appId': appId}); - InAppMessages.lifecycleInit(); - User.lifecycleInit(); - User.pushSubscription.lifecycleInit(); - Notifications.lifecycleInit(); + static Future initialize(String appId) async { + await _channel.invokeMethod('OneSignal#initialize', {'appId': appId}); + await Future.wait([ + InAppMessages.lifecycleInit(), + User.lifecycleInit(), + User.pushSubscription.lifecycleInit(), + Notifications.lifecycleInit(), + ]); } /// Login to OneSignal under the user identified by the [externalId] provided. diff --git a/pubspec.yaml b/pubspec.yaml index c179995b..7c35e447 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -7,8 +7,8 @@ homepage: https://github.com/OneSignal/OneSignal-Flutter-SDK # E.g.`rps test` to run tests scripts: test: flutter test --coverage && dart run dlcov -c 95 --log=0 --include-untested-files=true - format-check: dart format --set-exit-if-changed --output=none . && android/gradlew spotlessCheck - format: dart format . && android/gradlew spotlessApply + format-check: dart format --set-exit-if-changed --output=none lib test && android/gradlew spotlessCheck + format: dart format lib test && android/gradlew spotlessApply flutter: plugin: diff --git a/test/onesignalflutter_test.dart b/test/onesignalflutter_test.dart index 7eb05207..ae7d50cc 100644 --- a/test/onesignalflutter_test.dart +++ b/test/onesignalflutter_test.dart @@ -16,7 +16,7 @@ void main() { group('OneSignal', () { test('initialize sets appId and calls lifecycle methods', () async { - OneSignal.initialize('test-app-id'); + await OneSignal.initialize('test-app-id'); expect(channelController.state.appId, equals('test-app-id')); expect(channelController.state.lifecycleInitCalled, isTrue);