From f0080743b6b39eba7f20799fa1241cd0657a01cf Mon Sep 17 00:00:00 2001 From: Shepherd Date: Mon, 2 Oct 2023 15:51:53 -0400 Subject: [PATCH 01/21] Change plugin to androidlib --- ....plugin.meta => OneSignalConfig.androidlib.meta} | 0 .../AndroidManifest.xml | 0 .../AndroidManifest.xml.meta | 0 .../README.md | 0 .../README.md.meta | 0 .../project.properties | 0 .../project.properties.meta | 0 .../res.meta | 0 .../res/drawable-hdpi.meta | 0 .../res/drawable-hdpi/ic_stat_onesignal_default.png | Bin .../ic_stat_onesignal_default.png.meta | 0 .../res/drawable-mdpi.meta | 0 .../res/drawable-mdpi/ic_stat_onesignal_default.png | Bin .../ic_stat_onesignal_default.png.meta | 0 .../res/drawable-xhdpi.meta | 0 .../drawable-xhdpi/ic_stat_onesignal_default.png | Bin .../ic_stat_onesignal_default.png.meta | 0 .../res/drawable-xxhdpi.meta | 0 .../drawable-xxhdpi/ic_stat_onesignal_default.png | Bin .../ic_stat_onesignal_default.png.meta | 0 .../res/drawable-xxxhdpi.meta | 0 .../ic_onesignal_large_icon_default.png | Bin .../ic_onesignal_large_icon_default.png.meta | 0 .../drawable-xxxhdpi/ic_stat_onesignal_default.png | Bin .../ic_stat_onesignal_default.png.meta | 0 .../res/raw.meta | 0 .../res/raw/notification.wav | Bin .../res/raw/notification.wav.meta | 0 28 files changed, 0 insertions(+), 0 deletions(-) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin.meta => OneSignalConfig.androidlib.meta} (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/AndroidManifest.xml (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/AndroidManifest.xml.meta (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/README.md (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/README.md.meta (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/project.properties (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/project.properties.meta (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/res.meta (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/res/drawable-hdpi.meta (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/res/drawable-hdpi/ic_stat_onesignal_default.png (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/res/drawable-hdpi/ic_stat_onesignal_default.png.meta (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/res/drawable-mdpi.meta (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/res/drawable-mdpi/ic_stat_onesignal_default.png (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/res/drawable-mdpi/ic_stat_onesignal_default.png.meta (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/res/drawable-xhdpi.meta (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/res/drawable-xhdpi/ic_stat_onesignal_default.png (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/res/drawable-xhdpi/ic_stat_onesignal_default.png.meta (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/res/drawable-xxhdpi.meta (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/res/drawable-xxhdpi/ic_stat_onesignal_default.png (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/res/drawable-xxhdpi/ic_stat_onesignal_default.png.meta (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/res/drawable-xxxhdpi.meta (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png.meta (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/res/drawable-xxxhdpi/ic_stat_onesignal_default.png (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/res/drawable-xxxhdpi/ic_stat_onesignal_default.png.meta (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/res/raw.meta (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/res/raw/notification.wav (100%) rename com.onesignal.unity.android/Editor/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/res/raw/notification.wav.meta (100%) diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib.meta similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin.meta rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib.meta diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/AndroidManifest.xml b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/AndroidManifest.xml similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/AndroidManifest.xml rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/AndroidManifest.xml diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/AndroidManifest.xml.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/AndroidManifest.xml.meta similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/AndroidManifest.xml.meta rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/AndroidManifest.xml.meta diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/README.md b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/README.md rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/README.md.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md.meta similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/README.md.meta rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md.meta diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/project.properties b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/project.properties similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/project.properties rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/project.properties diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/project.properties.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/project.properties.meta similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/project.properties.meta rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/project.properties.meta diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res.meta similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res.meta rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res.meta diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-hdpi.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-hdpi.meta similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-hdpi.meta rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-hdpi.meta diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-hdpi/ic_stat_onesignal_default.png b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-hdpi/ic_stat_onesignal_default.png similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-hdpi/ic_stat_onesignal_default.png rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-hdpi/ic_stat_onesignal_default.png diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-hdpi/ic_stat_onesignal_default.png.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-hdpi/ic_stat_onesignal_default.png.meta similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-hdpi/ic_stat_onesignal_default.png.meta rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-hdpi/ic_stat_onesignal_default.png.meta diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-mdpi.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-mdpi.meta similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-mdpi.meta rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-mdpi.meta diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-mdpi/ic_stat_onesignal_default.png b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-mdpi/ic_stat_onesignal_default.png similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-mdpi/ic_stat_onesignal_default.png rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-mdpi/ic_stat_onesignal_default.png diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-mdpi/ic_stat_onesignal_default.png.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-mdpi/ic_stat_onesignal_default.png.meta similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-mdpi/ic_stat_onesignal_default.png.meta rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-mdpi/ic_stat_onesignal_default.png.meta diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xhdpi.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xhdpi.meta similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xhdpi.meta rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xhdpi.meta diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xhdpi/ic_stat_onesignal_default.png b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xhdpi/ic_stat_onesignal_default.png similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xhdpi/ic_stat_onesignal_default.png rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xhdpi/ic_stat_onesignal_default.png diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xhdpi/ic_stat_onesignal_default.png.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xhdpi/ic_stat_onesignal_default.png.meta similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xhdpi/ic_stat_onesignal_default.png.meta rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xhdpi/ic_stat_onesignal_default.png.meta diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxhdpi.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxhdpi.meta similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxhdpi.meta rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxhdpi.meta diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxhdpi/ic_stat_onesignal_default.png b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxhdpi/ic_stat_onesignal_default.png similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxhdpi/ic_stat_onesignal_default.png rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxhdpi/ic_stat_onesignal_default.png diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxhdpi/ic_stat_onesignal_default.png.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxhdpi/ic_stat_onesignal_default.png.meta similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxhdpi/ic_stat_onesignal_default.png.meta rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxhdpi/ic_stat_onesignal_default.png.meta diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi.meta similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi.meta rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi.meta diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png.meta similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png.meta rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png.meta diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_stat_onesignal_default.png b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi/ic_stat_onesignal_default.png similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_stat_onesignal_default.png rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi/ic_stat_onesignal_default.png diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_stat_onesignal_default.png.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi/ic_stat_onesignal_default.png.meta similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_stat_onesignal_default.png.meta rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi/ic_stat_onesignal_default.png.meta diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/raw.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/raw.meta similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/raw.meta rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/raw.meta diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/raw/notification.wav b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/raw/notification.wav similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/raw/notification.wav rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/raw/notification.wav diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/raw/notification.wav.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/raw/notification.wav.meta similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.plugin/res/raw/notification.wav.meta rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/raw/notification.wav.meta From bd41d0f675a62127953c05d75cccb5b654919e8a Mon Sep 17 00:00:00 2001 From: Shepherd Date: Mon, 2 Oct 2023 16:00:14 -0400 Subject: [PATCH 02/21] Add proguard --- .../OneSignalConfig.androidlib/build.gradle | 20 +++++++++++++++++++ .../consumer-proguard.pro | 3 +++ 2 files changed, 23 insertions(+) create mode 100644 com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/build.gradle create mode 100644 com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/consumer-proguard.pro diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/build.gradle b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/build.gradle new file mode 100644 index 000000000..e940f1ffb --- /dev/null +++ b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/build.gradle @@ -0,0 +1,20 @@ +apply plugin: 'com.android.library' + +android { + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + } + } + + defaultConfig { + consumerProguardFiles "consumer-proguard.pro" + } + + compileSdkVersion 32 + buildToolsVersion '32.0.0' + + lintOptions { + abortOnError false + } +} \ No newline at end of file diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/consumer-proguard.pro b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/consumer-proguard.pro new file mode 100644 index 000000000..f895a55b0 --- /dev/null +++ b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/consumer-proguard.pro @@ -0,0 +1,3 @@ +-keep class com.onesignal.** { *; } + +-keep class kotlinx.coroutines.android.AndroidDispatcherFactory {*;} \ No newline at end of file From f34ddc54539a35ea6dc10fef9cb93b4af1c0df1e Mon Sep 17 00:00:00 2001 From: Shepherd Date: Mon, 2 Oct 2023 16:00:25 -0400 Subject: [PATCH 03/21] Remove project properties --- .../OneSignalConfig.androidlib/project.properties | 15 --------------- .../project.properties.meta | 4 ---- 2 files changed, 19 deletions(-) delete mode 100644 com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/project.properties delete mode 100644 com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/project.properties.meta diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/project.properties b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/project.properties deleted file mode 100644 index 03d06171e..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/project.properties +++ /dev/null @@ -1,15 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system edit -# "ant.properties", and override values to adapt the script to your -# project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt - -# Project target. -target=android-10 -android.library=true diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/project.properties.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/project.properties.meta deleted file mode 100644 index a1bd03961..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/project.properties.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 3c05c210d837fea4890616346460f104 -DefaultImporter: - userData: From e495edf820f943dc371252b5f05511272d54353c Mon Sep 17 00:00:00 2001 From: Shepherd Date: Mon, 2 Oct 2023 20:04:11 -0400 Subject: [PATCH 04/21] Remove meta files --- .../AndroidManifest.xml.meta | 7 -- .../OneSignalConfig.androidlib/README.md.meta | 8 -- .../OneSignalConfig.androidlib/res.meta | 5 - .../res/drawable-hdpi.meta | 9 -- .../ic_stat_onesignal_default.png.meta | 96 ------------------- .../res/drawable-mdpi.meta | 9 -- .../ic_stat_onesignal_default.png.meta | 96 ------------------- .../res/drawable-xhdpi.meta | 9 -- .../ic_stat_onesignal_default.png.meta | 96 ------------------- .../res/drawable-xxhdpi.meta | 9 -- .../ic_stat_onesignal_default.png.meta | 96 ------------------- .../res/drawable-xxxhdpi.meta | 8 -- .../ic_onesignal_large_icon_default.png.meta | 96 ------------------- .../ic_stat_onesignal_default.png.meta | 96 ------------------- .../OneSignalConfig.androidlib/res/raw.meta | 5 - .../res/raw/notification.wav.meta | 4 - 16 files changed, 649 deletions(-) delete mode 100644 com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/AndroidManifest.xml.meta delete mode 100644 com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md.meta delete mode 100644 com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res.meta delete mode 100644 com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-hdpi.meta delete mode 100644 com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-hdpi/ic_stat_onesignal_default.png.meta delete mode 100644 com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-mdpi.meta delete mode 100644 com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-mdpi/ic_stat_onesignal_default.png.meta delete mode 100644 com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xhdpi.meta delete mode 100644 com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xhdpi/ic_stat_onesignal_default.png.meta delete mode 100644 com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxhdpi.meta delete mode 100644 com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxhdpi/ic_stat_onesignal_default.png.meta delete mode 100644 com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi.meta delete mode 100644 com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png.meta delete mode 100644 com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi/ic_stat_onesignal_default.png.meta delete mode 100644 com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/raw.meta delete mode 100644 com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/raw/notification.wav.meta diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/AndroidManifest.xml.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/AndroidManifest.xml.meta deleted file mode 100644 index a1fd0b179..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/AndroidManifest.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: fc42e88ad15d9479298db862e2797087 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md.meta deleted file mode 100644 index bd024586c..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 54e1106d2dae63d438d01a3aba3ce3f4 -timeCreated: 1450316662 -licenseType: Free -TextScriptImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res.meta deleted file mode 100644 index feceaa962..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 3f9cd4496f0fd474bae155c28c02c6fd -folderAsset: yes -DefaultImporter: - userData: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-hdpi.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-hdpi.meta deleted file mode 100644 index f7f305358..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-hdpi.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 9ba89af2f71dd844c9d32ebe66097342 -folderAsset: yes -timeCreated: 1425686711 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-hdpi/ic_stat_onesignal_default.png.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-hdpi/ic_stat_onesignal_default.png.meta deleted file mode 100644 index f94bae5b7..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-hdpi/ic_stat_onesignal_default.png.meta +++ /dev/null @@ -1,96 +0,0 @@ -fileFormatVersion: 2 -guid: 83cd6cb71f8dd4cebaf31ec5e1f0e900 -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 11 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-mdpi.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-mdpi.meta deleted file mode 100644 index 96e47ba44..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-mdpi.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 526b2a5a8f3d32e4986ae1dd3dca0f25 -folderAsset: yes -timeCreated: 1425686710 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-mdpi/ic_stat_onesignal_default.png.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-mdpi/ic_stat_onesignal_default.png.meta deleted file mode 100644 index 85e9162db..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-mdpi/ic_stat_onesignal_default.png.meta +++ /dev/null @@ -1,96 +0,0 @@ -fileFormatVersion: 2 -guid: 3dedafcb700b648f884585d5123fb4cc -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 11 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xhdpi.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xhdpi.meta deleted file mode 100644 index ccde26f4f..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xhdpi.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: fd2e926a7da32aa418a11789e423bcf2 -folderAsset: yes -timeCreated: 1425686710 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xhdpi/ic_stat_onesignal_default.png.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xhdpi/ic_stat_onesignal_default.png.meta deleted file mode 100644 index a7e0af82c..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xhdpi/ic_stat_onesignal_default.png.meta +++ /dev/null @@ -1,96 +0,0 @@ -fileFormatVersion: 2 -guid: 81523a9106dcf4cc2bfa5dcd7dbcdb12 -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 11 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxhdpi.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxhdpi.meta deleted file mode 100644 index 5d4eec545..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxhdpi.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: fdcad13c1320f9e4590d033040c76eb0 -folderAsset: yes -timeCreated: 1425686710 -licenseType: Pro -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxhdpi/ic_stat_onesignal_default.png.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxhdpi/ic_stat_onesignal_default.png.meta deleted file mode 100644 index ba693ded3..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxhdpi/ic_stat_onesignal_default.png.meta +++ /dev/null @@ -1,96 +0,0 @@ -fileFormatVersion: 2 -guid: 00cfa22faa2c64f8eb278ddbdb4ec1bb -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 11 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi.meta deleted file mode 100644 index 644eac3a4..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 54a3ec6b7071f4d089da5a404ace28b5 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png.meta deleted file mode 100644 index 53e16563c..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png.meta +++ /dev/null @@ -1,96 +0,0 @@ -fileFormatVersion: 2 -guid: e432fc833d3854049aa725b593c497a8 -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 11 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi/ic_stat_onesignal_default.png.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi/ic_stat_onesignal_default.png.meta deleted file mode 100644 index 9da67618b..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi/ic_stat_onesignal_default.png.meta +++ /dev/null @@ -1,96 +0,0 @@ -fileFormatVersion: 2 -guid: 0a2f9d99ed36f4ca88742f712413082a -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 11 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/raw.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/raw.meta deleted file mode 100644 index d5736f428..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/raw.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 2140915f306b1af43b161e76b00d02ca -folderAsset: yes -DefaultImporter: - userData: diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/raw/notification.wav.meta b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/raw/notification.wav.meta deleted file mode 100644 index 0493a6f70..000000000 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/raw/notification.wav.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 21b72d16fac2afe47891657f866fba94 -DefaultImporter: - userData: From a85e0dd30d96cfa94b1673b784b2cffe143970db Mon Sep 17 00:00:00 2001 From: Shepherd Date: Mon, 2 Oct 2023 20:23:23 -0400 Subject: [PATCH 05/21] Update setup step --- .../SetupSteps/ExportAndroidResourcesStep.cs | 31 ++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs b/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs index eaee7770c..a718f4512 100644 --- a/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs +++ b/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs @@ -32,7 +32,7 @@ namespace OneSignalSDK { /// - /// Copies the OneSignalConfig.plugin to Assets/Plugins/Android/* + /// Copies the OneSignalConfig.androidlib to Assets/Plugins/Android/* /// public sealed class ExportAndroidResourcesStep : OneSignalSetupStep { public override string Summary @@ -45,12 +45,11 @@ public override bool IsRequired => true; protected override bool _getIsStepCompleted() { - if (!Directory.Exists(_pluginExportPath)) + if (!Directory.Exists(_pluginExportPath) || Directory.Exists(_pluginV3ExportPath)) return false; var packagePaths = Directory.GetFiles(_pluginPackagePath, "*", SearchOption.AllDirectories) .Select(path => path.Remove(0, path.LastIndexOf(_pluginName, StringComparison.InvariantCulture))); - packagePaths = packagePaths.Where(file => !file.EndsWith(".meta")); var exportPaths = Directory.GetFiles(_pluginExportPath, "*", SearchOption.AllDirectories) .Select(path => path.Remove(0, path.LastIndexOf(_pluginName, StringComparison.InvariantCulture))); @@ -67,10 +66,23 @@ protected override bool _getIsStepCompleted() { } protected override void _runStep() { - var files = Directory.GetFiles(_pluginPackagePath, "*", SearchOption.AllDirectories); - var filteredFiles = files.Where(file => !file.EndsWith(".meta")); + if (Directory.Exists(_pluginV3ExportPath)) { + if (!Directory.Exists(_pluginExportPath)) { + // Remove project.properties + if (File.Exists(_projectPropertiesV3ExportPath)) { + AssetDatabase.DeleteAsset(_projectPropertiesV3ExportPath); + } + + // Rename OneSignalConfig.plugin to OneSignalConfig.androidlib + AssetDatabase.MoveAsset(_pluginV3ExportPath, _pluginExportPath); + } else { + AssetDatabase.DeleteAsset(_pluginV3ExportPath); + } + } + + var files = Directory.GetFiles(_pluginPackagePath, "*", SearchOption.AllDirectories); - foreach (var file in filteredFiles) { + foreach (var file in files) { var trimmedPath = file.Remove(0, _pluginPackagePath.Length + 1); var fileExportPath = Path.Combine(_pluginExportPath, trimmedPath); var containingPath = fileExportPath.Remove(fileExportPath.LastIndexOf(Path.DirectorySeparatorChar)); @@ -93,7 +105,7 @@ protected override void _runStep() { AssetDatabase.Refresh(); } - private const string _pluginName = "OneSignalConfig.plugin"; + private const string _pluginName = "OneSignalConfig.androidlib"; private static readonly string _packagePath = Path.Combine("Packages", "com.onesignal.unity.android", "Editor"); private static readonly string _androidPluginsPath = Path.Combine("Assets", "Plugins", "Android"); @@ -102,5 +114,10 @@ protected override void _runStep() { private static readonly string _manifestPackagePath = Path.Combine(_pluginPackagePath, "AndroidManifest.xml"); private static readonly string _manifestExportPath = Path.Combine(_pluginExportPath, "AndroidManifest.xml"); + + // OneSignalConfig name used in the 3.x version of the SDK + private const string _pluginNamev3 = "OneSignalConfig.plugin"; + private static readonly string _pluginV3ExportPath = Path.Combine(_androidPluginsPath, _pluginNamev3); + private static readonly string _projectPropertiesV3ExportPath = Path.Combine(_pluginV3ExportPath, "project.properties"); } } \ No newline at end of file From fa9ea34c7964df16fea904051e897e4a88aa5243 Mon Sep 17 00:00:00 2001 From: Shepherd Date: Mon, 2 Oct 2023 20:30:35 -0400 Subject: [PATCH 06/21] Update CHANGELOG --- OneSignalExample/Assets/OneSignal/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/OneSignalExample/Assets/OneSignal/CHANGELOG.md b/OneSignalExample/Assets/OneSignal/CHANGELOG.md index bf89c142f..282aa9a90 100644 --- a/OneSignalExample/Assets/OneSignal/CHANGELOG.md +++ b/OneSignalExample/Assets/OneSignal/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Sending VSAttribution data from the editor - iOS notifications clicked event firing if the app was cold started from clicking a notification +- Android builds with minify enabled ## [5.0.2] ### Fixed From 938c6496375962ceb27d6f71a6d9707b63fbdbd3 Mon Sep 17 00:00:00 2001 From: Shepherd Date: Mon, 2 Oct 2023 20:35:16 -0400 Subject: [PATCH 07/21] Update minimum editor requirement to legacy LTS version --- OneSignalExample/Assets/OneSignal/README.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OneSignalExample/Assets/OneSignal/README.md b/OneSignalExample/Assets/OneSignal/README.md index 8379e4f8c..1109481c3 100644 --- a/OneSignalExample/Assets/OneSignal/README.md +++ b/OneSignalExample/Assets/OneSignal/README.md @@ -32,7 +32,7 @@ And via many additional platforms. [Check them all out](https://documentation.on ## Requirements - A [OneSignal Account](https://app.onesignal.com/signup) if you do not already have one - Your OneSignal App ID which you can find under **Settings > Keys & IDs** -- Unity 2018.4 or newer +- Unity 2021.3 or newer - iOS Builds: CocoaPods 1.11.3 or newer - In order to test push notifications you will need - An Android 4.0.3 or newer device or emulator with "Google Play services" installed diff --git a/README.md b/README.md index cb8b6a6f4..31cdcbeeb 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ And via many additional platforms. [Check them all out](https://documentation.on ## Requirements - A [OneSignal Account](https://app.onesignal.com/signup) if you do not already have one - Your OneSignal App ID which you can find under **Settings > Keys & IDs** -- Unity 2018.4 or newer +- Unity 2021.3 or newer - iOS Builds: CocoaPods 1.11.3 or newer - In order to test push notifications you will need - An Android 5 or newer device or emulator with "Google Play Store (Services)" installed From ab529190cebd4f40320a91c57fa3b37abefebd21 Mon Sep 17 00:00:00 2001 From: Shepherd Date: Mon, 2 Oct 2023 21:23:34 -0400 Subject: [PATCH 08/21] Update icon directory --- .../Editor/OneSignalConfig.androidlib/README.md | 14 +++++++------- .../drawable-hdpi/ic_stat_onesignal_default.png | Bin .../drawable-mdpi/ic_stat_onesignal_default.png | Bin .../drawable-xhdpi/ic_stat_onesignal_default.png | Bin .../drawable-xxhdpi/ic_stat_onesignal_default.png | Bin .../ic_onesignal_large_icon_default.png | Bin .../ic_stat_onesignal_default.png | Bin .../{ => src/main}/res/raw/notification.wav | Bin 8 files changed, 7 insertions(+), 7 deletions(-) rename com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/{ => src/main}/res/drawable-hdpi/ic_stat_onesignal_default.png (100%) rename com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/{ => src/main}/res/drawable-mdpi/ic_stat_onesignal_default.png (100%) rename com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/{ => src/main}/res/drawable-xhdpi/ic_stat_onesignal_default.png (100%) rename com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/{ => src/main}/res/drawable-xxhdpi/ic_stat_onesignal_default.png (100%) rename com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/{ => src/main}/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png (100%) rename com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/{ => src/main}/res/drawable-xxxhdpi/ic_stat_onesignal_default.png (100%) rename com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/{ => src/main}/res/raw/notification.wav (100%) diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md index a182c6513..d85f35cf1 100644 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md +++ b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md @@ -49,15 +49,15 @@ have already been done for you. ### Step 2 - Add icons to project If you have already run our SDK setup wizard (found in the Unity Editor via the `Window > OneSignal` menu) then you will already have the -`OneSignalConfig.plugin` imported into your project at the path `/Assets/Plugins/Android/OneSignalConfig.plugin`. If this is not the case +`OneSignalConfig.androidlib` imported into your project at the path `/Assets/Plugins/Android/OneSignalConfig.androidlib`. If this is not the case please run the step **"Copy Android plugin to Assets"** to do so. Once this is ready you can simply copy the files you made in step 1 to the correct paths: | Path | Density (dp) | Size (px) | |------------------------------------------------------------------------------------------------------------|--------------|-----------| -| Assets/Plugins/Android/OneSignalConfig.plugin/res/**drawable-mdpi**/ic_stat_onesignal_default.png | MDPI | 24x24 | -| Assets/Plugins/Android/OneSignalConfig.plugin/res/**drawable-hdpi**/ic_stat_onesignal_default.png | HDPI | 36x36 | -| Assets/Plugins/Android/OneSignalConfig.plugin/res/**drawable-xhdpi**/ic_stat_onesignal_default.png | XHDPI | 48x48 | -| Assets/Plugins/Android/OneSignalConfig.plugin/res/**drawable-xxhdpi**/ic_stat_onesignal_default.png | XXHDPI | 72x72 | -| Assets/Plugins/Android/OneSignalConfig.plugin/res/**drawable-xxxhdpi**/ic_stat_onesignal_default.png | XXXHDPI | 96x96 | -| Assets/Plugins/Android/OneSignalConfig.plugin/res/**drawable-xxxhdpi**/ic_onesignal_large_icon_default.png | XXXHDPI | 256x256 | \ No newline at end of file +| Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/**drawable-mdpi**/ic_stat_onesignal_default.png | MDPI | 24x24 | +| Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/**drawable-hdpi**/ic_stat_onesignal_default.png | HDPI | 36x36 | +| Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/**drawable-xhdpi**/ic_stat_onesignal_default.png | XHDPI | 48x48 | +| Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/**drawable-xxhdpi**/ic_stat_onesignal_default.png | XXHDPI | 72x72 | +| Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/**drawable-xxxhdpi**/ic_stat_onesignal_default.png | XXXHDPI | 96x96 | +| Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/**drawable-xxxhdpi**/ic_onesignal_large_icon_default.png | XXXHDPI | 256x256 | \ No newline at end of file diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-hdpi/ic_stat_onesignal_default.png b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-hdpi/ic_stat_onesignal_default.png similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-hdpi/ic_stat_onesignal_default.png rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-hdpi/ic_stat_onesignal_default.png diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-mdpi/ic_stat_onesignal_default.png b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-mdpi/ic_stat_onesignal_default.png similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-mdpi/ic_stat_onesignal_default.png rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-mdpi/ic_stat_onesignal_default.png diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xhdpi/ic_stat_onesignal_default.png b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-xhdpi/ic_stat_onesignal_default.png similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xhdpi/ic_stat_onesignal_default.png rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-xhdpi/ic_stat_onesignal_default.png diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxhdpi/ic_stat_onesignal_default.png b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-xxhdpi/ic_stat_onesignal_default.png similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxhdpi/ic_stat_onesignal_default.png rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-xxhdpi/ic_stat_onesignal_default.png diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi/ic_stat_onesignal_default.png b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-xxxhdpi/ic_stat_onesignal_default.png similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/drawable-xxxhdpi/ic_stat_onesignal_default.png rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/drawable-xxxhdpi/ic_stat_onesignal_default.png diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/raw/notification.wav b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/raw/notification.wav similarity index 100% rename from com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/res/raw/notification.wav rename to com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/src/main/res/raw/notification.wav From 52eca29be2596aba9470d10d9610586b0cb5823c Mon Sep 17 00:00:00 2001 From: Shepherd Date: Mon, 2 Oct 2023 21:33:00 -0400 Subject: [PATCH 09/21] Update OneSignalConfig references --- OneSignalExample/Assets/OneSignal/README.md | 4 ++-- .../Assets/OneSignalPackager/Editor/OneSignalSetupReset.cs | 4 ++-- README.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/OneSignalExample/Assets/OneSignal/README.md b/OneSignalExample/Assets/OneSignal/README.md index 1109481c3..c742bb8da 100644 --- a/OneSignalExample/Assets/OneSignal/README.md +++ b/OneSignalExample/Assets/OneSignal/README.md @@ -122,8 +122,8 @@ After building in Unity and exporting the XCode project follow these steps: ### Android Most of the Android setup was already handled during installation! -The only thing remaining is to setup your own notification icons. You can do this be replacing the example icons located at `Assets/Plugins/Android/OneSignalConfig.plugin` -with your own. There is a complete guide for this [in the plugin's README](com.onesignal.unity.android/Editor/OneSignalConfig.plugin/README.md). See our +The only thing remaining is to setup your own notification icons. You can do this be replacing the example icons located at `Assets/Plugins/Android/OneSignalConfig.androidlib` +with your own. There is a complete guide for this [in the plugin's README](com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md). See our [Customize Notification Icons](https://documentation.onesignal.com/docs/customize-notification-icons) page for additional details. ## Usage diff --git a/OneSignalExample/Assets/OneSignalPackager/Editor/OneSignalSetupReset.cs b/OneSignalExample/Assets/OneSignalPackager/Editor/OneSignalSetupReset.cs index c2acdd18d..1581a80d0 100644 --- a/OneSignalExample/Assets/OneSignalPackager/Editor/OneSignalSetupReset.cs +++ b/OneSignalExample/Assets/OneSignalPackager/Editor/OneSignalSetupReset.cs @@ -40,9 +40,9 @@ public static class OneSignalSetupReset { public static void ResetAllSteps() { /* * ExportAndroidResourcesStep - * deletes the OneSignalConfig.plugin directory + * deletes the OneSignalConfig.androidlib directory */ - AssetDatabase.DeleteAsset(Path.Combine("Assets", "Plugins", "Android", "OneSignalConfig.plugin")); + AssetDatabase.DeleteAsset(Path.Combine("Assets", "Plugins", "Android", "OneSignalConfig.androidlib")); /* * InstallEdm4UStep diff --git a/README.md b/README.md index 31cdcbeeb..f9b472682 100644 --- a/README.md +++ b/README.md @@ -129,8 +129,8 @@ In the Unity editor: Most of the Android setup was already handled during installation! -The only thing remaining is to setup your own notification icons. You can do this be replacing the example icons located at `Assets/Plugins/Android/OneSignalConfig.plugin` -with your own. There is a complete guide for this [in the plugin's README](com.onesignal.unity.android/Editor/OneSignalConfig.plugin/README.md). See our +The only thing remaining is to setup your own notification icons. You can do this be replacing the example icons located at `Assets/Plugins/Android/OneSignalConfig.androidlib` +with your own. There is a complete guide for this [in the plugin's README](com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md). See our [Customize Notification Icons](https://documentation.onesignal.com/docs/customize-notification-icons) page for additional details. ## Usage From 6f276b67cfb568fe53f416518b3cb8ec18b5c729 Mon Sep 17 00:00:00 2001 From: Shepherd Date: Mon, 2 Oct 2023 21:33:56 -0400 Subject: [PATCH 10/21] Remove unneeded step --- MIGRATION_GUIDE_v3_to_v5.md | 14 +++++++------- .../Assets/OneSignal/MIGRATION_GUIDE_v3_to_v5.md | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/MIGRATION_GUIDE_v3_to_v5.md b/MIGRATION_GUIDE_v3_to_v5.md index b4e00396e..62a683f27 100644 --- a/MIGRATION_GUIDE_v3_to_v5.md +++ b/MIGRATION_GUIDE_v3_to_v5.md @@ -31,7 +31,7 @@ OneSignal uses a built-in **alias label** called `external_id` which supports ex Follow one of the following sections based on your previous install method of the OneSignal SDK. ### Unity Package Manager -1. If you have them, delete the directory at `Assets/OneSignal` and the xml file at `Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml` +1. If you have it, delete the directory at `Assets/OneSignal` 2. In Unity, open **Window > Package Manager** 3. From the **Package Manager** window, select **Packages:** in the top left and click on **In Project** 4. Select the OneSignal Unity SDK(s) and press the **Upgrade to 5.x.x** button (make sure to update both Android and iOS packages) @@ -39,7 +39,7 @@ Follow one of the following sections based on your previous install method of th 6. Check the menu at **Window > OneSignal SDK Setup** to see if there are any remaining steps to run ### Unity Asset Store -1. Delete the directory at `Assets/OneSignal` and the xml file at `Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml` +1. Delete the directory at `Assets/OneSignal` 2. In Unity, open **Window > Package Manager** 3. From the **Package Manager** window, select **Packages:** in the top left and click on **My Assets** 4. Select the **OneSignal SDK** from the list and press the **Update** button. @@ -50,13 +50,13 @@ Follow one of the following sections based on your previous install method of th 9. Navigate back to the menu at **Window > OneSignal SDK Setup** to see if there are any remaining steps to run ### Unitypackage Distributable -1. Delete the directory at `Assets/OneSignal` and the xml file at `Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml` +1. Delete the directory at `Assets/OneSignal` 2. Download the latest release from our [releases page](https://github.com/OneSignal/OneSignal-Unity-SDK/releases) 3. In Unity, navigate to **Assets > Import Package > Custom Package...** and select the newly downloaded `*.unitypackage` file 4. Navigate to **Window > OneSignal SDK Setup** -7. Click **Run All Steps** -8. Follow the [API Reference](#api-reference) guide below to fix any compilation errors with the new namespaces and updated method calls -9. Navigate back to the menu at **Window > OneSignal SDK Setup** to see if there are any remaining steps to run +5. Click **Run All Steps** +6. Follow the [API Reference](#api-reference) guide below to fix any compilation errors with the new namespaces and updated method calls +7. Navigate back to the menu at **Window > OneSignal SDK Setup** to see if there are any remaining steps to run ## Code Modularization @@ -259,7 +259,7 @@ Assets/OneSignal/Example/OneSignalExampleBehaviou.cs: error CS0246: The type or Assets/OneSignal/Attribution/OneSignalVSAttribution.cs: error CS0117: 'OneSignal' does not contain a definition for '...' ``` -1. Delete the directory at `Assets/OneSignal` and the xml file at `Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml` +1. Delete the directory at `Assets/OneSignal` - If you would like to regenerate the OneSignal assets, remove the OneSignal Unity SDK packages (Android, Core, iOS) from your project and import the OneSignal SDK again. 2. Check the menu at **Window > OneSignal SDK Setup** to see if there are any remaining steps to run diff --git a/OneSignalExample/Assets/OneSignal/MIGRATION_GUIDE_v3_to_v5.md b/OneSignalExample/Assets/OneSignal/MIGRATION_GUIDE_v3_to_v5.md index b4e00396e..62a683f27 100644 --- a/OneSignalExample/Assets/OneSignal/MIGRATION_GUIDE_v3_to_v5.md +++ b/OneSignalExample/Assets/OneSignal/MIGRATION_GUIDE_v3_to_v5.md @@ -31,7 +31,7 @@ OneSignal uses a built-in **alias label** called `external_id` which supports ex Follow one of the following sections based on your previous install method of the OneSignal SDK. ### Unity Package Manager -1. If you have them, delete the directory at `Assets/OneSignal` and the xml file at `Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml` +1. If you have it, delete the directory at `Assets/OneSignal` 2. In Unity, open **Window > Package Manager** 3. From the **Package Manager** window, select **Packages:** in the top left and click on **In Project** 4. Select the OneSignal Unity SDK(s) and press the **Upgrade to 5.x.x** button (make sure to update both Android and iOS packages) @@ -39,7 +39,7 @@ Follow one of the following sections based on your previous install method of th 6. Check the menu at **Window > OneSignal SDK Setup** to see if there are any remaining steps to run ### Unity Asset Store -1. Delete the directory at `Assets/OneSignal` and the xml file at `Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml` +1. Delete the directory at `Assets/OneSignal` 2. In Unity, open **Window > Package Manager** 3. From the **Package Manager** window, select **Packages:** in the top left and click on **My Assets** 4. Select the **OneSignal SDK** from the list and press the **Update** button. @@ -50,13 +50,13 @@ Follow one of the following sections based on your previous install method of th 9. Navigate back to the menu at **Window > OneSignal SDK Setup** to see if there are any remaining steps to run ### Unitypackage Distributable -1. Delete the directory at `Assets/OneSignal` and the xml file at `Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml` +1. Delete the directory at `Assets/OneSignal` 2. Download the latest release from our [releases page](https://github.com/OneSignal/OneSignal-Unity-SDK/releases) 3. In Unity, navigate to **Assets > Import Package > Custom Package...** and select the newly downloaded `*.unitypackage` file 4. Navigate to **Window > OneSignal SDK Setup** -7. Click **Run All Steps** -8. Follow the [API Reference](#api-reference) guide below to fix any compilation errors with the new namespaces and updated method calls -9. Navigate back to the menu at **Window > OneSignal SDK Setup** to see if there are any remaining steps to run +5. Click **Run All Steps** +6. Follow the [API Reference](#api-reference) guide below to fix any compilation errors with the new namespaces and updated method calls +7. Navigate back to the menu at **Window > OneSignal SDK Setup** to see if there are any remaining steps to run ## Code Modularization @@ -259,7 +259,7 @@ Assets/OneSignal/Example/OneSignalExampleBehaviou.cs: error CS0246: The type or Assets/OneSignal/Attribution/OneSignalVSAttribution.cs: error CS0117: 'OneSignal' does not contain a definition for '...' ``` -1. Delete the directory at `Assets/OneSignal` and the xml file at `Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml` +1. Delete the directory at `Assets/OneSignal` - If you would like to regenerate the OneSignal assets, remove the OneSignal Unity SDK packages (Android, Core, iOS) from your project and import the OneSignal SDK again. 2. Check the menu at **Window > OneSignal SDK Setup** to see if there are any remaining steps to run From fda4e48d452e84b4386b62175fa57f1a1dbc0102 Mon Sep 17 00:00:00 2001 From: Shepherd Date: Tue, 3 Oct 2023 00:12:29 -0400 Subject: [PATCH 11/21] Update CHANGELOG --- OneSignalExample/Assets/OneSignal/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OneSignalExample/Assets/OneSignal/CHANGELOG.md b/OneSignalExample/Assets/OneSignal/CHANGELOG.md index 282aa9a90..4ad4cc2f9 100644 --- a/OneSignalExample/Assets/OneSignal/CHANGELOG.md +++ b/OneSignalExample/Assets/OneSignal/CHANGELOG.md @@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Sending VSAttribution data from the editor - iOS notifications clicked event firing if the app was cold started from clicking a notification -- Android builds with minify enabled +- ClassNotFoundException: com.onesignal.OneSignal for Android builds with minify enabled ## [5.0.2] ### Fixed From 11ddfdf3ed9943ecdf2d0f7cf4adf5241fd6725b Mon Sep 17 00:00:00 2001 From: Shepherd Date: Tue, 3 Oct 2023 08:00:55 -0400 Subject: [PATCH 12/21] Update build gradle Match compileSdkVersion of Android SDK and remove build tools version --- .../Editor/OneSignalConfig.androidlib/build.gradle | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/build.gradle b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/build.gradle index e940f1ffb..bae867d70 100644 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/build.gradle +++ b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/build.gradle @@ -11,8 +11,7 @@ android { consumerProguardFiles "consumer-proguard.pro" } - compileSdkVersion 32 - buildToolsVersion '32.0.0' + compileSdkVersion 31 lintOptions { abortOnError false From ee7efdc49c9cd990cf118f0ad596a7d80b38daba Mon Sep 17 00:00:00 2001 From: Shepherd Date: Tue, 3 Oct 2023 08:03:21 -0400 Subject: [PATCH 13/21] Update example app with OneSignalConfig.androidlib --- ...n.meta => OneSignalConfig.androidlib.meta} | 1 - .../AndroidManifest.xml | 0 .../README.md | 36 +++++++++--------- .../OneSignalConfig.androidlib/build.gradle | 19 +++++++++ .../consumer-proguard.pro | 3 ++ .../ic_stat_onesignal_default.png | Bin .../ic_stat_onesignal_default.png | Bin .../ic_stat_onesignal_default.png | Bin .../ic_stat_onesignal_default.png | Bin .../ic_onesignal_large_icon_default.png | Bin .../ic_stat_onesignal_default.png | Bin .../src/main}/res/raw/notification.wav | Bin .../AndroidManifest.xml.meta | 7 ---- .../OneSignalConfig.plugin/README.md.meta | 7 ---- .../OneSignalConfig.plugin/project.properties | 15 -------- .../project.properties.meta | 7 ---- .../Android/OneSignalConfig.plugin/res.meta | 8 ---- .../res/drawable-hdpi.meta | 8 ---- .../ic_stat_onesignal_default.png.meta | 7 ---- .../res/drawable-mdpi.meta | 8 ---- .../ic_stat_onesignal_default.png.meta | 7 ---- .../res/drawable-xhdpi.meta | 8 ---- .../ic_stat_onesignal_default.png.meta | 7 ---- .../res/drawable-xxhdpi.meta | 8 ---- .../ic_stat_onesignal_default.png.meta | 7 ---- .../res/drawable-xxxhdpi.meta | 8 ---- .../ic_onesignal_large_icon_default.png.meta | 7 ---- .../ic_stat_onesignal_default.png.meta | 7 ---- .../OneSignalConfig.plugin/res/raw.meta | 8 ---- .../res/raw/notification.wav.meta | 7 ---- 30 files changed, 40 insertions(+), 160 deletions(-) rename OneSignalExample/Assets/Plugins/Android/{OneSignalConfig.plugin.meta => OneSignalConfig.androidlib.meta} (97%) rename OneSignalExample/Assets/Plugins/Android/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/AndroidManifest.xml (100%) rename OneSignalExample/Assets/Plugins/Android/{OneSignalConfig.plugin => OneSignalConfig.androidlib}/README.md (64%) create mode 100644 OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/build.gradle create mode 100644 OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/consumer-proguard.pro rename OneSignalExample/Assets/Plugins/Android/{OneSignalConfig.plugin => OneSignalConfig.androidlib/src/main}/res/drawable-hdpi/ic_stat_onesignal_default.png (100%) rename OneSignalExample/Assets/Plugins/Android/{OneSignalConfig.plugin => OneSignalConfig.androidlib/src/main}/res/drawable-mdpi/ic_stat_onesignal_default.png (100%) rename OneSignalExample/Assets/Plugins/Android/{OneSignalConfig.plugin => OneSignalConfig.androidlib/src/main}/res/drawable-xhdpi/ic_stat_onesignal_default.png (100%) rename OneSignalExample/Assets/Plugins/Android/{OneSignalConfig.plugin => OneSignalConfig.androidlib/src/main}/res/drawable-xxhdpi/ic_stat_onesignal_default.png (100%) rename OneSignalExample/Assets/Plugins/Android/{OneSignalConfig.plugin => OneSignalConfig.androidlib/src/main}/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png (100%) rename OneSignalExample/Assets/Plugins/Android/{OneSignalConfig.plugin => OneSignalConfig.androidlib/src/main}/res/drawable-xxxhdpi/ic_stat_onesignal_default.png (100%) rename OneSignalExample/Assets/Plugins/Android/{OneSignalConfig.plugin => OneSignalConfig.androidlib/src/main}/res/raw/notification.wav (100%) delete mode 100644 OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml.meta delete mode 100644 OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/README.md.meta delete mode 100644 OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/project.properties delete mode 100644 OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/project.properties.meta delete mode 100644 OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res.meta delete mode 100644 OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-hdpi.meta delete mode 100644 OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-hdpi/ic_stat_onesignal_default.png.meta delete mode 100644 OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-mdpi.meta delete mode 100644 OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-mdpi/ic_stat_onesignal_default.png.meta delete mode 100644 OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xhdpi.meta delete mode 100644 OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xhdpi/ic_stat_onesignal_default.png.meta delete mode 100644 OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxhdpi.meta delete mode 100644 OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxhdpi/ic_stat_onesignal_default.png.meta delete mode 100644 OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi.meta delete mode 100644 OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png.meta delete mode 100644 OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_stat_onesignal_default.png.meta delete mode 100644 OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/raw.meta delete mode 100644 OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/raw/notification.wav.meta diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib.meta similarity index 97% rename from OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin.meta rename to OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib.meta index e64260426..73961b4a8 100644 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin.meta +++ b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib.meta @@ -1,6 +1,5 @@ fileFormatVersion: 2 guid: 006a8c36b25a144879a84c0bf1ce24a7 -folderAsset: yes PluginImporter: externalObjects: {} serializedVersion: 2 diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/AndroidManifest.xml similarity index 100% rename from OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml rename to OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/AndroidManifest.xml diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/README.md b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/README.md similarity index 64% rename from OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/README.md rename to OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/README.md index 981844c0f..d85f35cf1 100644 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/README.md +++ b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/README.md @@ -4,22 +4,22 @@ _see a more detailed version of this guide at https://documentation.onesignal.co Icons are a way to provide a more unique, branded experience for your Android and Amazon app. -You may add a default icon that appears with every notification you send, or you may add icons to just certain types of +You may add a default icon that appears with every notification you send, or you may add icons to just certain types of notifications. The below tutorial shows you how to do both. ## About Notification Icons Android supports both Small and Large Notification Icons. ### Small Notification Icons -The small icon is displayed on the top status bar as well as the notification itself. By default OneSignal will show a bell -icon, however we recommend you customize this so users recognize it's a notification from your app. Note that Android only -uses the alpha channel for the icon. It will display monochrome in the status bar but an accent color can be applied to the +The small icon is displayed on the top status bar as well as the notification itself. By default OneSignal will show a bell +icon, however we recommend you customize this so users recognize it's a notification from your app. Note that Android only +uses the alpha channel for the icon. It will display monochrome in the status bar but an accent color can be applied to the left side the notification itself. ### Large Notification Icons -The large notification icon will show up to the left of the notification text on Android 4.0.3 - 6.0 devices, and shows on -the right for Android 7.0+ devices. If you do not set a large icon, the small icon will be used instead. OneSignal will auto -scale large notification icons for you to prevent the icon from being cropped. The recommended size of the large icon is +The large notification icon will show up to the left of the notification text on Android 4.0.3 - 6.0 devices, and shows on +the right for Android 7.0+ devices. If you do not set a large icon, the small icon will be used instead. OneSignal will auto +scale large notification icons for you to prevent the icon from being cropped. The recommended size of the large icon is 256x256 pixels. ## How to Add Default Icons @@ -27,7 +27,7 @@ We **strongly** recommend adding default icons to every Android and Amazon app. ### Step 1 - Generate Icons #### Option A: Using Android Asset Studio _(Recommended)_ -To quickly and easily generate small icons with the correct settings, we recommend using the Android Asset Studio. Use +To quickly and easily generate small icons with the correct settings, we recommend using the Android Asset Studio. Use **ic_stat_onesignal_default** as the name. #### Option B: Manually Create Icons @@ -44,20 +44,20 @@ If you prefer to create your own icons, you must make your icons the following s > Required: Each name and pixel size must be present in the app. -You must be sure the icon filenames are correct as per the above table. If you used Android Asset Studio for your small icon then this step may +You must be sure the icon filenames are correct as per the above table. If you used Android Asset Studio for your small icon then this step may have already been done for you. ### Step 2 - Add icons to project -If you have already run our SDK setup wizard (found in the Unity Editor via the `Window > OneSignal` menu) then you will already have the -`OneSignalConfig.plugin` imported into your project at the path `/Assets/Plugins/Android/OneSignalConfig.plugin`. If this is not the case -please run the step **"Copy Android plugin to Assets"** to do so. Once this is ready you can simply copy the files you made in step 1 to +If you have already run our SDK setup wizard (found in the Unity Editor via the `Window > OneSignal` menu) then you will already have the +`OneSignalConfig.androidlib` imported into your project at the path `/Assets/Plugins/Android/OneSignalConfig.androidlib`. If this is not the case +please run the step **"Copy Android plugin to Assets"** to do so. Once this is ready you can simply copy the files you made in step 1 to the correct paths: | Path | Density (dp) | Size (px) | |------------------------------------------------------------------------------------------------------------|--------------|-----------| -| Assets/Plugins/Android/OneSignalConfig.plugin/res/**drawable-mdpi**/ic_stat_onesignal_default.png | MDPI | 24x24 | -| Assets/Plugins/Android/OneSignalConfig.plugin/res/**drawable-hdpi**/ic_stat_onesignal_default.png | HDPI | 36x36 | -| Assets/Plugins/Android/OneSignalConfig.plugin/res/**drawable-xhdpi**/ic_stat_onesignal_default.png | XHDPI | 48x48 | -| Assets/Plugins/Android/OneSignalConfig.plugin/res/**drawable-xxhdpi**/ic_stat_onesignal_default.png | XXHDPI | 72x72 | -| Assets/Plugins/Android/OneSignalConfig.plugin/res/**drawable-xxxhdpi**/ic_stat_onesignal_default.png | XXXHDPI | 96x96 | -| Assets/Plugins/Android/OneSignalConfig.plugin/res/**drawable-xxxhdpi**/ic_onesignal_large_icon_default.png | XXXHDPI | 256x256 | \ No newline at end of file +| Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/**drawable-mdpi**/ic_stat_onesignal_default.png | MDPI | 24x24 | +| Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/**drawable-hdpi**/ic_stat_onesignal_default.png | HDPI | 36x36 | +| Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/**drawable-xhdpi**/ic_stat_onesignal_default.png | XHDPI | 48x48 | +| Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/**drawable-xxhdpi**/ic_stat_onesignal_default.png | XXHDPI | 72x72 | +| Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/**drawable-xxxhdpi**/ic_stat_onesignal_default.png | XXXHDPI | 96x96 | +| Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/**drawable-xxxhdpi**/ic_onesignal_large_icon_default.png | XXXHDPI | 256x256 | \ No newline at end of file diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/build.gradle b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/build.gradle new file mode 100644 index 000000000..bae867d70 --- /dev/null +++ b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/build.gradle @@ -0,0 +1,19 @@ +apply plugin: 'com.android.library' + +android { + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + } + } + + defaultConfig { + consumerProguardFiles "consumer-proguard.pro" + } + + compileSdkVersion 31 + + lintOptions { + abortOnError false + } +} \ No newline at end of file diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/consumer-proguard.pro b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/consumer-proguard.pro new file mode 100644 index 000000000..f895a55b0 --- /dev/null +++ b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/consumer-proguard.pro @@ -0,0 +1,3 @@ +-keep class com.onesignal.** { *; } + +-keep class kotlinx.coroutines.android.AndroidDispatcherFactory {*;} \ No newline at end of file diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-hdpi/ic_stat_onesignal_default.png b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-hdpi/ic_stat_onesignal_default.png similarity index 100% rename from OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-hdpi/ic_stat_onesignal_default.png rename to OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-hdpi/ic_stat_onesignal_default.png diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-mdpi/ic_stat_onesignal_default.png b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-mdpi/ic_stat_onesignal_default.png similarity index 100% rename from OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-mdpi/ic_stat_onesignal_default.png rename to OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-mdpi/ic_stat_onesignal_default.png diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xhdpi/ic_stat_onesignal_default.png b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-xhdpi/ic_stat_onesignal_default.png similarity index 100% rename from OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xhdpi/ic_stat_onesignal_default.png rename to OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-xhdpi/ic_stat_onesignal_default.png diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxhdpi/ic_stat_onesignal_default.png b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-xxhdpi/ic_stat_onesignal_default.png similarity index 100% rename from OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxhdpi/ic_stat_onesignal_default.png rename to OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-xxhdpi/ic_stat_onesignal_default.png diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png similarity index 100% rename from OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png rename to OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_stat_onesignal_default.png b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-xxxhdpi/ic_stat_onesignal_default.png similarity index 100% rename from OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_stat_onesignal_default.png rename to OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/drawable-xxxhdpi/ic_stat_onesignal_default.png diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/raw/notification.wav b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/raw/notification.wav similarity index 100% rename from OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/raw/notification.wav rename to OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/src/main/res/raw/notification.wav diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml.meta deleted file mode 100644 index 8b2ee1311..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/AndroidManifest.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: c660f22014d731d409548dbcffb48410 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/README.md.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/README.md.meta deleted file mode 100644 index d8653fac1..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/README.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 80c03616b560321448802f2da1749596 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/project.properties b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/project.properties deleted file mode 100644 index 03d06171e..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/project.properties +++ /dev/null @@ -1,15 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system edit -# "ant.properties", and override values to adapt the script to your -# project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt - -# Project target. -target=android-10 -android.library=true diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/project.properties.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/project.properties.meta deleted file mode 100644 index efde9bec7..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/project.properties.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 3c8ec38c31fc87a4e8a72daab770d799 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res.meta deleted file mode 100644 index 77bc29764..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 885447b9378cb9c44a10f1dfa5a68260 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-hdpi.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-hdpi.meta deleted file mode 100644 index 81b5636b6..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-hdpi.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3972c2991c42f404ca424fcb30392ad8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-hdpi/ic_stat_onesignal_default.png.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-hdpi/ic_stat_onesignal_default.png.meta deleted file mode 100644 index b86735ddf..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-hdpi/ic_stat_onesignal_default.png.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: f9030c0de9fe47d4bb79c8a920aa2efd -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-mdpi.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-mdpi.meta deleted file mode 100644 index ffefacc67..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-mdpi.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ac413c47ff2cc34fbb49f02d84e0750 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-mdpi/ic_stat_onesignal_default.png.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-mdpi/ic_stat_onesignal_default.png.meta deleted file mode 100644 index 422daffce..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-mdpi/ic_stat_onesignal_default.png.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 7bbacdc3393327243b0bdc01d30f117d -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xhdpi.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xhdpi.meta deleted file mode 100644 index 319a4ceea..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xhdpi.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 2b6f77d3678336c4f86bdfd0c9820715 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xhdpi/ic_stat_onesignal_default.png.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xhdpi/ic_stat_onesignal_default.png.meta deleted file mode 100644 index 0b743da9d..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xhdpi/ic_stat_onesignal_default.png.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 3c87da0c54216e84caf4746a30ebf510 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxhdpi.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxhdpi.meta deleted file mode 100644 index 0a37bf473..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxhdpi.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: faea4b5a01659ae489741a7ff3e41269 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxhdpi/ic_stat_onesignal_default.png.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxhdpi/ic_stat_onesignal_default.png.meta deleted file mode 100644 index 79a741900..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxhdpi/ic_stat_onesignal_default.png.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 2e292cba7efed2f4686c750031e9f251 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi.meta deleted file mode 100644 index bb55fb780..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7938fd291e36a9244b535520b2a159a6 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png.meta deleted file mode 100644 index 24e2d77f0..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_onesignal_large_icon_default.png.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: d90fd5dce6d1e294bbea338f5ce83495 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_stat_onesignal_default.png.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_stat_onesignal_default.png.meta deleted file mode 100644 index 56caf42d3..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/drawable-xxxhdpi/ic_stat_onesignal_default.png.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 7b63fb7e6a8e0964d9d6196110e43b75 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/raw.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/raw.meta deleted file mode 100644 index 0be0a5289..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/raw.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3fa5d641baed44a49a9845bda873b762 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/raw/notification.wav.meta b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/raw/notification.wav.meta deleted file mode 100644 index 7d8594fd2..000000000 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.plugin/res/raw/notification.wav.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 5df96d8887319fc4e8808c88e0fa36d4 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: From 33cfc631ba15ef79c1ab32cb0bfe4fb06a5cc780 Mon Sep 17 00:00:00 2001 From: Shepherd Date: Tue, 3 Oct 2023 13:50:55 -0400 Subject: [PATCH 14/21] Update CHANGELOG --- OneSignalExample/Assets/OneSignal/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OneSignalExample/Assets/OneSignal/CHANGELOG.md b/OneSignalExample/Assets/OneSignal/CHANGELOG.md index 4ad4cc2f9..49366b8a3 100644 --- a/OneSignalExample/Assets/OneSignal/CHANGELOG.md +++ b/OneSignalExample/Assets/OneSignal/CHANGELOG.md @@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Sending VSAttribution data from the editor - iOS notifications clicked event firing if the app was cold started from clicking a notification -- ClassNotFoundException: com.onesignal.OneSignal for Android builds with minify enabled +- ClassNotFoundException: com.onesignal.OneSignal for Android builds with minify enabled. You must run the "Copy Android plugin to Assets" step in **Window > OneSignal SDK Setup**. ## [5.0.2] ### Fixed From ac5322314110a5085d6ab14b6a72cbea78e2910b Mon Sep 17 00:00:00 2001 From: Shepherd Date: Tue, 3 Oct 2023 13:51:30 -0400 Subject: [PATCH 15/21] Update comment --- .../Editor/SetupSteps/ExportAndroidResourcesStep.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs b/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs index a718f4512..86c123ac1 100644 --- a/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs +++ b/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs @@ -115,7 +115,7 @@ protected override void _runStep() { private static readonly string _manifestPackagePath = Path.Combine(_pluginPackagePath, "AndroidManifest.xml"); private static readonly string _manifestExportPath = Path.Combine(_pluginExportPath, "AndroidManifest.xml"); - // OneSignalConfig name used in the 3.x version of the SDK + // Old OneSignalConfig name used from 3.x.x to 5.0.2 private const string _pluginNamev3 = "OneSignalConfig.plugin"; private static readonly string _pluginV3ExportPath = Path.Combine(_androidPluginsPath, _pluginNamev3); private static readonly string _projectPropertiesV3ExportPath = Path.Combine(_pluginV3ExportPath, "project.properties"); From 332762244440a573bc66eb4bd545ee173fbe39ea Mon Sep 17 00:00:00 2001 From: Shepherd Date: Tue, 3 Oct 2023 13:53:10 -0400 Subject: [PATCH 16/21] Move logic to helper method --- .../SetupSteps/ExportAndroidResourcesStep.cs | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs b/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs index 86c123ac1..bee504527 100644 --- a/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs +++ b/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs @@ -66,19 +66,7 @@ protected override bool _getIsStepCompleted() { } protected override void _runStep() { - if (Directory.Exists(_pluginV3ExportPath)) { - if (!Directory.Exists(_pluginExportPath)) { - // Remove project.properties - if (File.Exists(_projectPropertiesV3ExportPath)) { - AssetDatabase.DeleteAsset(_projectPropertiesV3ExportPath); - } - - // Rename OneSignalConfig.plugin to OneSignalConfig.androidlib - AssetDatabase.MoveAsset(_pluginV3ExportPath, _pluginExportPath); - } else { - AssetDatabase.DeleteAsset(_pluginV3ExportPath); - } - } + migratePluginToAndroidlib(); var files = Directory.GetFiles(_pluginPackagePath, "*", SearchOption.AllDirectories); @@ -105,6 +93,22 @@ protected override void _runStep() { AssetDatabase.Refresh(); } + private void migratePluginToAndroidlib() { + if (Directory.Exists(_pluginV3ExportPath)) { + if (!Directory.Exists(_pluginExportPath)) { + // Remove project.properties + if (File.Exists(_projectPropertiesV3ExportPath)) { + AssetDatabase.DeleteAsset(_projectPropertiesV3ExportPath); + } + + // Rename OneSignalConfig.plugin to OneSignalConfig.androidlib + AssetDatabase.MoveAsset(_pluginV3ExportPath, _pluginExportPath); + } else { + AssetDatabase.DeleteAsset(_pluginV3ExportPath); + } + } + } + private const string _pluginName = "OneSignalConfig.androidlib"; private static readonly string _packagePath = Path.Combine("Packages", "com.onesignal.unity.android", "Editor"); private static readonly string _androidPluginsPath = Path.Combine("Assets", "Plugins", "Android"); From 899975cd7e8a9b18ab0d8b86f31bbe32cb46cd1b Mon Sep 17 00:00:00 2001 From: Shepherd Date: Tue, 3 Oct 2023 14:07:46 -0400 Subject: [PATCH 17/21] Add comment to indicate work around for kotlinx-coroutines-android --- .../Editor/OneSignalConfig.androidlib/consumer-proguard.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/consumer-proguard.pro b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/consumer-proguard.pro index f895a55b0..1eb572fe4 100644 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/consumer-proguard.pro +++ b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/consumer-proguard.pro @@ -1,3 +1,4 @@ -keep class com.onesignal.** { *; } +# Work around for IllegalStateException with kotlinx-coroutines-android -keep class kotlinx.coroutines.android.AndroidDispatcherFactory {*;} \ No newline at end of file From 098e3813db8c2b4c645ef714aef95e68dc33d5f9 Mon Sep 17 00:00:00 2001 From: Shepherd Date: Tue, 3 Oct 2023 19:30:06 -0400 Subject: [PATCH 18/21] Move icons and .wav file to /src/main --- .../SetupSteps/ExportAndroidResourcesStep.cs | 35 +++++++++++++++---- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs b/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs index bee504527..0a2baf1b2 100644 --- a/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs +++ b/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs @@ -96,13 +96,29 @@ protected override void _runStep() { private void migratePluginToAndroidlib() { if (Directory.Exists(_pluginV3ExportPath)) { if (!Directory.Exists(_pluginExportPath)) { - // Remove project.properties - if (File.Exists(_projectPropertiesV3ExportPath)) { - AssetDatabase.DeleteAsset(_projectPropertiesV3ExportPath); + try + { + AssetDatabase.StartAssetEditing(); + + // Remove project.properties + if (File.Exists(_projectPropertiesV3ExportPath)) { + AssetDatabase.DeleteAsset(_projectPropertiesV3ExportPath); + } + + // Rename OneSignalConfig.plugin to OneSignalConfig.androidlib + AssetDatabase.MoveAsset(_pluginV3ExportPath, _pluginExportPath); } + finally + { + AssetDatabase.StopAssetEditing(); + } + + // Move the icons and .wav file to /src/main + if (Directory.Exists(_resV3ExportPath)) { + Directory.CreateDirectory(Path.GetDirectoryName(_resExportPath)); - // Rename OneSignalConfig.plugin to OneSignalConfig.androidlib - AssetDatabase.MoveAsset(_pluginV3ExportPath, _pluginExportPath); + FileUtil.MoveFileOrDirectory(_resV3ExportPath, _resExportPath); + } } else { AssetDatabase.DeleteAsset(_pluginV3ExportPath); } @@ -119,9 +135,14 @@ private void migratePluginToAndroidlib() { private static readonly string _manifestPackagePath = Path.Combine(_pluginPackagePath, "AndroidManifest.xml"); private static readonly string _manifestExportPath = Path.Combine(_pluginExportPath, "AndroidManifest.xml"); + private const string _resPath = "src/main/res"; + private static readonly string _resExportPath = Path.Combine(_pluginExportPath, _resPath); + // Old OneSignalConfig name used from 3.x.x to 5.0.2 - private const string _pluginNamev3 = "OneSignalConfig.plugin"; - private static readonly string _pluginV3ExportPath = Path.Combine(_androidPluginsPath, _pluginNamev3); + private const string _pluginNameV3 = "OneSignalConfig.plugin"; + private static readonly string _pluginV3ExportPath = Path.Combine(_androidPluginsPath, _pluginNameV3); private static readonly string _projectPropertiesV3ExportPath = Path.Combine(_pluginV3ExportPath, "project.properties"); + private const string _resV3Path = "res"; + private static readonly string _resV3ExportPath = Path.Combine(_pluginExportPath, _resV3Path); } } \ No newline at end of file From 7bbe6631c7841eb0d6e23d2e607dccb9f247220b Mon Sep 17 00:00:00 2001 From: Shepherd Date: Tue, 3 Oct 2023 19:55:44 -0400 Subject: [PATCH 19/21] Capitalize method name --- .../Editor/SetupSteps/ExportAndroidResourcesStep.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs b/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs index 0a2baf1b2..a0bfcd3da 100644 --- a/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs +++ b/com.onesignal.unity.android/Editor/SetupSteps/ExportAndroidResourcesStep.cs @@ -66,7 +66,7 @@ protected override bool _getIsStepCompleted() { } protected override void _runStep() { - migratePluginToAndroidlib(); + MigratePluginToAndroidlib(); var files = Directory.GetFiles(_pluginPackagePath, "*", SearchOption.AllDirectories); @@ -93,7 +93,7 @@ protected override void _runStep() { AssetDatabase.Refresh(); } - private void migratePluginToAndroidlib() { + private void MigratePluginToAndroidlib() { if (Directory.Exists(_pluginV3ExportPath)) { if (!Directory.Exists(_pluginExportPath)) { try From 5e7ca624ccb45b0cc3a5e6156876f9adc0886d3a Mon Sep 17 00:00:00 2001 From: Shepherd Date: Wed, 4 Oct 2023 12:31:31 -0400 Subject: [PATCH 20/21] Update setup name --- .../Editor/OneSignalConfig.androidlib/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md index d85f35cf1..75fdcf6c9 100644 --- a/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md +++ b/com.onesignal.unity.android/Editor/OneSignalConfig.androidlib/README.md @@ -48,7 +48,7 @@ You must be sure the icon filenames are correct as per the above table. If you u have already been done for you. ### Step 2 - Add icons to project -If you have already run our SDK setup wizard (found in the Unity Editor via the `Window > OneSignal` menu) then you will already have the +If you have already run our SDK setup wizard (found in the Unity Editor via the `Window > OneSignal SDK Setup` menu) then you will already have the `OneSignalConfig.androidlib` imported into your project at the path `/Assets/Plugins/Android/OneSignalConfig.androidlib`. If this is not the case please run the step **"Copy Android plugin to Assets"** to do so. Once this is ready you can simply copy the files you made in step 1 to the correct paths: From 819d6bc4f51aede60a8c7a60183d1190d9247bb4 Mon Sep 17 00:00:00 2001 From: Shepherd Date: Wed, 4 Oct 2023 12:38:52 -0400 Subject: [PATCH 21/21] Update example app androidlib with nit fixes Ran setup step again to apply androidlib nit fixes --- .../Assets/Plugins/Android/OneSignalConfig.androidlib/README.md | 2 +- .../Android/OneSignalConfig.androidlib/consumer-proguard.pro | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/README.md b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/README.md index d85f35cf1..75fdcf6c9 100644 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/README.md +++ b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/README.md @@ -48,7 +48,7 @@ You must be sure the icon filenames are correct as per the above table. If you u have already been done for you. ### Step 2 - Add icons to project -If you have already run our SDK setup wizard (found in the Unity Editor via the `Window > OneSignal` menu) then you will already have the +If you have already run our SDK setup wizard (found in the Unity Editor via the `Window > OneSignal SDK Setup` menu) then you will already have the `OneSignalConfig.androidlib` imported into your project at the path `/Assets/Plugins/Android/OneSignalConfig.androidlib`. If this is not the case please run the step **"Copy Android plugin to Assets"** to do so. Once this is ready you can simply copy the files you made in step 1 to the correct paths: diff --git a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/consumer-proguard.pro b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/consumer-proguard.pro index f895a55b0..1eb572fe4 100644 --- a/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/consumer-proguard.pro +++ b/OneSignalExample/Assets/Plugins/Android/OneSignalConfig.androidlib/consumer-proguard.pro @@ -1,3 +1,4 @@ -keep class com.onesignal.** { *; } +# Work around for IllegalStateException with kotlinx-coroutines-android -keep class kotlinx.coroutines.android.AndroidDispatcherFactory {*;} \ No newline at end of file