havesource / cordova-plugin-push

Register and receive push notifications
MIT License
148 stars 283 forks source link

Status current version #235

Closed MauPoLom closed 11 months ago

MauPoLom commented 1 year ago

Hi there,

First off all, thank you for creating this wonderful plugin, which has worked for many years now.

Unfortunately Google requires that I update my app to enable it on newer devices, and as you may have guessed ...this did open a can of worms.

I've read through the issues: opened and closed and I came to the following conclusion:

Current official release (3.0.1) will crash Android 12 & 13 devices, (i see the message in the logcat but after that it crashes. On IOS this release won't build 228, workaround is in the thread

Dev 4.0.0 release, will avoid the crash on Android but still no push-notification is delivered. Issue probably handled at 215

IOS status of this version is unknown?

Or did I miss/misread something?

Are there any working alternatives out-of-the-box?

With the utmost regard

Mau

lordStrider commented 1 year ago

Version dev4.0.0 works on android 12 without problems with push notifications, but on IOS push notifications don't work. In android if you was problems in kotlin version set in your config xml this code. <preference name="GradlePluginKotlinVersion" value="1.7.10" /> Don't forget to download cordova-plugin-local-notification-12 and cordova-plugin-background-mode. I hope I was helpfull.

juniortarcisio commented 11 months ago

Hi, thanks for sharing these advises, but I am still getting a Gradle issues, that's what I have tried:

Using the version 3.x it works for Android 11 or early, but It crashes on Android 12,13+.

Using the version 4.0.0.dev0 I am not being able to build even after adding the Kotlin version to "1.7.10", I am getting the error:

cordova-plugin-push::before-compile] skipping before_compile hookscript.
Checking Java JDK and Android SDK versions
ANDROID_HOME=undefined (recommended setting)
ANDROID_SDK_ROOT=undefined (DEPRECATED)
Using Android SDK: /Users/-/Library/Android/sdk
Reading build config file: /Users/-/Desktop/--app-master/cordova/tmp_20231005-191929/build.json
Reading the keystore from: /Users/-/Desktop/--app-master/cordova/debug.keystore
Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 4s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app

> Configure project :app
Adding classpath: com.google.gms:google-services:4.3.8
Warning: The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin.

> Task :CordovaLib:compileDebugRenderscript
The RenderScript APIs are deprecated. They will be removed in Android Gradle plugin 9.0. See the following link for a guide to migrate from RenderScript: https://developer.android.com/guide/topics/renderscript/migrate

> Task :CordovaLib:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :app:compileDebugKotlin FAILED
e: /Users/-/Desktop/--app-master/cordova/tmp_20231005-191929/platforms/android/app/src/main/java/com/adobe/phonegap/push/PushPlugin.kt: (466, 57): Unresolved reference: token
e: /Users/-/Desktop/--app-master/cordova/tmp_20231005-191929/platforms/android/app/src/main/java/com/adobe/phonegap/push/PushPlugin.kt: (619, 57): Unresolved reference: deleteToken

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details
erisu commented 11 months ago

Version 4.0.0 was released.

I am closing this ticket since the "Status of the Version" is "Released".

Please reinstall the plugin and test with the latest version.

If there are any issues, open a new ticket and fill out the ticket's template. Also try and focus one issue per ticket. The other above comments should also be resolved, but again, if the issue still exists, open a new ticket and fill out the template.