Skip to content
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

Objective C- Xcode 9.3 - Expected method to read dictionary element not found on object of type #829

Closed
Pratik-Sodha opened this issue Apr 9, 2018 · 7 comments

Comments

@Pratik-Sodha
Copy link

I've been experiencing some issues using, Which are occurred in in xcode version 9.3.
And error detail description

Expected method to read dictionary element not found on object of type 'id<NSFastEnumeration,NSObject>'

if ([promises isKindOfClass:[NSDictionary class]])
        return newPromise = [PMKPromise new:^(PMKPromiseFulfiller fulfiller, PMKPromiseRejecter rejecter){
            NSMutableDictionary *results = [NSMutableDictionary new];
            for (id key in promises) {
                PMKPromise *promise = promises[key];  // Issue is here on this line
                if (![promise isKindOfClass:[PMKPromise class]])
                    promise = [PMKPromise promiseWithValue:promise];
                promise.catch(rejecter(key));
                promise.then(^(id o){
                    if (o)
                        results[key] = o;
                    if (--count == 0)
                        fulfiller(results);
                });
            }
        }];

I'm using Xcode 9.3, Objective C.

Thank you
screen shot 2018-04-09 at 11 37 41 am

@theodelrieu
Copy link

I've got the exact same problem with Xcode 9.3 9E145

@theodelrieu
Copy link

Setting 'PromiseKit/Promise', '~> 1.7.6' explicitly + running pod install --repo-update works

@mxcl
Copy link
Owner

mxcl commented Apr 9, 2018

What PromiseKit version and what file is this exactly? Closing because these bits of information were asked for in the issue template and the template states I will close tickets that don't provide this information and I will smirk. So: smirk.

@mxcl mxcl closed this as completed Apr 9, 2018
@mxcl
Copy link
Owner

mxcl commented Apr 9, 2018

This was fixed in 1.7.6 months ago, please update if you are using PMK 1.x:

1ce2561

@Pratik-Sodha
Copy link
Author

@theodelrieu It's work for me. Previously i'm using version 1.7.2. So, getting that error.

Thank you.. 👍

@itzilisun
Copy link

When I run pod search PromiseKit,I can't find the version of 1.7.6.1.7.6 is cancelled?

@mxcl
Copy link
Owner

mxcl commented Jun 15, 2018

pod search PromiseKit

-> PromiseKit (6.3.0)
   Promises for Swift & ObjC.
   pod 'PromiseKit', '~> 6.3.0'
   - Homepage: http://promisekit.org
   - Source:   https://github.com/mxcl/PromiseKit.git
   - Versions: 6.3.0, 6.2.8, 6.2.7, 6.2.6, 6.2.5, 6.2.4, 6.2.3, 6.2.1, 6.2.0, 6.1.2, 6.1.1, 6.1.0,
   6.0.3, 6.0.2, 6.0.1, 6.0.0, 4.5.2, 4.5.1, 4.5.0, 4.4.4, 4.4.3, 4.4.2, 4.4.0, 4.3.2, 4.3.1, 4.2.2,
   4.2.0, 4.1.7, 4.1.4, 4.1.3, 4.1.2, 4.1.0, 4.0.5, 4.0.4, 4.0.3, 4.0.1, 4.0.0, 3.5.3, 3.5.2, 3.5.1,
   3.5.0, 3.4.4, 3.4.3, 3.4.2, 3.4.1, 3.4.0, 3.3.0, 3.2.1, 3.2.0, 3.1.1, 3.1.0, 3.0.3, 3.0.2, 3.0.1,
   3.0.0, 2.2.1, 2.2.0, 2.1.3, 2.1.2, 2.1.1, 2.1.0, 2.0.6, 2.0.5, 2.0.4, 2.0.3, 2.0.2, 2.0.1, 2.0.0,
   1.7.7, 1.7.6, 1.7.5, 1.7.4, 1.7.2, 1.7.1, 1.7.0, 1.6.0, 1.5.3, 1.5.2, 1.5.1, 1.5.0, 1.4.3, 1.4.2,
   1.4.1, 1.4.0, 1.3.0, 1.2.5, 1.2.4, 1.2.3, 1.2.2, 1.2, 1.0.3, 1.0.2, 1.0.1, 1.0, 0.9.21, 0.9.19,
   0.9.18, 0.9.17.1, 0.9.17, 0.9.16.6, 0.9.16.5, 0.9.16.4, 0.9.16.3, 0.9.16.2, 0.9.16.1, 0.9.16,
   0.9.15.3, 0.9.15.2, 0.9.15.1, 0.9.15, 0.9.14.3, 0.9.14.2, 0.9.14.1, 0.9.14, 0.9.13.2, 0.9.13.1,
   0.9.13, 0.9.11.1, 0.9.11, 0.9.10, 0.9.9, 0.9.8.1, 0.9.8, 0.9.7.5, 0.9.7.4, 0.9.7.3, 0.9.7.2,
   0.9.7.1, 0.9.7, 0.9.6, 0.9.5, 0.9.4, 0.9.3, 0.9.2, 0.9.1, 0.9.0 [master repo]

1.7.6 is there.

Please open new tickets. This is the standard practice for all projects on the Internet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants