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

Minimum iOS Deployment target is 10.0 #12

Open
trueb2 opened this issue Dec 2, 2021 · 1 comment
Open

Minimum iOS Deployment target is 10.0 #12

trueb2 opened this issue Dec 2, 2021 · 1 comment

Comments

@trueb2
Copy link

trueb2 commented Dec 2, 2021

Some of the CoreBluetooth bindings are minimum of 10.0 for IPHONEOS_DEPLOYMENT_TARGET. The Android minimum sdk version is documented on the README. The default for a new flutter application is 9.0.

Instructions for updating the deployment target are documented here: https://docs.flutter.dev/deployment/ios#review-xcode-project-settings

Example Errors:

    /Users/username/.pub-cache/git/flutter_blue-a7fa5410b66cabdc3f12e7d74375db3477a70c85/ios/Classes/FlutterBluePlugin.m:553:49: warning: 'CBManagerState' is only available on iOS 10.0 or newer [-Wunguarded-availability]
    - (ProtosBluetoothState*)toBluetoothStateProto:(CBManagerState)state {
                                                    ^
    In module 'CoreBluetooth' imported from /Users/username/.pub-cache/git/flutter_blue-a7fa5410b66cabdc3f12e7d74375db3477a70c85/ios/Classes/FlutterBluePlugin.h:10:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBManager.h:32:28: note: 'CBManagerState' has been marked as being introduced in iOS 10.0 here, but the deployment target is iOS 9.0.0
    typedef NS_ENUM(NSInteger, CBManagerState) {
                               ^
    /Users/username/.pub-cache/git/flutter_blue-a7fa5410b66cabdc3f12e7d74375db3477a70c85/ios/Classes/FlutterBluePlugin.m:553:1: note: annotate 'toBluetoothStateProto:' with an availability attribute to silence this warning
    - (ProtosBluetoothState*)toBluetoothStateProto:(CBManagerState)state {
    ^
                                                                          API_AVAILABLE(ios(10.0))
    /Users/username/.pub-cache/git/flutter_blue-a7fa5410b66cabdc3f12e7d74375db3477a70c85/ios/Classes/FlutterBluePlugin.m:113:53: warning: values of type 'NSUInteger' should not be used as format arguments; add an explicit cast to 'unsigned long' instead [-Wformat]
        NSLog(@"getConnectedDevices periphs size: %lu", [periphs count]);
                                                  ~~~   ^~~~~~~~~~~~~~~
                                                  %lu   (unsigned long)
    /Users/username/.pub-cache/git/flutter_blue-a7fa5410b66cabdc3f12e7d74375db3477a70c85/ios/Classes/FlutterBluePlugin.m:78:37: warning: 'CBManagerStateUnsupported' is only available on iOS 10.0 or newer [-Wunguarded-availability]
        if(self.centralManager.state != CBManagerStateUnsupported && self.centralManager.state != CBManagerStateUnknown) {
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~
    In module 'CoreBluetooth' imported from /Users/username/.pub-cache/git/flutter_blue-a7fa5410b66cabdc3f12e7d74375db3477a70c85/ios/Classes/FlutterBluePlugin.h:10:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBManager.h:32:28: note: 'CBManagerState' has been marked as being introduced in iOS 10.0 here, but the deployment target is iOS 9.0.0
    typedef NS_ENUM(NSInteger, CBManagerState) {
                               ^
    /Users/username/.pub-cache/git/flutter_blue-a7fa5410b66cabdc3f12e7d74375db3477a70c85/ios/Classes/FlutterBluePlugin.m:78:37: note: enclose 'CBManagerStateUnsupported' in an @available check to silence this warning
        if(self.centralManager.state != CBManagerStateUnsupported && self.centralManager.state != CBManagerStateUnknown) {
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/username/.pub-cache/git/flutter_blue-a7fa5410b66cabdc3f12e7d74375db3477a70c85/ios/Classes/FlutterBluePlugin.m:78:95: warning: 'CBManagerStateUnknown' is only available on iOS 10.0 or newer [-Wunguarded-availability]
        if(self.centralManager.state != CBManagerStateUnsupported && self.centralManager.state != CBManagerStateUnknown) {
                                                                                                  ^~~~~~~~~~~~~~~~~~~~~
@trueb2
Copy link
Author

trueb2 commented Dec 3, 2021

Setting the target deployment version needs to be done via Flutter/AppFrameworkInfo.plist; otherwise, it will be blown away by a clean build.

https://stackoverflow.com/questions/63973136/the-ios-deployment-target-iphoneos-deployment-target-is-set-to-8-0-in-flutter

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

1 participant