diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 58ea8069..017941fa 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,8 +1,5 @@ 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): @@ -52,7 +49,6 @@ PODS: DEPENDENCIES: - Flutter (from `Flutter`) - - onesignal_flutter (from `.symlinks/plugins/onesignal_flutter/ios`) - OneSignalXCFramework (< 6.0.0, >= 5.0.2) SPEC REPOS: @@ -62,12 +58,9 @@ SPEC REPOS: EXTERNAL SOURCES: Flutter: :path: Flutter - onesignal_flutter: - :path: ".symlinks/plugins/onesignal_flutter/ios" SPEC CHECKSUMS: Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467 - onesignal_flutter: ff13b98ed601f835bb6f59509456773998a3faec OneSignalXCFramework: ea9e14a95b92ad48d9b35037cbae88a9542bdea3 PODFILE CHECKSUM: 008ee3527530ade7ae7311fc02a615df31949c2e diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index e80d7352..7db27975 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -17,6 +17,7 @@ 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 */; }; @@ -88,6 +89,7 @@ 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 = ""; }; @@ -131,6 +133,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, 3370773A86F73EB1712145D3 /* libPods-Runner.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -163,6 +166,7 @@ 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( + 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */, 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 9740EEB21CF90195004384FC /* Debug.xcconfig */, 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, @@ -290,7 +294,6 @@ 97C146EC1CF9000F007C117D /* Resources */, CAB34EA020F96F460024CA6B /* Embed App Extensions */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 5726744B564FC3637D8684A2 /* [CP] Embed Pods Frameworks */, 9705A1C41CF9048500538489 /* Embed Frameworks */, ); buildRules = ( @@ -300,6 +303,9 @@ 47CD9D332BE10D9500F8B006 /* PBXTargetDependency */, ); name = Runner; + packageProductDependencies = ( + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */, + ); productName = Runner; productReference = 97C146EE1CF9000F007C117D /* Runner.app */; productType = "com.apple.product-type.application"; @@ -369,6 +375,9 @@ Base, ); mainGroup = 97C146E51CF9000F007C117D; + packageReferences = ( + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */, + ); productRefGroup = 97C146EF1CF9000F007C117D /* Products */; projectDirPath = ""; projectRoot = ""; @@ -450,42 +459,6 @@ 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; }; - 5726744B564FC3637D8684A2 /* [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; @@ -966,6 +939,20 @@ 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.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 00000000..81e531e0 --- /dev/null +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,14 @@ +{ + "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/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 684be6af..851adedd 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -5,6 +5,24 @@ + + + + + + + + + + + + + diff --git a/example_pod/android/app/src/main/AndroidManifest.xml b/example_pod/android/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..4dc65895 --- /dev/null +++ b/example_pod/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/example_pod/android/app/src/main/kotlin/com/onesignal/onesignal_example/MainActivity.kt b/example_pod/android/app/src/main/kotlin/com/onesignal/onesignal_example/MainActivity.kt new file mode 100644 index 00000000..5be0b3b4 --- /dev/null +++ b/example_pod/android/app/src/main/kotlin/com/onesignal/onesignal_example/MainActivity.kt @@ -0,0 +1,5 @@ +package com.onesignal.onesignal_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity : FlutterActivity() 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 new file mode 100644 index 00000000..f74085f3 --- /dev/null +++ b/example_pod/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + 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 new file mode 100644 index 00000000..304732f8 --- /dev/null +++ b/example_pod/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + 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 new file mode 100644 index 00000000..db77bb4b Binary files /dev/null and b/example_pod/android/app/src/main/res/mipmap-hdpi/ic_launcher.png 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 new file mode 100644 index 00000000..17987b79 Binary files /dev/null and b/example_pod/android/app/src/main/res/mipmap-mdpi/ic_launcher.png 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 new file mode 100644 index 00000000..09d43914 Binary files /dev/null and b/example_pod/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png 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 new file mode 100644 index 00000000..d5f1c8d3 Binary files /dev/null and b/example_pod/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png 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 new file mode 100644 index 00000000..4d6372ee Binary files /dev/null and b/example_pod/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png 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 new file mode 100644 index 00000000..06952be7 --- /dev/null +++ b/example_pod/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/example_pod/android/app/src/main/res/values/styles.xml b/example_pod/android/app/src/main/res/values/styles.xml new file mode 100644 index 00000000..cb1ef880 --- /dev/null +++ b/example_pod/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/example_pod/android/app/src/profile/AndroidManifest.xml b/example_pod/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 00000000..399f6981 --- /dev/null +++ b/example_pod/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/example_pod/android/build.gradle.kts b/example_pod/android/build.gradle.kts new file mode 100644 index 00000000..dbee657b --- /dev/null +++ b/example_pod/android/build.gradle.kts @@ -0,0 +1,24 @@ +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 new file mode 100644 index 00000000..f018a618 --- /dev/null +++ b/example_pod/android/gradle.properties @@ -0,0 +1,3 @@ +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 new file mode 100644 index 00000000..02767eb1 --- /dev/null +++ b/example_pod/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +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/android/settings.gradle.kts b/example_pod/android/settings.gradle.kts new file mode 100644 index 00000000..75af8a40 --- /dev/null +++ b/example_pod/android/settings.gradle.kts @@ -0,0 +1,26 @@ +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_pod/ios/.gitignore b/example_pod/ios/.gitignore new file mode 100644 index 00000000..79cc4da8 --- /dev/null +++ b/example_pod/ios/.gitignore @@ -0,0 +1,45 @@ +.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 new file mode 100644 index 00000000..eb878970 --- /dev/null +++ b/example_pod/ios/ExampleWidget/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "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 new file mode 100644 index 00000000..13613e3e --- /dev/null +++ b/example_pod/ios/ExampleWidget/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "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 new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/example_pod/ios/ExampleWidget/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "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 new file mode 100644 index 00000000..eb878970 --- /dev/null +++ b/example_pod/ios/ExampleWidget/Assets.xcassets/WidgetBackground.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "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 new file mode 100644 index 00000000..0eddeb7c --- /dev/null +++ b/example_pod/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "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 new file mode 100644 index 00000000..ba97c7a7 Binary files /dev/null and b/example_pod/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/onesignal-logo.png differ diff --git a/example_pod/ios/ExampleWidget/ExampleWidgetBundle.swift b/example_pod/ios/ExampleWidget/ExampleWidgetBundle.swift new file mode 100644 index 00000000..71407d0a --- /dev/null +++ b/example_pod/ios/ExampleWidget/ExampleWidgetBundle.swift @@ -0,0 +1,17 @@ +// +// 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 new file mode 100644 index 00000000..f372e2ef --- /dev/null +++ b/example_pod/ios/ExampleWidget/ExampleWidgetLiveActivity.swift @@ -0,0 +1,66 @@ +// +// 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 new file mode 100644 index 00000000..0f118fb7 --- /dev/null +++ b/example_pod/ios/ExampleWidget/Info.plist @@ -0,0 +1,11 @@ + + + + + NSExtension + + NSExtensionPointIdentifier + com.apple.widgetkit-extension + + + diff --git a/example_pod/ios/Flutter/AppFrameworkInfo.plist b/example_pod/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 00000000..1dc6cf76 --- /dev/null +++ b/example_pod/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + 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 new file mode 100644 index 00000000..e8efba11 --- /dev/null +++ b/example_pod/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/example_pod/ios/Flutter/Flutter.podspec b/example_pod/ios/Flutter/Flutter.podspec new file mode 100644 index 00000000..3aed58d3 --- /dev/null +++ b/example_pod/ios/Flutter/Flutter.podspec @@ -0,0 +1,18 @@ +# +# 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 new file mode 100644 index 00000000..399e9340 --- /dev/null +++ b/example_pod/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_pod/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Package.swift b/example_pod/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Package.swift new file mode 100644 index 00000000..63cc62e3 --- /dev/null +++ b/example_pod/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Package.swift @@ -0,0 +1,25 @@ +// 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 new file mode 100644 index 00000000..62e7b11a --- /dev/null +++ b/example_pod/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Sources/FlutterGeneratedPluginSwiftPackage/FlutterGeneratedPluginSwiftPackage.swift @@ -0,0 +1,3 @@ +// +// 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 new file mode 100644 index 00000000..a88caf99 --- /dev/null +++ b/example_pod/ios/Flutter/ephemeral/flutter_lldb_helper.py @@ -0,0 +1,32 @@ +# +# 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 new file mode 100644 index 00000000..e3ba6fbe --- /dev/null +++ b/example_pod/ios/Flutter/ephemeral/flutter_lldbinit @@ -0,0 +1,5 @@ +# +# 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 new file mode 100644 index 00000000..7fe6f1d2 --- /dev/null +++ b/example_pod/ios/OneSignalNotificationServiceExtension/Info.plist @@ -0,0 +1,36 @@ + + + + + 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 new file mode 100644 index 00000000..7ae1037b --- /dev/null +++ b/example_pod/ios/OneSignalNotificationServiceExtension/NotificationService.h @@ -0,0 +1,13 @@ +// +// 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 new file mode 100644 index 00000000..a692bf33 --- /dev/null +++ b/example_pod/ios/OneSignalNotificationServiceExtension/NotificationService.m @@ -0,0 +1,40 @@ +// +// 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 new file mode 100644 index 00000000..c70461e8 --- /dev/null +++ b/example_pod/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.application-groups + + group.com.onesignal.example.onesignal + + + diff --git a/example_pod/ios/Podfile b/example_pod/ios/Podfile new file mode 100644 index 00000000..2f6ad5d0 --- /dev/null +++ b/example_pod/ios/Podfile @@ -0,0 +1,46 @@ +# 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_pod/ios/Podfile.lock b/example_pod/ios/Podfile.lock new file mode 100644 index 00000000..4faed947 --- /dev/null +++ b/example_pod/ios/Podfile.lock @@ -0,0 +1,75 @@ +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 new file mode 100644 index 00000000..b4b74773 --- /dev/null +++ b/example_pod/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,995 @@ +// !$*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 new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/example_pod/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/example_pod/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example_pod/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/example_pod/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example_pod/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example_pod/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 00000000..851adedd --- /dev/null +++ b/example_pod/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example_pod/ios/Runner.xcworkspace/contents.xcworkspacedata b/example_pod/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..21a3cc14 --- /dev/null +++ b/example_pod/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/example_pod/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example_pod/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/example_pod/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example_pod/ios/Runner/AppDelegate.h b/example_pod/ios/Runner/AppDelegate.h new file mode 100644 index 00000000..36e21bbf --- /dev/null +++ b/example_pod/ios/Runner/AppDelegate.h @@ -0,0 +1,6 @@ +#import +#import + +@interface AppDelegate : FlutterAppDelegate + +@end diff --git a/example_pod/ios/Runner/AppDelegate.m b/example_pod/ios/Runner/AppDelegate.m new file mode 100644 index 00000000..59a72e90 --- /dev/null +++ b/example_pod/ios/Runner/AppDelegate.m @@ -0,0 +1,13 @@ +#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 new file mode 100644 index 00000000..d36b1fab --- /dev/null +++ b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "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 new file mode 100644 index 00000000..3d43d11e Binary files /dev/null and b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png 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 new file mode 100644 index 00000000..28c6bf03 Binary files /dev/null and b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png 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 new file mode 100644 index 00000000..2ccbfd96 Binary files /dev/null and b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png 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 new file mode 100644 index 00000000..f091b6b0 Binary files /dev/null and b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png 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 new file mode 100644 index 00000000..4cde1211 Binary files /dev/null and b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png 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 new file mode 100644 index 00000000..d0ef06e7 Binary files /dev/null and b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png 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 new file mode 100644 index 00000000..dcdc2306 Binary files /dev/null and b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png 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 new file mode 100644 index 00000000..2ccbfd96 Binary files /dev/null and b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png 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 new file mode 100644 index 00000000..c8f9ed8f Binary files /dev/null and b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png 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 new file mode 100644 index 00000000..a6d6b860 Binary files /dev/null and b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png 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 new file mode 100644 index 00000000..a6d6b860 Binary files /dev/null and b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png 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 new file mode 100644 index 00000000..75b2d164 Binary files /dev/null and b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png 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 new file mode 100644 index 00000000..c4df70d3 Binary files /dev/null and b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png 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 new file mode 100644 index 00000000..6a84f41e Binary files /dev/null and b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png 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 new file mode 100644 index 00000000..d0e1f585 Binary files /dev/null and b/example_pod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png 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 new file mode 100644 index 00000000..0bedcf2f --- /dev/null +++ b/example_pod/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "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 new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/example_pod/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png 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 new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/example_pod/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png 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 new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/example_pod/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png 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 new file mode 100644 index 00000000..89c2725b --- /dev/null +++ b/example_pod/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 00000000..f2e259c7 --- /dev/null +++ b/example_pod/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example_pod/ios/Runner/Base.lproj/Main.storyboard b/example_pod/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 00000000..f3c28516 --- /dev/null +++ b/example_pod/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example_pod/ios/Runner/Info.plist b/example_pod/ios/Runner/Info.plist new file mode 100644 index 00000000..fa946f24 --- /dev/null +++ b/example_pod/ios/Runner/Info.plist @@ -0,0 +1,58 @@ + + + + + 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 new file mode 100644 index 00000000..34463649 --- /dev/null +++ b/example_pod/ios/Runner/Runner.entitlements @@ -0,0 +1,12 @@ + + + + + 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 new file mode 100644 index 00000000..dff6597e --- /dev/null +++ b/example_pod/ios/Runner/main.m @@ -0,0 +1,9 @@ +#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 new file mode 100644 index 00000000..b77b9201 --- /dev/null +++ b/example_pod/lib/main.dart @@ -0,0 +1,569 @@ +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 new file mode 100644 index 00000000..c3d7f028 --- /dev/null +++ b/example_pod/pubspec.yaml @@ -0,0 +1,64 @@ +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 new file mode 100644 index 00000000..3127d8f4 --- /dev/null +++ b/example_pod/test/widget_test.dart @@ -0,0 +1,29 @@ +// 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 new file mode 100644 index 00000000..18d5e693 --- /dev/null +++ b/example_spm/.gitignore @@ -0,0 +1,11 @@ +.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 new file mode 100644 index 00000000..0f6195d3 --- /dev/null +++ b/example_spm/.metadata @@ -0,0 +1,30 @@ +# 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 new file mode 100644 index 00000000..13327bf6 --- /dev/null +++ b/example_spm/README.md @@ -0,0 +1,32 @@ +# 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 new file mode 100644 index 00000000..241a690a --- /dev/null +++ b/example_spm/analysis_options.yaml @@ -0,0 +1,41 @@ +# 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 new file mode 100644 index 00000000..be3943c9 --- /dev/null +++ b/example_spm/android/.gitignore @@ -0,0 +1,14 @@ +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 new file mode 100644 index 00000000..5001623b --- /dev/null +++ b/example_spm/android/app/build.gradle.kts @@ -0,0 +1,44 @@ +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 new file mode 100644 index 00000000..399f6981 --- /dev/null +++ b/example_spm/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/example_spm/android/app/src/main/AndroidManifest.xml b/example_spm/android/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..4dc65895 --- /dev/null +++ b/example_spm/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + 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 new file mode 100644 index 00000000..5be0b3b4 --- /dev/null +++ b/example_spm/android/app/src/main/kotlin/com/onesignal/onesignal_example/MainActivity.kt @@ -0,0 +1,5 @@ +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 new file mode 100644 index 00000000..f74085f3 --- /dev/null +++ b/example_spm/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + 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 new file mode 100644 index 00000000..304732f8 --- /dev/null +++ b/example_spm/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + 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 new file mode 100644 index 00000000..db77bb4b Binary files /dev/null and b/example_spm/android/app/src/main/res/mipmap-hdpi/ic_launcher.png 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 new file mode 100644 index 00000000..17987b79 Binary files /dev/null and b/example_spm/android/app/src/main/res/mipmap-mdpi/ic_launcher.png 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 new file mode 100644 index 00000000..09d43914 Binary files /dev/null and b/example_spm/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png 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 new file mode 100644 index 00000000..d5f1c8d3 Binary files /dev/null and b/example_spm/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png 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 new file mode 100644 index 00000000..4d6372ee Binary files /dev/null and b/example_spm/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png 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 new file mode 100644 index 00000000..06952be7 --- /dev/null +++ b/example_spm/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/example_spm/android/app/src/main/res/values/styles.xml b/example_spm/android/app/src/main/res/values/styles.xml new file mode 100644 index 00000000..cb1ef880 --- /dev/null +++ b/example_spm/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/example_spm/android/app/src/profile/AndroidManifest.xml b/example_spm/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 00000000..399f6981 --- /dev/null +++ b/example_spm/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/example_spm/android/build.gradle.kts b/example_spm/android/build.gradle.kts new file mode 100644 index 00000000..dbee657b --- /dev/null +++ b/example_spm/android/build.gradle.kts @@ -0,0 +1,24 @@ +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 new file mode 100644 index 00000000..f018a618 --- /dev/null +++ b/example_spm/android/gradle.properties @@ -0,0 +1,3 @@ +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 new file mode 100644 index 00000000..02767eb1 --- /dev/null +++ b/example_spm/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +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 new file mode 100644 index 00000000..75af8a40 --- /dev/null +++ b/example_spm/android/settings.gradle.kts @@ -0,0 +1,26 @@ +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 new file mode 100644 index 00000000..79cc4da8 --- /dev/null +++ b/example_spm/ios/.gitignore @@ -0,0 +1,45 @@ +.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 new file mode 100644 index 00000000..eb878970 --- /dev/null +++ b/example_spm/ios/ExampleWidget/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "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 new file mode 100644 index 00000000..13613e3e --- /dev/null +++ b/example_spm/ios/ExampleWidget/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "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 new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/example_spm/ios/ExampleWidget/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "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 new file mode 100644 index 00000000..eb878970 --- /dev/null +++ b/example_spm/ios/ExampleWidget/Assets.xcassets/WidgetBackground.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "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 new file mode 100644 index 00000000..0eddeb7c --- /dev/null +++ b/example_spm/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "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 new file mode 100644 index 00000000..ba97c7a7 Binary files /dev/null and b/example_spm/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/onesignal-logo.png differ diff --git a/example_spm/ios/ExampleWidget/ExampleWidgetBundle.swift b/example_spm/ios/ExampleWidget/ExampleWidgetBundle.swift new file mode 100644 index 00000000..71407d0a --- /dev/null +++ b/example_spm/ios/ExampleWidget/ExampleWidgetBundle.swift @@ -0,0 +1,17 @@ +// +// 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 new file mode 100644 index 00000000..f372e2ef --- /dev/null +++ b/example_spm/ios/ExampleWidget/ExampleWidgetLiveActivity.swift @@ -0,0 +1,66 @@ +// +// 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 new file mode 100644 index 00000000..0f118fb7 --- /dev/null +++ b/example_spm/ios/ExampleWidget/Info.plist @@ -0,0 +1,11 @@ + + + + + NSExtension + + NSExtensionPointIdentifier + com.apple.widgetkit-extension + + + diff --git a/example_spm/ios/Flutter/AppFrameworkInfo.plist b/example_spm/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 00000000..1dc6cf76 --- /dev/null +++ b/example_spm/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + 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 new file mode 100644 index 00000000..592ceee8 --- /dev/null +++ b/example_spm/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/example_spm/ios/Flutter/Flutter.podspec b/example_spm/ios/Flutter/Flutter.podspec new file mode 100644 index 00000000..3aed58d3 --- /dev/null +++ b/example_spm/ios/Flutter/Flutter.podspec @@ -0,0 +1,18 @@ +# +# 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 new file mode 100644 index 00000000..592ceee8 --- /dev/null +++ b/example_spm/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#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 new file mode 100644 index 00000000..e73aa086 --- /dev/null +++ b/example_spm/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Package.swift @@ -0,0 +1,28 @@ +// 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 new file mode 100644 index 00000000..62e7b11a --- /dev/null +++ b/example_spm/ios/Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage/Sources/FlutterGeneratedPluginSwiftPackage/FlutterGeneratedPluginSwiftPackage.swift @@ -0,0 +1,3 @@ +// +// 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 new file mode 100644 index 00000000..a88caf99 --- /dev/null +++ b/example_spm/ios/Flutter/ephemeral/flutter_lldb_helper.py @@ -0,0 +1,32 @@ +# +# 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 new file mode 100644 index 00000000..e3ba6fbe --- /dev/null +++ b/example_spm/ios/Flutter/ephemeral/flutter_lldbinit @@ -0,0 +1,5 @@ +# +# Generated file, do not edit. +# + +command script import --relative-to-command-file flutter_lldb_helper.py diff --git a/example_spm/ios/OneSignalNotificationServiceExtension/Info.plist b/example_spm/ios/OneSignalNotificationServiceExtension/Info.plist new file mode 100644 index 00000000..7fe6f1d2 --- /dev/null +++ b/example_spm/ios/OneSignalNotificationServiceExtension/Info.plist @@ -0,0 +1,36 @@ + + + + + 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_spm/ios/OneSignalNotificationServiceExtension/NotificationService.h b/example_spm/ios/OneSignalNotificationServiceExtension/NotificationService.h new file mode 100644 index 00000000..7ae1037b --- /dev/null +++ b/example_spm/ios/OneSignalNotificationServiceExtension/NotificationService.h @@ -0,0 +1,13 @@ +// +// 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 new file mode 100644 index 00000000..a692bf33 --- /dev/null +++ b/example_spm/ios/OneSignalNotificationServiceExtension/NotificationService.m @@ -0,0 +1,40 @@ +// +// 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 new file mode 100644 index 00000000..c70461e8 --- /dev/null +++ b/example_spm/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension.entitlements @@ -0,0 +1,10 @@ + + + + + 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 new file mode 100644 index 00000000..4656ecdd --- /dev/null +++ b/example_spm/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,861 @@ +// !$*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 new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/example_spm/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/example_spm/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example_spm/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/example_spm/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + 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 new file mode 100644 index 00000000..81e531e0 --- /dev/null +++ b/example_spm/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,14 @@ +{ + "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 new file mode 100644 index 00000000..851adedd --- /dev/null +++ b/example_spm/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example_spm/ios/Runner.xcworkspace/contents.xcworkspacedata b/example_spm/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..21a3cc14 --- /dev/null +++ b/example_spm/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/example_spm/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example_spm/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/example_spm/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example_spm/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved b/example_spm/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 00000000..81e531e0 --- /dev/null +++ b/example_spm/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,14 @@ +{ + "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 new file mode 100644 index 00000000..36e21bbf --- /dev/null +++ b/example_spm/ios/Runner/AppDelegate.h @@ -0,0 +1,6 @@ +#import +#import + +@interface AppDelegate : FlutterAppDelegate + +@end diff --git a/example_spm/ios/Runner/AppDelegate.m b/example_spm/ios/Runner/AppDelegate.m new file mode 100644 index 00000000..59a72e90 --- /dev/null +++ b/example_spm/ios/Runner/AppDelegate.m @@ -0,0 +1,13 @@ +#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 new file mode 100644 index 00000000..d36b1fab --- /dev/null +++ b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "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 new file mode 100644 index 00000000..3d43d11e Binary files /dev/null and b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png 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 new file mode 100644 index 00000000..28c6bf03 Binary files /dev/null and b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png 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 new file mode 100644 index 00000000..2ccbfd96 Binary files /dev/null and b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png 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 new file mode 100644 index 00000000..f091b6b0 Binary files /dev/null and b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png 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 new file mode 100644 index 00000000..4cde1211 Binary files /dev/null and b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png 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 new file mode 100644 index 00000000..d0ef06e7 Binary files /dev/null and b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png 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 new file mode 100644 index 00000000..dcdc2306 Binary files /dev/null and b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png 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 new file mode 100644 index 00000000..2ccbfd96 Binary files /dev/null and b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png 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 new file mode 100644 index 00000000..c8f9ed8f Binary files /dev/null and b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png 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 new file mode 100644 index 00000000..a6d6b860 Binary files /dev/null and b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png 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 new file mode 100644 index 00000000..a6d6b860 Binary files /dev/null and b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png 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 new file mode 100644 index 00000000..75b2d164 Binary files /dev/null and b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png 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 new file mode 100644 index 00000000..c4df70d3 Binary files /dev/null and b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png 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 new file mode 100644 index 00000000..6a84f41e Binary files /dev/null and b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png 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 new file mode 100644 index 00000000..d0e1f585 Binary files /dev/null and b/example_spm/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png 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 new file mode 100644 index 00000000..0bedcf2f --- /dev/null +++ b/example_spm/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "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 new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/example_spm/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png 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 new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/example_spm/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png 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 new file mode 100644 index 00000000..9da19eac Binary files /dev/null and b/example_spm/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png 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 new file mode 100644 index 00000000..89c2725b --- /dev/null +++ b/example_spm/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# 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 new file mode 100644 index 00000000..f2e259c7 --- /dev/null +++ b/example_spm/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example_spm/ios/Runner/Base.lproj/Main.storyboard b/example_spm/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 00000000..f3c28516 --- /dev/null +++ b/example_spm/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example_spm/ios/Runner/Info.plist b/example_spm/ios/Runner/Info.plist new file mode 100644 index 00000000..fa946f24 --- /dev/null +++ b/example_spm/ios/Runner/Info.plist @@ -0,0 +1,58 @@ + + + + + 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_spm/ios/Runner/Runner.entitlements b/example_spm/ios/Runner/Runner.entitlements new file mode 100644 index 00000000..34463649 --- /dev/null +++ b/example_spm/ios/Runner/Runner.entitlements @@ -0,0 +1,12 @@ + + + + + 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 new file mode 100644 index 00000000..dff6597e --- /dev/null +++ b/example_spm/ios/Runner/main.m @@ -0,0 +1,9 @@ +#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 new file mode 100644 index 00000000..b77b9201 --- /dev/null +++ b/example_spm/lib/main.dart @@ -0,0 +1,569 @@ +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 new file mode 100644 index 00000000..a38ad68a --- /dev/null +++ b/example_spm/pubspec.yaml @@ -0,0 +1,62 @@ +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 new file mode 100644 index 00000000..3127d8f4 --- /dev/null +++ b/example_spm/test/widget_test.dart @@ -0,0 +1,29 @@ +// 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); + }); +}