ChartsDemo-swift.h file not found

Created on 15 Apr 2015  ·  8Comments  ·  Source: danielgindi/Charts

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

Most helpful comment

@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"

All 8 comments

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

Thanks @vishw3

sorry for late but still have the same error

@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"

@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.

@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.

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kirti0525 picture kirti0525  ·  3Comments

cilasgimenez picture cilasgimenez  ·  4Comments

ahmedsafadii picture ahmedsafadii  ·  3Comments

guoyutaog picture guoyutaog  ·  3Comments

anhltse03448 picture anhltse03448  ·  3Comments