Navideck / universal_ble

A cross-platform Android/iOS/macOS/Windows/Linux/Web Bluetooth Low Energy (BLE) plugin for Flutter
https://pub.dev/packages/universal_ble
Other
19 stars 2 forks source link

How did you make example working on iOS without modify post_install section #34

Open Wicz3k opened 1 month ago

Wicz3k commented 1 month ago

Hi I tried to add your lib to my project, but on iOS It was impossible without modify of post_install section of Podfile like this:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)

    target.build_configurations.each do |config|
      config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
        '$(inherited)',

        ## dart: PermissionGroup.bluetooth
        'PERMISSION_BLUETOOTH=1',
      ]

    end
  end
end

How your example works without this?

fotiDim commented 1 month ago

@Wicz3k have you added Privacy - Bluetooth Always Usage Description in your info.plist?

Wicz3k commented 1 month ago

@fotiDim Yes, I set this and also Bluetooth peripheral usage description. Only when I read about Permission handler I found information about modify post install section

fotiDim commented 1 month ago

What you refer to is permission_handler specific configuration. The bluetooth permission will be requested without permission_handler as long as you have the info.plist entry, which I mentioned.

fotiDim commented 2 weeks ago

@Wicz3k can this be closed? Do you need any more help?