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

run the demo,result in " Xcode a declaration cannot be both 'final' and 'dynamic' " #7

Closed
sishenyihuba opened this issue Jan 3, 2017 · 10 comments

Comments

@sishenyihuba
Copy link

sishenyihuba commented Jan 3, 2017

I run the demo,result in " Xcode a declaration cannot be both 'final' and 'dynamic' "

I search on stackoverflow,find out that do not let static class property in extension class. Is there any solution?

@lkzhao
Copy link
Collaborator

lkzhao commented Jan 3, 2017

Could you give me more context? Which line are you getting this error on?

@yongseongkim
Copy link

yongseongkim commented Jan 5, 2017

Same event happened to me. When just run the examples project in Xcode 8.0, build failed.
it is swift compile error. a declaration cannot be both 'final' and 'dynamic'

@lkzhao
Copy link
Collaborator

lkzhao commented Jan 5, 2017

@yongseongkim Can you give me a screen shot or line number?

@yongseongkim
Copy link

yongseongkim commented Jan 5, 2017

OSX ElCapitan Xcode 8.0
image

@lkzhao
Copy link
Collaborator

lkzhao commented Jan 5, 2017

Somehow I am not getting this. If you change all static keyword to class in CAMediaTimingFunction+Hero.swift. Do you still get this error?

@lkzhao
Copy link
Collaborator

lkzhao commented Jan 5, 2017

Nvm that shouldn't work.

@lkzhao
Copy link
Collaborator

lkzhao commented Jan 5, 2017

It is something about this: http://stackoverflow.com/questions/29814706/a-declaration-cannot-be-both-final-and-dynamic-error-in-swift-1-2
I wont be able to dig deeper these two days. Will come back to this later. I would recommend updating your Xcode. I have no problem with Xcode 8.2.1

@yongseongkim
Copy link

yongseongkim commented Jan 5, 2017

I solved the problem by inserting @nonobjc annotation.
Thanks for your consideration.

@lkzhao
Copy link
Collaborator

lkzhao commented Jan 5, 2017

@yongseongkim This is probably just a Xcode version issue. Please update your Xcode to 8.2 and above. Your source change will be overridden the next time you do a 'pod install'.

Thank you all for reporting this. 😆 I have updated Xcode version the README.

@lkzhao lkzhao closed this as completed Jan 5, 2017
@sishenyihuba
Copy link
Author

sishenyihuba commented Jan 6, 2017 via email

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

No branches or pull requests

3 participants