-
Notifications
You must be signed in to change notification settings - Fork 13
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
Can't expose native type (CBManagerState). #27
Comments
@maksimpetrovskycorewill Hi! |
Hello , the root cause of that issues , not relates to this lib, but caused by xcodebuild, unfortunately by default it's not exposing system libraries Headers used in swift. The example is using CBManagerState in code, import CoreBluetooth
@objc public class CBManagerStateObserver: NSObject {
@obj public var state: CBManagerState = .unknown
} in the result of build I've tried pods and In the pods I've able to achieve this by adding CoreBluetooth.h with following code:
but SPM is not supporting language mixes inside one package, so I can't add header in Sources. Offtopic: So currently , I'm in development state of the plugin , which is inspired by swiftklib, for building Xcode frameworks from xcodeproj.
|
I see! |
While having public code with some types from native frameworks other than foundation , I'm getting an error:
/iosArm64/swiftBuild/.build/arm64-apple-macosx/release/BleCommunication.build/BleCommunication-Swift.h:366:33: error: unknown type name 'CBManagerState'
The code which I have is very simple
Currently I've wrapped my enum, but it's not a best trick.
Can we specify headers or other options?
The text was updated successfully, but these errors were encountered: