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

[Bug]: FAiled to build app (Definition of 'FPPSensorsPlusPlugin' must be imported from module) #2535

Open
8 tasks done
fullflash opened this issue Jan 25, 2024 · 6 comments
Open
8 tasks done
Labels
bug Something isn't working triage

Comments

@fullflash
Copy link

Platform

IOS 17

Plugin

sensor_plus

Version

4.0.2

Flutter SDK

3.16.4

Steps to reproduce

unable to build app

Code Sample

No response

Logs

Could not build the precompiled application for the device.
Semantic Issue (Xcode): Duplicate interface definition for class 'FPPSensorsPlusPlugin'
sensors_plus/sensors_plus.framework/Headers/FPPSensorsPlusPlugin.h:6:0

Modules Issue (Xcode): Definition of 'FPPSensorsPlusPlugin' must be imported from module 'sensors_plus.Swift' before it is required
Runner/GeneratedPluginRegistrant.m:303:3

Flutter Doctor

Flutter (Channel stable, 3.16.4, on macOS 14.0 23A344 darwin-arm64, locale en-AZ)
    • Flutter version 3.16.4 on channel stable at
      /Users/*****/Documents/SDK_all/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2e9cb0aa71 (6 weeks ago), 2023-12-11 14:35:13 -0700
    • Engine revision 54a7145303
    • Dart version 3.2.3
    • DevTools version 2.28.4

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/****/Documents/SDK_all/android
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/****/Documents/SDK_all/android
    • Java binary at: /Applications/Android
      Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A507
    • CocoaPods version 1.14.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

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

[✓] Connected device (4 available)
    • Buzz Test Device (mobile)  • 00008120-001A7062116BC01E            • ios
      • iOS 17.2.1 21C66
    • iPhone 15 Pro Max (mobile) • D79DF45F-5AB2-435F-94CB-3A57E7B90F93 • ios
      • com.apple.CoreSimulator.SimRuntime.iOS-17-0 (simulator)
    • macOS (desktop)            • macos                                •
      darwin-arm64   • macOS 14.0 23A344 darwin-arm64
    • Chrome (web)               • chrome                               •
      web-javascript • Google Chrome 120.0.6099.234

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Checklist before submitting a bug

  • I searched issues in this repository and couldn't find such bug/problem
  • I Google'd a solution and I couldn't find it
  • I searched on StackOverflow for a solution and I couldn't find it
  • I read the README.md file of the plugin
  • I'm using the latest version of the plugin
  • All dependencies are up to date with flutter pub upgrade
  • I did a flutter clean
  • I tried running the example project
@fullflash fullflash added bug Something isn't working triage labels Jan 25, 2024
@fullflash fullflash changed the title [Bug]: FAiled to build app [Bug]: FAiled to build app (Definition of 'FPPSensorsPlusPlugin' must be imported from module) Jan 25, 2024
@vbuberen
Copy link
Collaborator

It looks like some caching issue. Check you setup.
I currently use the latest sensors_plus in 2 projects which build just fine for iOS 17 both locally and on CI.

@socialme2
Copy link

I encountered this issue too. I tried below methods, but they all do not work

  1. upgrade sensors_plus: ^4.0.2 to sensors_plus: ^5.0.0
  2. clean Pods and cache
  3. rebuild ios
  4. upgrade flutter from 3.16 to 3.19.4

env: iOS 13.0

@vbuberen
Copy link
Collaborator

I still believe it is the issue on your local side, not the plugin.

Try to run the example app from the plugin to validate it.

@socialme2
Copy link

But why only does this plugin have this issue while others are all fine?

@vbuberen
Copy link
Collaborator

But why only does this plugin have this issue while others are all fine?

Did you run the example app as I asked? I don't want to guess as I have no idea about your setup, your project, etc.

@vbuberen
Copy link
Collaborator

There are enough answers in Google for similar cases be it Flutter or just iOS projects:
oddbit/flutter_facebook_app_events#60
https://stackoverflow.com/a/13132218

It literally took me just 1 minute to find a confirmation for my statement. You could do some search as well, so we don't guess.

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

No branches or pull requests

3 participants