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

Swift 3 Naming Collision #276

Closed
felix-dumit opened this issue Aug 30, 2016 · 6 comments · Fixed by #288
Closed

Swift 3 Naming Collision #276

felix-dumit opened this issue Aug 30, 2016 · 6 comments · Fixed by #288
Assignees

Comments

@felix-dumit
Copy link
Contributor

felix-dumit commented Aug 30, 2016

When the objc 'continueWith' methods for BFTask get imported into swift 3, they end up colliding with the continue keyword.

Since this objc method:

- (BFTask *)continueWithBlock:(BFContinuationBlock)block;

becomes:

func continue(with block:BFContinuationBlock)

Possible solution would be:

- (BFTask *)continueWithBlock:(BFContinuationBlock)block NS_SWIFT_NAME(continueWith(block:));

Update:
If you call the continue with the named parameter the compiler understands it. So this issue really only applies if trying to use trailing closures.

@nlutsenko
Copy link
Member

This sounds like a good potential improvement for method names.
Please consider using Bolts-Swift for pure Swift projects :P

@jyoon17
Copy link

jyoon17 commented Sep 22, 2016

How do I use Parse iOS SDK with Bolts-Swift?

@Vortec4800
Copy link

I am also running into this. While I would prefer to use Bolts-Swift, the Parse SDK calls for Bolts-ObjC so that's what I get.

@ziadtamim
Copy link

Same issue here.

@gesabo
Copy link

gesabo commented Oct 17, 2016

Same here

@singhnitesh
Copy link

Hi,
When I try to use the continueWithBlock method in swift3, I get a segmentation fault error.
I am using a chat library/framework which is in objc and uses bolts (v1.8.4), whenever I try to call continue(successBlock: or continue methods on a task, I get this error. Any advice?

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

Successfully merging a pull request may close this issue.

7 participants