[iOS] add () to forward @autoclosure parameter
See original GitHub issueSetup problem
Getting the following error when compiling.
/app/node_modules/react-native-ble-plx/ios/RxBluetoothKit/Logging.swift:90:38: error: add () to forward @autoclosure parameter
log(with: .verbose, message: message)
^~~~~~~
()
/app/node_modules/react-native-ble-plx/ios/RxBluetoothKit/Logging.swift:94:36: error: add () to forward @autoclosure parameter
log(with: .debug, message: message)
^~~~~~~
()
/app/node_modules/react-native-ble-plx/ios/RxBluetoothKit/Logging.swift:98:35: error: add () to forward @autoclosure parameter
log(with: .info, message: message)
^~~~~~~
()
/app/node_modules/react-native-ble-plx/ios/RxBluetoothKit/Logging.swift:102:38: error: add () to forward @autoclosure parameter
log(with: .warning, message: message)
^~~~~~~
()
/app/node_modules/react-native-ble-plx/ios/RxBluetoothKit/Logging.swift:106:36: error: add () to forward @autoclosure parameter
log(with: .error, message: message)
Context
- Library version: 1.0.3
- Platform: iOS
- Xcode: 10.2.1
- CocoaPods
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
Swift 5 Issue: "Add () to forward @autoclosure parameter" #155
Successfully merging a pull request may close this issue. Fix compilation error in Swift 5 mode Rightpoint/Swiftilities. 1 participant.
Read more >swift - Closure forwarding without evaluating - Stack Overflow
debug) , but xcode gives me an error: Add () to forward @autoclosure parameter . Will my code above evaluate the closure inside...
Read more >How to Use Autoclosures and @autoclosure in Swift 3
The first parameter is of type () -> String , a closure that accepts no arguments and returns a string. And the parameter...
Read more >autoclosure in Swift: Simplify Closure Calls [Examples]
In Swift, an autoclosure lets you omit curly braces from a closure. ... The function example expects a closure of type () ->...
Read more >Using @autoclosure when designing Swift APIs
Swift's @autoclosure attribute enables us to define an argument that automatically gets wrapped in a closure. It's primarily used to defer ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The problem is Xcode now uses Swift 5.0 by default, which requires the
@autoclosure
tag. The proper solution is to migrate RxBluetoothKit to 5.0 (I think it’s already underway in the source repo, just hasn’t been ported to this package which has a separate copy of RxBluetoothKit).For now, it can be fixed by specifying Swift 4.2 as the compiler for this package.
in my case app compiles with following code: