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

[Help]: How to get device Mac address on iOS #642

Closed
1 task done
SAOKIM99 opened this issue Oct 25, 2023 · 4 comments
Closed
1 task done

[Help]: How to get device Mac address on iOS #642

SAOKIM99 opened this issue Oct 25, 2023 · 4 comments
Labels
help Questions, help, observations, or possible bugs

Comments

@SAOKIM99
Copy link

Requirements

  • I've looked at the README 'Common Problems' section

Have you checked this problem on the example app?

Yes

FlutterBluePlus Version

1.20.7

Flutter Version

3.13.6

What OS?

iOS

OS Version

iOS 16.7

Bluetooth Module

esp32 PICO D4

What is your problem?

I'm building a system that connects devices together via BLE. The phone will get the MAC address of device A and send it to device B. Device B uses that MAC address to scan and connect to device A.

I built it for Android and it works fine.

However, I was building for an iOS device when I noticed that: I can't get the device's MAC address (remodeId returns a strange UUID and it's not a MAC address).

How to get the device's MAC address??

Is there a parameter defined specifically for each device so that when Scanning, that parameter will be used to distinguish devices from each other (all devices are advertised with the same UUID)?
IMG_0895

Logs

image above
@SAOKIM99 SAOKIM99 added the help Questions, help, observations, or possible bugs label Oct 25, 2023
@chipweinberger
Copy link
Owner

chipweinberger commented Oct 25, 2023

ios does not allow this.

mac address is hidden for privacy reasons by Apple.

@EdwardRodr1guez
Copy link

ios does not allow this.

mac address is hidden for privacy reasons by Apple.

@chipweinberger Greetings sir,
regarding this constraint, it means that if I store (in local device store for example) that strange uuid, I could not use that uuid for later reconnect to it (for example, in an app which list "favorite" or "recently" connected devices? ) in ios?

@chipweinberger
Copy link
Owner

chipweinberger commented Nov 1, 2023

correct.

ios will occasionally change the randomly generated uuid.

i'm not sure how often it changes.

@EdwardRodr1guez
Copy link

EdwardRodr1guez commented Nov 1, 2023

Thanks sir, interesting, so, we could say this issue is related to the operative system (IOS) rather than flutter itself? I mean this "problem" is also expected to occur for example in swift? @chipweinberger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help Questions, help, observations, or possible bugs
Projects
None yet
Development

No branches or pull requests

3 participants