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

iOS simulator build failures #614

Closed
toghi opened this issue Sep 28, 2021 · 2 comments
Closed

iOS simulator build failures #614

toghi opened this issue Sep 28, 2021 · 2 comments

Comments

@toghi
Copy link

toghi commented Sep 28, 2021

I tryed to use the library on iOS and Android simulator in mac os. Everything is ok for Android. However, I can not even build on iOS simulator. I even tryed the entire project, I recieved errors during the build:

Xcode's output:
↳
    /Users/aa/Downloads/FlutterBleLib-develop/example/ios/Pods/MultiplatformBleAdapter/iOS/RxBluetoothKit/RestoredState.swift:68:105: error: value of optional type 'CBPeripheral?' must be unwrapped to a value of type 'CBPeripheral'
                                                          peripheral: RxCBPeripheral(peripheral: $0.service.peripheral)),
                                                                                          ^
    /Users/aa/Downloads/FlutterBleLib-develop/example/ios/Pods/MultiplatformBleAdapter/iOS/RxBluetoothKit/RestoredState.swift:68:105: note: coalesce using '??' to provide a default when the optional value contains 'nil'
                                                          peripheral: RxCBPeripheral(peripheral: $0.service.peripheral)),
                                                                                          ^
                                                                                          ?? <#default value#>
    /Users/aa/Downloads/FlutterBleLib-develop/example/ios/Pods/MultiplatformBleAdapter/iOS/RxBluetoothKit/RestoredState.swift:68:105: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
                                                          peripheral: RxCBPeripheral(peripheral: $0.service.peripheral)),
                                                                                          ^
                                                                                          !
    /Users/aa/Downloads/FlutterBleLib-develop/example/ios/Pods/MultiplatformBleAdapter/iOS/RxBluetoothKit/RestoredState.swift:68:105: error: value of optional type 'CBPeripheral?' must be unwrapped to a value of type 'CBPeripheral'
                                                          peripheral: RxCBPeripheral(peripheral: $0.service.peripheral)),
                                                                                          ^
    /Users/aa/Downloads/FlutterBleLib-develop/example/ios/Pods/MultiplatformBleAdapter/iOS/RxBluetoothKit/RestoredState.swift:68:105: note: coalesce using '??' to provide a default when the optional value contains 'nil'
                                                          peripheral: RxCBPeripheral(peripheral: $0.service.peripheral)),
                                                                                          ^
                                                                                          ?? <#default value#>
    /Users/aa/Downloads/FlutterBleLib-develop/example/ios/Pods/MultiplatformBleAdapter/iOS/RxBluetoothKit/RestoredState.swift:68:105: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
                                                          peripheral: RxCBPeripheral(peripheral: $0.service.peripheral)),
                                                                                          ^
                                                                                          !
    /Users/aa/Library/Developer/Xcode/DerivedData/Runner-flgparpnvurxgxgueyvpwhzrwwmo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/MultiplatformBleAdapter.build/Objects-normal/arm64/RetryWhen.dia:1:1: warning: Could not read serialized diagnostics file: error("Invalid diagnostics signature") (in target 'MultiplatformBleAdapter' from project 'Pods')
    Command CompileSwift failed with a nonzero exit code
    /Users/aa/Downloads/FlutterBleLib-develop/example/ios/Pods/MultiplatformBleAdapter/iOS/RxBluetoothKit/RestoredState.swift:68:105: error: value of optional type 'CBPeripheral?' must be unwrapped to a value of type 'CBPeripheral'
                                                          peripheral: RxCBPeripheral(peripheral: $0.service.peripheral)),
                                                                                          ^
    /Users/aa/Downloads/FlutterBleLib-develop/example/ios/Pods/MultiplatformBleAdapter/iOS/RxBluetoothKit/RestoredState.swift:68:105: note: coalesce using '??' to provide a default when the optional value contains 'nil'
                                                          peripheral: RxCBPeripheral(peripheral: $0.service.peripheral)),
                                                                                          ^
                                                                                          ?? <#default value#>
    /Users/aa/Downloads/FlutterBleLib-develop/example/ios/Pods/MultiplatformBleAdapter/iOS/RxBluetoothKit/RestoredState.swift:68:105: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
                                                          peripheral: RxCBPeripheral(peripheral: $0.service.peripheral)),
                                                                                          ^
                                                                                          !
    /Users/aa/Library/Developer/Xcode/DerivedData/Runner-flgparpnvurxgxgueyvpwhzrwwmo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/MultiplatformBleAdapter.build/Objects-normal/arm64/Rx.dia:1:1: warning: Could not read serialized diagnostics file: error("Invalid diagnostics signature") (in target 'MultiplatformBleAdapter' from project 'Pods')
    Command CompileSwift failed with a nonzero exit code
    /Users/aa/Downloads/FlutterBleLib-develop/example/ios/Pods/MultiplatformBleAdapter/iOS/RxBluetoothKit/RxCBCharacteristic.swift:59:52: error: value of optional type 'CBService?' must be unwrapped to a value of type 'CBService'
            return RxCBService(service: characteristic.service)
                                                       ^
@betterengineering
Copy link

betterengineering commented Sep 28, 2021

I was able to find a workaround here:

pod 'MultiplatformBleAdapter', :git => 'https://github.com/below/MultiPlatformBleAdapter', :tag => '0.1.9'

MultiPlatformBleAdapter needs to actually cut a release, it looks like it was only tagged at 0.1.9 and there's an ongoing thread. Then this repo needs updated here to use 0.1.9 and a release needs cut for FlutterBleLib.

@toghi
Copy link
Author

toghi commented Oct 8, 2021

Thanks.

@toghi toghi closed this as completed Oct 8, 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

2 participants