Skip to content

using this package app was not build in android or IOS both #587

Open
@ps108developer

Description

@ps108developer

`import UIKit
import Flutter
import workmanager
import flutter_background_service_ios

@UIApplicationMain

@objc class AppDelegate: FlutterAppDelegate {

override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    
    SwiftFlutterBackgroundServicePlugin.taskIdentifier = "your.custom.task.identifier"

    GeneratedPluginRegistrant.register(with: self)
    UNUserNotificationCenter.current().delegate = self

    WorkmanagerPlugin.setPluginRegistrantCallback { registry in
        GeneratedPluginRegistrant.register(with: registry)
    }

    WorkmanagerPlugin.registerBGProcessingTask(withIdentifier: "be.tramckrijte.workmanagerExample.taskId")
    WorkmanagerPlugin.registerBGProcessingTask(withIdentifier: "be.tramckrijte.workmanagerExample.rescheduledTask")
    WorkmanagerPlugin.registerBGProcessingTask(withIdentifier: "be.tramckrijte.workmanagerExample.simpleDelayedTask")
    WorkmanagerPlugin.registerBGProcessingTask(withIdentifier: "be.tramckrijte.workmanagerExample.iOSBackgroundProcessingTask")

    WorkmanagerPlugin.registerPeriodicTask(withIdentifier: "be.tramckrijte.workmanagerExample.iOSBackgroundAppRefresh", frequency: NSNumber(value: 20 * 60))

    return super.application(application, didFinishLaunchingWithOptions: launchOptions)

}

override func userNotificationCenter(
    _ center: UNUserNotificationCenter,
    willPresent notification: UNNotification,
    withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
    completionHandler(.alert)
 }

}
`

Errors ::

/Users/nikunj/Flutter Project.O/PrishuSoft/ZuguMobileAppLatest/zugu-ring/ios/Runner/AppDelegate.swift:23:27 Type 'WorkmanagerPlugin' has no member 'registerBGProcessingTask'

/Users/nikunj/Flutter Project.O/PrishuSoft/ZuguMobileAppLatest/zugu-ring/ios/Runner/AppDelegate.swift:24:27 Type 'WorkmanagerPlugin' has no member 'registerBGProcessingTask'

/Users/nikunj/Flutter Project.O/PrishuSoft/ZuguMobileAppLatest/zugu-ring/ios/Runner/AppDelegate.swift:25:27 Type 'WorkmanagerPlugin' has no member 'registerBGProcessingTask'

/Users/nikunj/Flutter Project.O/PrishuSoft/ZuguMobileAppLatest/zugu-ring/ios/Runner/AppDelegate.swift:26:27 Type 'WorkmanagerPlugin' has no member 'registerBGProcessingTask'

/Users/nikunj/Flutter Project.O/PrishuSoft/ZuguMobileAppLatest/zugu-ring/ios/Runner/AppDelegate.swift:28:27 Type 'WorkmanagerPlugin' has no member 'registerPeriodicTask'

Activity

FeofanGreek

FeofanGreek commented on Feb 25, 2025

@FeofanGreek

I have same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      using this package app was not build in android or IOS both · Issue #587 · fluttercommunity/flutter_workmanager