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

iOS7 can't build success #136

Closed
edison0951 opened this issue Jun 8, 2015 · 11 comments
Closed

iOS7 can't build success #136

edison0951 opened this issue Jun 8, 2015 · 11 comments

Comments

@edison0951
Copy link

I have add all swift code to my project and setting the xxxx-Swift.h and xxxx-Bridging-Header.h. When I use in some objective-c file, so I "#import "xxxx-Swift.h". But it will build error. I use demo project, it works because it import as Framework,so what can I do in iOS7?

@edison0951
Copy link
Author

I have resolved

@liuxuan30
Copy link
Member

You might want to post a solution if anyone had same issue.

For me, I have to drag the swift files into project and check embdded contents with swift code, and set a module name, so it will have a bridge header.

@Nobin272
Copy link

Hi, I have problem in building the project with the iOS-Charts (Objective-C). I need to include iOS7 support as well. I am getting "Duplicate interface definition for Class 'ChartData'" errors in ${PROJECT_NAME}-swift.h file.

Kindly advice and I am stuck here. :(

@danielgindi
Copy link
Collaborator

Check to see if you've included it twice. Maybe as code AND as a
framework?..

@Nobin272
Copy link

Hi Daniel,
Thanks for the quick response. I checked that.
I followed the below steps:

  1. Copy the entire "Charts" folder into project (Including Project file.)
  2. Add the Project framework as Embedded Binaries as per the guideline.
  3. Enable the "Embedded Content Contains Swift Code" in Build settings.

I am just confused with steps for iOS7, Copying all the swift files in to the project.
this step is after including the Project as Embedded Binary?

@danielgindi
Copy link
Collaborator

danielgindi commented Jun 24, 2015 via email

@liuxuan30
Copy link
Member

2. Add the Project framework as Embedded Binaries as per the guideline.
is causing duplicated errors I think.

You only need to use swift code files if you want to support iOS 7. Don't link the framework again. Project file is also useless. Think about the swift file as .h and .m merged together.

@Nobin272
Copy link

Thanks Daniel, Xuan. Now it seems to be building fine.

I removed the "Embedded Binary" linking and Project File from the project.

  1. Only added the Swift files in project.
  2. Built it. 👍

Really appreciated your help. Its a great library.

@mika76
Copy link

mika76 commented Jun 25, 2015

What about the supporting files folder? Also how do you then use this? I can't seem to find a ChartViewController or anything of the sort?

@Nobin272
Copy link

I added Supporting Files also ("Charts.h"). Then import "@{SWIFT_MODULENAME}-Swift.h" and "Charts.h" file in viewcontroller. Then You will be able to use those classes.

@Airsola
Copy link

Airsola commented Dec 11, 2015

@Nobin272 thx~

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

6 participants