fix(ios): resolve build errors and add missing configureNativeFetcher method
Fixed Swift compilation errors preventing iOS build: - Added explicit self capture [self] in closures in DailyNotificationReactivationManager - Removed invalid BGTaskScheduler.shared.registeredTaskIdentifiers API call - Fixed initialization order in DailyNotificationModel (verifyEntities after container init) Added missing configureNativeFetcher method to iOS plugin: - Implemented method matching Android functionality - Stores configuration in UserDefaults for persistence - Registered method in pluginMethods array - Supports both jwtToken and jwtSecret parameters for compatibility This resolves the runtime error "configureNativeFetcher is not a function" that was preventing the test app from configuring the plugin.
This commit is contained in:
@@ -164,8 +164,8 @@ extension NotificationConfig {
|
||||
* @param configKey Configuration key
|
||||
* @return NotificationConfig entity or nil
|
||||
*/
|
||||
static func fetch(
|
||||
by configKey: String,
|
||||
static func fetchByConfigKey(
|
||||
_ configKey: String,
|
||||
in context: NSManagedObjectContext
|
||||
) -> NotificationConfig? {
|
||||
let request: NSFetchRequest<NotificationConfig> = NotificationConfig.fetchRequest()
|
||||
@@ -207,8 +207,8 @@ extension NotificationConfig {
|
||||
* @param timesafariDid TimeSafari device ID
|
||||
* @return Array of NotificationConfig entities
|
||||
*/
|
||||
static func query(
|
||||
by timesafariDid: String,
|
||||
static func queryByTimesafariDid(
|
||||
_ timesafariDid: String,
|
||||
in context: NSManagedObjectContext
|
||||
) -> [NotificationConfig] {
|
||||
let request: NSFetchRequest<NotificationConfig> = NotificationConfig.fetchRequest()
|
||||
@@ -230,8 +230,8 @@ extension NotificationConfig {
|
||||
* @param configType Configuration type
|
||||
* @return Array of NotificationConfig entities
|
||||
*/
|
||||
static func query(
|
||||
by configType: String,
|
||||
static func queryByConfigType(
|
||||
_ configType: String,
|
||||
in context: NSManagedObjectContext
|
||||
) -> [NotificationConfig] {
|
||||
let request: NSFetchRequest<NotificationConfig> = NotificationConfig.fetchRequest()
|
||||
@@ -362,11 +362,11 @@ extension NotificationConfig {
|
||||
* @param configKey Configuration key
|
||||
* @return true if deleted, false otherwise
|
||||
*/
|
||||
static func delete(
|
||||
by configKey: String,
|
||||
static func deleteByConfigKey(
|
||||
_ configKey: String,
|
||||
in context: NSManagedObjectContext
|
||||
) -> Bool {
|
||||
guard let entity = fetch(by: configKey, in: context) else {
|
||||
guard let entity = fetchByConfigKey(configKey, in: context) else {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user