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

Use of undeclared type 'Task' #21

Closed
oliverfoggin opened this issue May 31, 2016 · 5 comments
Closed

Use of undeclared type 'Task' #21

oliverfoggin opened this issue May 31, 2016 · 5 comments
Assignees
Labels

Comments

@oliverfoggin
Copy link

I have used Bolts with Objective-C before but when I installed this (through Cocoapods) I can't seem to use them.

I'm trying to create a Task of my own but when I use the code from the README...

func doSomethingAsync() -> Task<PFObject> {
}

I just get the error "Use of undeclared type 'Task'"

I don't think the README is correct as PFObject is not found in the entire project.

I can't seem to find an import that works.

Am I doing something wrong?

@nlutsenko
Copy link
Member

Hey @oliverfoggin, lets figure this out together!

  • I assume you added import BoltsSwift or @import BoltsSwift to the source file you are trying to use this from.
  • If there would be a chance you could publish a project that can reproduce an issue, or maybe a source file + pod file that you are trying to use BoltsSwift from - that would be also very helpful.

The PFObject example is something we used as a good example of the asynchronous API, that is currently being used and available in Parse ObjC SDK. I would gladly accept/review the PR that changes all of these to use Cocoa / Cocoa Touch set of frameworks and can showcase the API functionality.

@nlutsenko nlutsenko self-assigned this May 31, 2016
@oliverfoggin
Copy link
Author

Hi Nikita,

I couldn't find an import statement that was accepted and I had no auto completions for anything with Bolts or Swift in it. I'm away from my computer now but will try that as soon as I'm back.

I'll provide a project too if I can't get it working.

Thanks

Oliver

@nlutsenko
Copy link
Member

Perfect! Thanks for looking into this!

@nlutsenko
Copy link
Member

And you are right, it could be quite troublesome to find the proper import statement.
Am going to send a README patch that fixes it, so it's straightforward.

@oliverfoggin
Copy link
Author

Ah, excellent!

I had tried literally everything but BoltsSwift as an import.

With that it now all works.

Thanks for the help

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

No branches or pull requests

2 participants