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

'chartsample-Swift.h' file not found #87

Closed
alfredangkasa opened this issue May 14, 2015 · 23 comments
Closed

'chartsample-Swift.h' file not found #87

alfredangkasa opened this issue May 14, 2015 · 23 comments

Comments

@alfredangkasa
Copy link

Hi,

I already do :

  1. Drag the Charts.xcodeproj to your project
  2. Go to your target's settings, hit the "+" under the "Embedded Binaries" section, and select the Charts.framework
  3. @import Charts

I also create a .h file call ChartsDemo-Bridging-Header.h which contains :

import <Charts/Charts.h>

import "chartsample-Swift.h"

Whenever I build the apps, it give me this error :

  1. /Users/alfredangkasa/Documents/Mac/SIMPLE APPS/chartsample/chartsample/ChartsDemo-Bridging-Header.h:13:9: error: 'chartsample-Swift.h' file not found

import "chartsample-Swift.h"

  1. :0: error: failed to import bridging header '/Users/alfredangkasa/Documents/Mac/SIMPLE APPS/chartsample/chartsample/ChartsDemo-Bridging-Header.h'

Anything wrong? Thanks.

screen shot 2015-05-14 at 9 05 26 pm
screen shot 2015-05-14 at 9 05 37 pm

@danielgindi
Copy link
Collaborator

You shouldn't create a Bridging header.

@danielgindi
Copy link
Collaborator

Read the instructions again.

@alfredangkasa
Copy link
Author

Hi, thanks for your code.. I just convert the barLineChart to Swift version perfectly.

But why for this line I keep hit the error?
xAxis.labelPosition = XAxisLabelPosition.Bottom;

@danielgindi
Copy link
Collaborator

You should make sure you are using the latest Xcode.

@mmckinley8
Copy link

I'm having the same issue, I did not create a bridging header. Followed all steps correctly, any ideas?

@danielgindi
Copy link
Collaborator

No need to create a bridging header. Xcode creates a bridging header when
you declare your project as a mixed Swift/ObjC project.

On Thu, May 21, 2015 at 6:02 PM, mmckinley8 [email protected]
wrote:

I'm having the same issue, I did not create a bridging header. Followed
all steps correctly, any ideas?


Reply to this email directly or view it on GitHub
#87 (comment)
.

@alfredangkasa
Copy link
Author

@mmckinley8 , no need to create the header.. Just follow what @danielgindi wrote.as simple as that. trust me. :)

@mmckinley8
Copy link

I know, I said I did NOT create a bridging header. I followed all of the steps exactly, still failure to import bridging header..is this because I already had a bridging header in my project for other frameworks that I have imported?

@alfredangkasa
Copy link
Author

@mmckinley8 can you upload a screenshot so i can see? how about the build setting?

@mmckinley8
Copy link

Yeah, I will in a few minutes

@mmckinley8
Copy link

So since I am using swift, I do not to #import <ChartsDemo-Swift.>???

@mmckinley8
Copy link

ChartsDemo-Swift.h

@danielgindi
Copy link
Collaborator

If you are using Swift, you do not need a bridging header, and never have
to import anything

On Thu, May 21, 2015 at 6:26 PM, mmckinley8 [email protected]
wrote:

ChartsDemo-Swift.h


Reply to this email directly or view it on GitHub
#87 (comment)
.

@mmckinley8
Copy link

Okay, now it just says Build Failed and doesn't give me any errors.

@danielgindi
Copy link
Collaborator

And ChartsDemo-Swift.h is the bridging header for ChartsDemo project. Not
for anything else.

On Thu, May 21, 2015 at 6:26 PM, Daniel Cohen Gindi [email protected]
wrote:

If you are using Swift, you do not need a bridging header, and never have
to import anything

On Thu, May 21, 2015 at 6:26 PM, mmckinley8 [email protected]
wrote:

ChartsDemo-Swift.h


Reply to this email directly or view it on GitHub
#87 (comment)
.

@mmckinley8
Copy link

"No such module 'Charts'"

@mmckinley8
Copy link

This project is using cocoapods, I don't think that should matter

@mmckinley8
Copy link

screen shot 2015-05-21 at 11 33 45 am

@mmckinley8
Copy link

screen shot 2015-05-21 at 11 37 59 am

@ghost
Copy link

ghost commented May 27, 2015

Hi @danielgindi very awesome work, I am creating a demo for test the library on swift (when is finished I could share over github the project because I noticed that many people ask for help on Swift), anyway, the project builds and runs ok (with no data, am still on that) but now I have the same Issue of @alfredangkasa

Error with this line: xAxis.labelPosition = XAxisLabelPosition.Bottom

captura de pantalla 2015-05-27 a las 11 24 39

Thanks in advance, and great work.

@danielgindi
Copy link
Collaborator

Try to leave as it .Bottom and not XAxisLabelPosition.Bottom

On Wed, May 27, 2015 at 7:29 PM, Benjamín Rivero [email protected]
wrote:

Hi @danielgindi https://github.com/danielgindi very awesome work, I am
creating a demo for test the library on swift (when is finished I could
share over github the project because I noticed that many people ask for
help on Swift), anyway, the project builds and runs ok (with no data, am
still on that) but now I have the same Issue of @alfredangkasa
https://github.com/alfredangkasa

Error with this line: xAxis.labelPosition = XAxisLabelPosition.Bottom

[image: captura de pantalla 2015-05-27 a las 11 24 39]
https://cloud.githubusercontent.com/assets/306991/7841612/639bfeae-0463-11e5-8ac0-60943cd60cef.png

Thanks in advance, and great work.


Reply to this email directly or view it on GitHub
#87 (comment)
.

@ghost
Copy link

ghost commented May 27, 2015

Thanks, it Works!!!

@raju123lexicon
Copy link

Hi
I implemented chart graph in my mac book successfully,but when I run the my project in another mac book it shows the chart.framework is not found.Please give me solution

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

4 participants