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:
@@ -57,7 +57,7 @@ extension NotificationDelivery {
|
||||
in context: NSManagedObjectContext,
|
||||
id: String,
|
||||
notificationId: String,
|
||||
notificationContent: NotificationContent? = nil,
|
||||
notificationContent: NotificationContentEntity? = nil,
|
||||
timesafariDid: String? = nil,
|
||||
deliveryTimestamp: Date,
|
||||
deliveryStatus: String? = nil,
|
||||
@@ -116,7 +116,7 @@ extension NotificationDelivery {
|
||||
static func create(
|
||||
in context: NSManagedObjectContext,
|
||||
from dict: [String: Any],
|
||||
notificationContent: NotificationContent? = nil
|
||||
notificationContent: NotificationContentEntity? = nil
|
||||
) -> NotificationDelivery? {
|
||||
guard let id = dict["id"] as? String,
|
||||
let notificationId = dict["notificationId"] as? String else {
|
||||
@@ -208,8 +208,8 @@ extension NotificationDelivery {
|
||||
* @param notificationId Notification content ID
|
||||
* @return Array of NotificationDelivery entities
|
||||
*/
|
||||
static func query(
|
||||
by notificationId: String,
|
||||
static func queryByNotificationId(
|
||||
_ notificationId: String,
|
||||
in context: NSManagedObjectContext
|
||||
) -> [NotificationDelivery] {
|
||||
let request: NSFetchRequest<NotificationDelivery> = NotificationDelivery.fetchRequest()
|
||||
@@ -260,8 +260,8 @@ extension NotificationDelivery {
|
||||
* @param deliveryStatus Delivery status string
|
||||
* @return Array of NotificationDelivery entities
|
||||
*/
|
||||
static func query(
|
||||
by deliveryStatus: String,
|
||||
static func queryByDeliveryStatus(
|
||||
_ deliveryStatus: String,
|
||||
in context: NSManagedObjectContext
|
||||
) -> [NotificationDelivery] {
|
||||
let request: NSFetchRequest<NotificationDelivery> = NotificationDelivery.fetchRequest()
|
||||
@@ -283,8 +283,8 @@ extension NotificationDelivery {
|
||||
* @param timesafariDid TimeSafari device ID
|
||||
* @return Array of NotificationDelivery entities
|
||||
*/
|
||||
static func query(
|
||||
by timesafariDid: String,
|
||||
static func queryByTimesafariDid(
|
||||
_ timesafariDid: String,
|
||||
in context: NSManagedObjectContext
|
||||
) -> [NotificationDelivery] {
|
||||
let request: NSFetchRequest<NotificationDelivery> = NotificationDelivery.fetchRequest()
|
||||
@@ -368,7 +368,7 @@ extension NotificationDelivery {
|
||||
for notificationId: String,
|
||||
in context: NSManagedObjectContext
|
||||
) -> Int {
|
||||
let deliveries = query(by: notificationId, in: context)
|
||||
let deliveries = queryByNotificationId(notificationId, in: context)
|
||||
let count = deliveries.count
|
||||
|
||||
for delivery in deliveries {
|
||||
|
||||
Reference in New Issue
Block a user