Comments (5)
Yes Swift Package Manager. I tried 0.4 and 0.5. I got around the error by adding "OpenCombine" under "Frameworks and Libraries". However now I ran into the next error which is Unknown attribute 'Published'
when I do @Published private var searchText: String = ""
from opencombine.
It is a good idea to put that in the Readme. I had no idea what OpenCombineDispatch is and if it was needed.
I'll definitely do. OpenCombineDispatch extends the DispatchQueue
class and adds conformance to the Scheduler
protocol. It is extracted into a different target because OpenCombine (just like Combine) doesn't depend on Dispatch, or Foundation, or anything like that. So if you don't need that conformance, you are free to exclude that target. But you probably do.
Regarding iOS 13+ does the library fall back to Apple's Combine or still uses the OpenCombine implementation? Would something like that work?
Frankly, I'm not sure it is possible to fallback to Combine on iOS 13+. The reason for that is that would require runtime checks like if #available(iOS 13.0)
, rather then compile-time checks like in your example. And those runtime checks would require a whole lot of complexity and would likely cause performance regressions.
So, answering to your question, even on iOS 13+ OpenCombine implementation is used, and there's not really anything we can do about it right now :(
from opencombine.
Hello! No, everything should just work.
What is your setup? Are you using the library as a Swift Package Manager dependency, and what version?
I'd really like to help you with this, so any details about how to reproduce the issue would be much appreciated!
from opencombine.
I got around the error by adding "OpenCombine" under "Frameworks and Libraries".
Well, yes, that needs to be done. When you add a Swift package as a dependency, Xcode suggests you a list of the package targets with checkboxes. Activating those checkboxes basically adds the target to "Frameworks and Libraries":
However now I ran into the next error which is
Unknown attribute 'Published'
when I do@Published private var searchText: String = ""
Oh, Published.
Published doesn't work yet, unfortunately. Believe it or not, I'm coding it right at this moment, so expect it to be ready in the next version.
The error you get, however, can probably be fixed by writing @OpenCombine.Published
. Why? Because Foundation re-exports Published
from Combine, so there can be a name collision if both Foundation and OpenCombine are imported.
from opencombine.
I see. It is a good idea to put that in the Readme. I had no idea what OpenCombineDispatch is and if it was needed.
I see. Regarding iOS 13+ does the library fall back to Apple's Combine or still uses the OpenCombine implementation? Would something like that work?
#if canImport(Combine)
import Combine
#else
import OpenCombine
#endif
from opencombine.
Related Issues (20)
- the `*` in DispatchQueue scheduler's SchedulerTimeType gives wrong value HOT 3
- Ready for production? HOT 3
- [Consideration] Bridge from OpenCombine to Combine publishers HOT 12
- Slack Invite is no longer valid HOT 1
- Doesn't compile on macOS Monterey / XCode 13 HOT 2
- [Feature Request] Async Publisher.values HOT 1
- Re-enable concurrency tests on Wasm when swiftwasm supports them
- Re-enable concurrency tests on Windows when Windows issues are fixed
- error HOT 5
- [Bug]The Publishers.ReceiveOn may lead to subscriber never receive the published single when schedule is concurrent queue.
- [Bug]The Publishers.ReceiveOn may lead to subscriber never receive the published signal when scheduler is concurrent queue.
- would be nice to be able to use "@Published" directive in earlier Swift versions that do not know it HOT 2
- Add primary associated type support HOT 1
- Unable to build on Ubuntu 22.04.1 HOT 2
- Zip crash HOT 3
- When BUILD_LIBRARY_FOR_DISTRIBUTION is set to YES, the build will fail. HOT 1
- Xcode 15 crash HOT 1
- EXC_BAD_ACCESS when repeatedly using Future HOT 3
- When Future call Cancel, why parent is copied by take()?
- error build: Undefined symbol: _OBJC_CLASS_$
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 opencombine.