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

ChartsDemo-swift.h file not found #31

Closed
ahmadabudawod opened this issue Apr 15, 2015 · 8 comments
Closed

ChartsDemo-swift.h file not found #31

ahmadabudawod opened this issue Apr 15, 2015 · 8 comments

Comments

@ahmadabudawod
Copy link

I have faced problem which describe by ( ChartsDemo-swift.h file not found ) i want to focused that everything is working correctly only this file isn't imported .

screen shot 2015-04-15 at 2 09 26 pm

@vishw3
Copy link

vishw3 commented Apr 15, 2015

actually it should be "yourprojectname-swift.h" if you are using in your project.

also in build phase check "Embedded content contains swift code"s should be yes

@danielgindi
Copy link
Collaborator

Thanks @vishw3

@ahmadabudawod
Copy link
Author

sorry for late but still have the same error

@allaire
Copy link

allaire commented Jun 26, 2015

@danielgindi @ahmadabudawod Please see http://stackoverflow.com/a/30648104/277370. When you use embedded framework, I had to do like the answer on SO. Using the #import <project>-Swift.h works well when you directly add the library files (Classes/) to your project (instead of just adding the .xcodeproj and add it to embed frameworks).

I think when you only add the xcodeproj, You must import it with #import "Charts/Charts-Swift.h"

@RbeiAppsTeam
Copy link

@allaire thumbs up. your solution helped me. I am not sure why, but the previous comments of importing #import -Swift.h did not solve the error.

@mobidever
Copy link

@allaire Thumbs up again. Hey @danielgindi I think the same can be updated for newbies. I was stuck with the same, being newbie to objc-swift bridging. Thanks again @allaire , you saved the day.

@inix
Copy link

inix commented Nov 3, 2016

@allaire
Xcode 8.1,iOS 10.1, I have this issue.
Thank you for your solution.

@srivastavag8
Copy link

put it in .m file and leave a forward declaration in .h

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

8 participants