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

MacOS support #131

Open
divan opened this issue Mar 14, 2021 · 3 comments
Open

MacOS support #131

divan opened this issue Mar 14, 2021 · 3 comments

Comments

@divan
Copy link

divan commented Mar 14, 2021

Hi, thanks for the fantastic libs!

On the MacOS FlutterBleLIb currently throws an exception about missing plugin, even if's used with BleEmulator. Would it be possible to be able to use BleEmulator on the platforms without bluetooth plugin implemented (like MacOS or others)?

That would be really helpful and allow to work on UI/login of the app even without real devices or hardware bluetooth stack working.

Thanks in advance for any comments or thoughts on this.

@mikolak
Copy link
Collaborator

mikolak commented Apr 7, 2021

Hi!

This is related to dotintent/FlutterBleLib#579. It boils down to the fact that I don't know what needs to be done to support macOS and a quick Google search for it hasn't really yielded results. I'll try to ask around, perhaps it would be easy to just somehow mark it as supported.

Just to clarify - you're asking about the actual macOS, not iOS simulator on macOS?

@MikeiLL
Copy link

MikeiLL commented Jun 24, 2021

I'm developing on macOS as well and, when running the BLEmulator, getting:

Target of URI doesn't exist: 'package:blemulator_example/example_peripherals/generic_peripheral.dart'.
Try creating the file referenced by the URI, or Try using a URI for a file that does exist.

@MikeiLL
Copy link

MikeiLL commented Jun 24, 2021

I had to first run flutter packages get. Then got following message:

flutter packages get
Running "flutter pub get" in blemulator_flutter...                  4.6s
Running "flutter pub get" in example...                          2,450ms
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Warning
──────────────────────────────────────────────────────────────────────────────
Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at

https://flutter.dev/go/android-project-migration

to migrate your project.

After restarting Visual Studio Code, getting the following errors in the console:

# device_details_bloc_provider.dart
The method 'inheritFromWidgetOfExactType' isn't defined for the type 'BuildContext'.
Try correcting the name to the name of an existing method, or defining a method named 'inheritFromWidgetOfExactType'.
# device_block_provider.dart
The method 'inheritFromWidgetOfExactType' isn't defined for the type 'BuildContext'.
Try correcting the name to the name of an existing method, or defining a method named 'inheritFromWidgetOfExactType'.

This SO solution seems to solve that issue.

# updated to following method in above two places:
context.dependOnInheritedWidgetOfExactType() as DevicesBlocProvider

I can submit a pr if you'd like.

MikeiLL added a commit to MikeiLL/blemulator_flutter that referenced this issue Jun 24, 2021
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

3 participants