diff --git a/plugins/2023.3693/android/.DS_Store b/plugins/2023.3693/android/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/plugins/2023.3693/android/.DS_Store differ diff --git a/plugins/2023.3693/android/corona.gradle b/plugins/2023.3693/android/corona.gradle new file mode 100644 index 0000000..14df463 --- /dev/null +++ b/plugins/2023.3693/android/corona.gradle @@ -0,0 +1,7 @@ +android.defaultConfig { + minSdkVersion Math.max(minSdkVersion?.apiLevel ?: 15, 19) +} +ext["minSdkVersion"] = Math.max(ext.find("minSdkVersion")?:15, 19) +dependencies { + implementation 'com.google.firebase:firebase-messaging:23.2.1' +} diff --git a/plugins/2023.3693/android/plugin-notifications-v2.aar b/plugins/2023.3693/android/plugin-notifications-v2.aar new file mode 100644 index 0000000..a59d451 Binary files /dev/null and b/plugins/2023.3693/android/plugin-notifications-v2.aar differ diff --git a/plugins/2023.3693/iphone-sim/libNotificationsV2Plugin.a b/plugins/2023.3693/iphone-sim/libNotificationsV2Plugin.a new file mode 100644 index 0000000..955eedc Binary files /dev/null and b/plugins/2023.3693/iphone-sim/libNotificationsV2Plugin.a differ diff --git a/plugins/2023.3693/iphone-sim/metadata.lua b/plugins/2023.3693/iphone-sim/metadata.lua new file mode 100644 index 0000000..0d8628f --- /dev/null +++ b/plugins/2023.3693/iphone-sim/metadata.lua @@ -0,0 +1,13 @@ +local metadata = +{ + plugin = + { + format = "staticLibrary", + staticLibs = { 'NotificationsV2Plugin', }, + frameworks = { }, + frameworksOptional = { "UserNotifications", "UserNotificationsUI" }, + delegates = { "CoronaNotificationsDelegate" } + } +} + +return metadata diff --git a/plugins/2023.3693/iphone/libNotificationsV2Plugin.a b/plugins/2023.3693/iphone/libNotificationsV2Plugin.a new file mode 100644 index 0000000..ce90a9c Binary files /dev/null and b/plugins/2023.3693/iphone/libNotificationsV2Plugin.a differ diff --git a/plugins/2023.3693/iphone/metadata.lua b/plugins/2023.3693/iphone/metadata.lua new file mode 100644 index 0000000..0d8628f --- /dev/null +++ b/plugins/2023.3693/iphone/metadata.lua @@ -0,0 +1,13 @@ +local metadata = +{ + plugin = + { + format = "staticLibrary", + staticLibs = { 'NotificationsV2Plugin', }, + frameworks = { }, + frameworksOptional = { "UserNotifications", "UserNotificationsUI" }, + delegates = { "CoronaNotificationsDelegate" } + } +} + +return metadata diff --git a/plugins/2023.3693/mac-sim/plugin_notifications_v2.lua b/plugins/2023.3693/mac-sim/plugin_notifications_v2.lua new file mode 100644 index 0000000..fc274fc --- /dev/null +++ b/plugins/2023.3693/mac-sim/plugin_notifications_v2.lua @@ -0,0 +1,50 @@ +-- Notifications V2 plugin + +local Library = require "CoronaLibrary" + +-- Create library +local lib = Library:new{ name="plugin.notifications.v2", publisherId="com.coronalabs", version=1 } + +------------------------------------------------------------------------------- +-- BEGIN +------------------------------------------------------------------------------- + +-- This sample implements the following Lua: +-- +-- local notifications = require "plugin.notifications.v2" +-- + +local function showWarning(functionName) + print( functionName .. " WARNING: The Notifications V2 plugin is only supported on iOS and Android devices") +end + +function lib.registerForPushNotifications() + showWarning("notifications.registerForPushNotifications()") +end + +function lib.subscribe() + showWarning("notifications.subscribe()") +end + +function lib.unsubscribe() + showWarning("notifications.unsubscribe()") +end + +function lib.getDeviceToken() + showWarning("notifications.getDeviceToken()") +end + +function lib.scheduleNotification() + showWarning("notifications.scheduleNotification()") +end + +function lib.cancelNotification() + showWarning("notifications.cancelNotification()") +end + +------------------------------------------------------------------------------- +-- END +------------------------------------------------------------------------------- + +-- Return an instance +return lib diff --git a/plugins/2023.3693/win32-sim/plugin_notifications_v2.lua b/plugins/2023.3693/win32-sim/plugin_notifications_v2.lua new file mode 100644 index 0000000..fc274fc --- /dev/null +++ b/plugins/2023.3693/win32-sim/plugin_notifications_v2.lua @@ -0,0 +1,50 @@ +-- Notifications V2 plugin + +local Library = require "CoronaLibrary" + +-- Create library +local lib = Library:new{ name="plugin.notifications.v2", publisherId="com.coronalabs", version=1 } + +------------------------------------------------------------------------------- +-- BEGIN +------------------------------------------------------------------------------- + +-- This sample implements the following Lua: +-- +-- local notifications = require "plugin.notifications.v2" +-- + +local function showWarning(functionName) + print( functionName .. " WARNING: The Notifications V2 plugin is only supported on iOS and Android devices") +end + +function lib.registerForPushNotifications() + showWarning("notifications.registerForPushNotifications()") +end + +function lib.subscribe() + showWarning("notifications.subscribe()") +end + +function lib.unsubscribe() + showWarning("notifications.unsubscribe()") +end + +function lib.getDeviceToken() + showWarning("notifications.getDeviceToken()") +end + +function lib.scheduleNotification() + showWarning("notifications.scheduleNotification()") +end + +function lib.cancelNotification() + showWarning("notifications.cancelNotification()") +end + +------------------------------------------------------------------------------- +-- END +------------------------------------------------------------------------------- + +-- Return an instance +return lib