Skip to content

ios subscribeToCharacteristic crashes the app #137

@dawidb-appdate

Description

@dawidb-appdate

Describe the bug
Subsrcibing to specific characteristic crashes ios app immediately. Android one works well with the same code.

To Reproduce
Steps to reproduce the behavior:

  1. use sample app

  2. change body of the function Future discoverServices(String deviceId) async
    to something like
    `final characteristic = QualifiedCharacteristic(serviceId: Uuid.parse('4c0719b0-c810-492b-87b1-63c6c3fd584f'), characteristicId: Uuid.parse('4c0719b3-c810-492b-87b1-63c6c3fd584f'), deviceId: deviceId);

    _ble.subscribeToCharacteristic(characteristic).listen((data) {
    print(data.toString());
    }, onError: (dynamic error) {
    print(error);
    });`

  3. launch the app

  4. tap search button

  5. select device

  6. tap connect and wait until status changes

  7. tap Discover services

  8. app immediately crashes - tries to subsrcibe to characteristic

Note: original code for discovering services works properly on both ios and android, so service and characteristics are discovered
.

Expected behavior
Should receive data printed on console - Android works properly

Smartphone / tablet

  • Device:iPhone XS
  • OS: iOS 14
  • Package version: 2.6.1+1

Attached screenshot from xcode
Screenshot 2020-11-04 at 23 42 18

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingiOSiOS-specific ticket

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions