Comments (8)
Hello @yunjinghui123
In your example v
is not BOOL
, it's id
. Just change argument type in your example.
from promisekit.
Hello @yunjinghui123
In your examplev
is notBOOL
, it'sid
. Just change argument type in your example.
Thank you
from promisekit.
I guess I added it years ago for some reason.
It should work like the other then()
and automatically convert from id
to BOOL
based on the provided args, but at this point I think we can all agree this “bug” is working as intended.
from promisekit.
@yunjinghui123 So you can use NSNumber
in your example
void (^fetch)(PMKBooleanAdapter) = ^(PMKBooleanAdapter block){
block(YES, nil);
};
[AnyPromise promiseWithBooleanAdapterBlock:fetch].then(^(NSNumber* obj){
XCTAssertEqualObjects(obj, @YES);
});
from promisekit.
fetch
I will use it this way.Thank you!
from promisekit.
it's a bug based on our docs. I don't remember this function, did you add it @RomanPodymov ?
from promisekit.
it's a bug based on our docs. I don't remember this function, did you add it @RomanPodymov ?
Hello @mxcl
I also don't remember this function, but I think I explained @yunjinghui123 what is wrong. @yunjinghui123 can we close the issue?
from promisekit.
Hello @mxcl
As I can see promiseWithBooleanAdapterBlock
uses [NSNumber numberWithBool:]
because AnyPromise
uses id
for value
.
from promisekit.
Related Issues (20)
- Crash on iOS11/12 HOT 3
- Issues when submitting to App Store building against iOS 16 HOT 21
- Cannot use PromiseKit as a dependency in a Swift Package HOT 5
- Could not find Xcode version that satisfied version spec: '12.4' HOT 1
- Cannot use URLSession.shared.dataTask(.promise, with: url) in my project HOT 1
- Problems building with Xcode 14.3 beta2 HOT 5
- dependabot requests HOT 1
- Update Cocoapod Release Version? HOT 9
- Website taken over by someone else? HOT 3
- Cocoapods's pods that depend on PromiseKit 6.22.1+ fail to `pod lib lint` while using Xcode 14.3 HOT 6
- Undefined symbols for architecture arm64 : PromiseKit HOT 3
- Xcode 15 Warning HOT 1
- Add support of visionOS HOT 1
- SPM doesn't compile properly with version 8.x.x HOT 4
- Maige Usage
- Maige Usage
- Maige Usage
- Maige Usage
- Privacy Manifest HOT 16
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 promisekit.