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

Xcode ios GeneratedPluginRegistrant.m address_search_field' Module not found #10

Closed
FrancisKOUAHO opened this issue Feb 24, 2022 · 6 comments

Comments

@FrancisKOUAHO
Copy link

Hello, I use address_search_field in a project, when I build the application on xcode I get this error Module 'address_search_field' not found

I did this command but it doesn't work

  1. cd ios
  2. rm -rf Pods/ Podfile.lock
  3. pod install
  4. flutter clean
  5. flutter pub get

Capture d’écran 2022-02-24 à 17 07 02

@JosLuna98
Copy link
Owner

Hi, i guess it is because the plugin doesn't have C support. It just has swift support and i won't add retrocompatibility soon :(
You can see it in /ios/Classes/AddressSearchFieldPlugin.h file. If you want to make a change i will accept it and do a merge to the project

@FrancisKOUAHO
Copy link
Author

It's a flutter project, so I just build the IOS folder to send it to the apple store and I get the error above

@FrancisKOUAHO
Copy link
Author

I tried to put the objective-C compilation to Swift but still an error

Capture d’écran 2022-02-25 à 09 12 37

Capture d’écran 2022-02-25 à 09 11 15

o

@FrancisKOUAHO
Copy link
Author

Capture d’écran 2022-02-25 à 09 41 42

@FrancisKOUAHO
Copy link
Author

I have solved the problem

  • reinstall flutter
  • reinstall dart
  • updated dependencies
  • create a new ios folder

@JosLuna98
Copy link
Owner

@iamkiruaa I'm sorry you have to reinstall everything, the best solution is set some arguments when you create a flutter project.

Without android studio, you can create new project with some arguments (Option Migration androidX, Platform languages).

example: flutter create --androidx -t app --org com.companyname.packagename -a kotlin -i swift myapp

Explore Yourself by Flutter CLI

flutter create --help

    --[no-]pub : Whether to run "flutter pub get" after the project has been created. (defaults to on)

    --[no-]offline : When "flutter pub get" is run by the create command, this indicates whether to run it in offline mode or not. In offline mode, it will need to have all dependencies already available in the pub cache to succeed.

    --[no-]with-driver-test : Also add a flutter_driver dependency and generate a sample 'flutter drive' test.

    -t, --template=≶type> : Specify the type of project to create:

     [app]                (default) Generate a Flutter application.
     [package]            Generate a shareable Flutter project containing modular Dart code.
     [plugin]             Generate a shareable Flutter project containing an API in Dart code with a platform-specific
                           implementation for Android, for iOS code, or for both.

    -s, --sample=≶id> : Specifies the Flutter code sample to use as the main.dart for an application. Implies --template=app. The value should be the sample ID of the desired sample from the API documentation website (http://docs.flutter.dev/). An example can be found at https://master-api.flutter.dev/flutter/widgets/SingleChildScrollView-class.html

    --list-samples=≶path> : Specifies a JSON output file for a listing of Flutter code samples that can created with --sample.

    --[no-]overwrite : When performing operations, overwrite existing files.

    --description The description to use for your new Flutter project. This string ends up in the pubspec.yaml file. (defaults to "A new Flutter project.")

    --org : The organization responsible for your new Flutter project, in reverse domain name notation. This string is used in Java package names and as prefix in the iOS bundle identifier. (defaults to "com.example")

    --project-name : The project name for this new Flutter project. This must be a valid dart package name.
    -i, --ios-language : [objc, swift (default)]
    -a, --android-language : [java, kotlin (default)]
    --[no-]androidx : Generate a project using the AndroidX support libraries

info from: https://stackoverflow.com/questions/49047411/flutter-how-to-create-a-new-project/58980792#58980792

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants