ogabrielinacio / esp_provisioning_ble

A Flutter plugin for provisioning ESP32 modules with Ble
MIT License
10 stars 3 forks source link

Example throws "Duplicate interface definition for class 'EspProvisioningBlePlugin'" and "Unknown receiver 'SwiftEspProvisioningPlugin'" #5

Closed ivanhercaz closed 10 months ago

ivanhercaz commented 10 months ago

Hi! This issue emerges while testing if #1 is solved after latest change by @ogabrielinacio. It seems it is solved, although I will report there.

However, now I am getting Unknown receiver 'SwiftEspProvisioningPlugin'. The full stacktrace is:

Launching lib/main.dart on iPad de X in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: YQQ59R2K6F
Xcode build done.                                            7,9s
Failed to build iOS app
Could not build the precompiled application for the device.
Semantic Issue (Xcode): Duplicate interface definition for class 'EspProvisioningBlePlugin'
/Users/maufo/dev/flutter/esp_prov_ble_fresh/example/build/ios/Debug-iphoneos/esp_provisioning_ble/esp_provisioning_ble.framework/Headers/esp_provisioning_ble-Swift.h:305:0

Semantic Issue (Xcode): Unknown receiver 'SwiftEspProvisioningPlugin'; did you mean 'EspProvisioningBlePlugin'?
/Users/maufo/dev/flutter/esp_prov_ble_fresh/ios/Classes/EspProvisioningBlePlugin.m:12:3

Error launching application on iPad de X.

The steps I am following to deploy in my physical iPad are:

  1. Clone the repository, open example directory in VSCode.
  2. Open XCode and set myself as the team member.
  3. Again in VSCode, run "Start without debugging" (also tested using flutter run).

Then I get the above error.

I tried to make the suggested change in the "did you mean..." part of the error, change SwiftEspProvisioningPlugin by EspProvisioningBlePlugin. It seems to solve the second error but persists the first one about the duplicate interface:

Could not build the precompiled application for the device.
Semantic Issue (Xcode): Duplicate interface definition for class 'EspProvisioningBlePlugin'
/Users/maufo/dev/flutter/esp_prov_ble_fresh/example/build/ios/Debug-iphoneos/esp_provisioning_ble/esp_provisioning_ble.framework/Headers/esp_provisioning_ble-Swift.h:305:0
2

Error launching application on iPad de X.

And here I lost a bit the path to try to solve it, but I will research more.

Have you any idea about it? It could be I am not running something as it should be runned.

Technical info

OS: macOS 14.0 23A344 arm64 
Host: Macmini9,1 
Kernel: 23.0.0 
CPU: Apple M1 
GPU: Apple M1 
Memory: 1485MiB / 8192MiB 

Development info

Xcode 15.0.1
VSCode 1.83
Flutter 3.16.0-18.0.pre.88 • channel master • https://github.com/flutter/flutter.git
Framework • revision a4ec6278b1 (12 hours ago) • 2023-10-28 02:47:25 -0400
Engine • revision 84dcb4fb93
Tools • Dart 3.3.0 (build 3.3.0-71.0.dev) • DevTools 2.28.1
ivanhercaz commented 10 months ago

I get the same errors trying to build for iOS the application in which I am working.

ogabrielinacio commented 10 months ago

Hi @ivanhercaz , thank you for your help in the test of IOS code.

Can you try for me this newer version, end send me a feedback, please?

https://github.com/ogabrielinacio/esp_provisioning_ble/commit/7aa7c3998c80d26162fa9e1fa7b7e29a88abc9ce

ivanhercaz commented 10 months ago

Hi @ivanhercaz , thank you for your help in the test of IOS code.

Your welcome! Thanks to you for working on giving support to iOS. I admit that I prefer to work with Android, but work is work, and the business world and market demand iOS 😅.

Can you try for me this newer version, end send me a feedback, please?

https://github.com/ogabrielinacio/esp_provisioning_ble/commit/7aa7c3998c80d26162fa9e1fa7b7e29a88abc9ce

Of course! I will try as soon as possible, but today.

ivanhercaz commented 10 months ago

@ogabrielinacio, I confirm you 7aa7c3998c80d26162fa9e1fa7b7e29a88abc9ce fixes this issue.

I should take a deep study into Swift to report and solve this kind of issues and contribute to your project.

Thank you very much, one more time, for your fast and effective reply!

P.S. 1 Have you any roadmap for the next release? P.S. 2 Have you a Ko-Fi or some Buy Me a Coffee or similar website? The less I can do is to invite you to a coffee ASAP!