Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NO Such Module workmanager on IOS side #217

Closed
3 tasks done
congfandi opened this issue Sep 21, 2020 · 18 comments · Fixed by #218
Closed
3 tasks done

NO Such Module workmanager on IOS side #217

congfandi opened this issue Sep 21, 2020 · 18 comments · Fixed by #218
Labels
bug Something isn't working

Comments

@congfandi
Copy link

congfandi commented Sep 21, 2020

  • I have read the README
  • I have done the setup for Android
  • I have done the setup for iOS

0.2.0

please help guyss...

i have been follow all way on ios side and i have been read for all documentation but still got error

[✓] Flutter (Channel stable, 1.20.4, on Mac OS X 10.15.6 19G2021, locale en-ID)
    • Flutter version 1.20.4 at /Users/congfandi/development/flutter
    • Framework revision fba99f6cf9 (7 days ago), 2020-09-14 15:32:52 -0700
    • Engine revision d1bc06f032
    • Dart version 2.9.2

 
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at /Users/congfandi/Library/Android/sdk
    • Platform android-30, build-tools 30.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0, Build version 12A7209
    • CocoaPods version 1.9.3

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 49.0.2
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.49.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.14.1

[✓] Connected device (1 available)
    • sdk gphone x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API
      30) (emulator)

Screen Shot 2020-09-22 at 05 12 31

@congfandi congfandi added the bug Something isn't working label Sep 21, 2020
@ened
Copy link
Collaborator

ened commented Sep 22, 2020

Have this issue as well and will check today how to resolve. May be related to the iOS module definition, introduced in #181.

@congfandi
Copy link
Author

Thanks dude,,,i wait for this PR

@ened
Copy link
Collaborator

ened commented Sep 22, 2020

@congfandi you can add this to your pubspec.yaml file:

dependency_overrides:
  workmanager:
    git:
      url: https://github.com/ened/flutter_workmanager.git
      ref: 1c4e162ea4e71855856fb9e55a1545b3dae9a25d # flutter 1.20 compatibility

@congfandi
Copy link
Author

okai i will do that

@congfandi
Copy link
Author

is this OK ?

image
@ened

@ened
Copy link
Collaborator

ened commented Sep 22, 2020

Yup, looks good. Do flutter clean & rebuild afterwards to check everything.

@congfandi
Copy link
Author

congfandi commented Sep 24, 2020

@ened i got stauck with XCODE 12.0 after i add , they say

@congfandi you can add this to your pubspec.yaml file:

dependency_overrides:
  workmanager:
    git:
      url: https://github.com/ened/flutter_workmanager.git
      ref: 1c4e162ea4e71855856fb9e55a1545b3dae9a25d # flutter 1.20 compatibility

@ened
Copy link
Collaborator

ened commented Sep 24, 2020

You need to refresh the local pods. Try cd ios && pod install.

@congfandi
Copy link
Author

You need to refresh the local pods. Try cd ios && pod install.

done, thanks.... i will close this issue

@smolugu
Copy link

smolugu commented Oct 19, 2020

Hi @ened,

I see you have created a PR but its pending. in the mean time can we do what you suggested here?

Regards,
Shyam

@ened
Copy link
Collaborator

ened commented Oct 19, 2020

@smolugu yes, that seems to work well. :)

@smolugu
Copy link

smolugu commented Oct 20, 2020

@ened thank you but i am getting the below error. do you know what I could be doing wrong?

/Users/shyam/Documents/flutter/nearfiv12/ios/Runner/AppDelegate.swift:25:5: error: use of unresolved identifier 'WorkmanagerPlugin' WorkmanagerPlugin.setPluginRegistrantCallback { registry in

AppDelegate file:

`import UIKit
import Flutter
import GoogleMaps

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {

// Registers all pubspec-referenced Flutter plugins in the given registry.
static func registerPlugins(with registry: FlutterPluginRegistry) {
GeneratedPluginRegistrant.register(with: registry)
}

override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
UIApplication.shared.setMinimumBackgroundFetchInterval(TimeInterval(60*15))

AppDelegate.registerPlugins(with: self) // Register the app's plugins in the context of a normal run
    
WorkmanagerPlugin.setPluginRegistrantCallback { registry in  
  // The following code will be called upon WorkmanagerPlugin's registration.
  // Note : all of the app's plugins may not be required in this context ;
  // instead of using GeneratedPluginRegistrant.register(with: registry),
  // you may want to register only specific plugins.
  AppDelegate.registerPlugins(with: registry)
}

return super.application(application, didFinishLaunchingWithOptions: launchOptions)

}
}`

@ened
Copy link
Collaborator

ened commented Oct 20, 2020

You need to import workmanager in that file.
Try import workmanager on the top.

@smolugu
Copy link

smolugu commented Oct 20, 2020

Hi.. I am getting this error now. Not sure if this related to my project settings or WorkManager

/Users/shyam/Documents/flutter/nearfiv12/ios/Runner/AppDelegate.swift:4:8: error: compiling for iOS 8.0, but module 'workmanager' has a minimum deployment target of iOS 10.0:

@smolugu
Copy link

smolugu commented Oct 20, 2020

Hi @ened, i changed the platform:ios to 10 in podfile. and did a pod install in iOS folder.
I still get the same error after running the project

@smolugu
Copy link

smolugu commented Oct 22, 2020

Hi @ened,

Can you please see if you can help me with this? #223

Regards,
Shyam

@SSVernekar
Copy link

#242 (comment)
@ened please help me with the above issue

@dainora
Copy link

dainora commented Apr 11, 2024

I tried many things on Xcode, like remove all temporary files, rebuild, install pod etc. but only one thing solved me an issue:

Go to Product in Xcode > Schemes > New Scheme...
Select the name of your Cocoapod(in your case workmanager) then click OK.
After you do this, build the project (click cmd + B)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants