iOS7 can't build success
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?
I have resolved
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.
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. :(
Check to see if you've included it twice. Maybe as code AND as a framework?..
Hi Daniel, Thanks for the quick response. I checked that. I followed the below steps:
- Copy the entire "Charts" folder into project (Including Project file.)
- Add the Project framework as Embedded Binaries as per the guideline.
- 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?
It's either or
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.
Thanks Daniel, Xuan. Now it seems to be building fine.
I removed the "Embedded Binary" linking and Project File from the project.
- Only added the Swift files in project.
- Built it. :+1:
Really appreciated your help. Its a great library.
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?
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.
@Nobin272 thx~