Comments (9)
Sounds very familiar, i recall having a similar issue before and cant remember what i did the fix it. Let me have a think about it.
from blue-falcon.
What version of Gradle and also kotlin?
Looks like the coroutines library used is of 1.3.70 and needs to be changed to a 1.4 one.
e: Could not find "/Users/lneumann/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-iosarm64/1.3.8/ab1f410af27e33b328b0e7b3b75875953822e9eb/kotlinx-coroutines-core.klib" in [/Users/lneumann/Projekte/SteigtUm/blue-falcon/examples/KotlinMP/iosApp, /Users/lneumann/.konan/klib, /Users/lneumann/.konan/kotlin-native-prebuilt-macos-1.4.10/klib/common, /Users/lneumann/.konan/kotlin-native-prebuilt-macos-1.4.10/klib/platform/ios_arm64].
from blue-falcon.
Ok, that helped. Now there's another error I can't get rid of. I also had this one in my own project, that's why I wanted to try out the example to see if I'm doing wrong:
> Task :app:compileKotlinIos FAILED
e: /Users/<some path>/blue-falcon/examples/KotlinMP/app/src/iosMain/kotlin/sample/scan.kt: (3, 1): @Throws must have non-empty class list
FAILURE: Build failed with an exception.
from blue-falcon.
If I remove the @Throws
annotation, Xcode builds the project and runs the app. It seems to work fine at first sight, but in the console XCode outputs: Unknown error happened
.
from blue-falcon.
Try kotlin.native.Throws instead?
from blue-falcon.
Nope. Either I put the @Throws
annotation above the method and get @Throws must have non-empty class list
or I leave it out and get Function doesn't have or inherit @Throws annotation and thus exception isn't propagated from Kotlin to Objective-C/Swift as NSError. It is considered unexpected and unhandled instead. Program will be terminated.
from blue-falcon.
I figured it out now. I can't call scan()
directly from Swift. Instead, I need to use your MainCompat
approach like shown here. Maybe you could explicitly state that in the documentation? And I also see that @UseExperimental
is deprecated and the NSBluetoothAlwaysUsageDescription
is missing, so I think updating the example would also be a good idea.
from blue-falcon.
Ah, yes that was it.
Could you possibly do a PR with the changes?
Thanks
from blue-falcon.
I found that by using the coroutine native-mt dependency we can completely get rid of MainCompat. Everything should be up to date now.
from blue-falcon.
Related Issues (20)
- Add information about Bluetooth Classic to the README or change terminology to "BLE" HOT 2
- iOS use HOT 3
- Kotlin MP Example HOT 9
- Runtime Permissions not acquired for BLUETOOTH_CONNECT
- Allow log configuration HOT 2
- How to use communication by BluetoothSocket in common code? HOT 4
- Addition of Compose Multiplatform example project HOT 4
- GPLv3 is a pain HOT 7
- Bonding callback HOT 4
- Bluetooth not work on Android 11 API 30 HOT 19
- Notification/Indication HOT 3
- iOS / Android diferncies HOT 11
- The characteristic value change delegate never fire HOT 11
- Latest release failing due to no xcode 13 support on github HOT 14
- BlueFalcon not found in iOS HOT 12
- Kotlin KMM dev.bluefalcon.BluetoothUnknownException: Unknown error happened HOT 15
- The project 'blue-falcon' is not a Gradle-based project HOT 17
- Notify not working on Android HOT 6
- Second disconnect not working (Android) HOT 3
- didWriteValueForCharacteristic not trigger short time after connection in IOS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blue-falcon.