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

Unable to convert charts to Swift3 #1277

Closed
edwardconcertcare opened this issue Jul 30, 2016 · 9 comments
Closed

Unable to convert charts to Swift3 #1277

edwardconcertcare opened this issue Jul 30, 2016 · 9 comments

Comments

@edwardconcertcare
Copy link

I tried to work on this with Xcode 8 beta with swift 3. I install this with cocopods and when I open the workspace file itself, Xcode asked for swift code conversion and I have converted using the tool. Then, when I ran it, it threw error and I fixed those issues. When I ran the project again, it threw error. It did not conclude, it went on like this. Some time, I got fed up of this conversion and left this library.

I checked in swift2. it work properly. Please give us swift3 support for us to integrate it in our project. Waiting for the community reply.

Thanks.

@liuxuan30
Copy link
Member

take Swift 3 branch for beta testing.

@edwardconcertcare
Copy link
Author

edwardconcertcare commented Aug 1, 2016

I checked out Swift-3.0 branch also and it does not seem to work with Xcode 8 beta. When I open Charts Demo which is done with objective C, it does not work. It throws lots of error in Charts.xcodeproj file.

Even if we convert Charts.xcodeproj to latest swift code using Xcode also, it does not work.

Then, I deleted and clone the repository again and created a new project and included Charts.xcodeproj in that. Even there, build fails, it did not throw error. When Looked into that deeply to the code, still, it was not converted. When I try to convert that also, there is no success.

@liuxuan30
Copy link
Member

liuxuan30 commented Aug 2, 2016

Simply saying 'it does not work' can't help at all. The swift 3.0 branch is converted by Xcode 8 beta, and I don't know why you said 'it was not converted' or 'does not work'.

As I mentioned in another post, if you want to run ChartsDemo or support Realm, you need to remove the whole Realm support #1269.

One more thing, if you have you apps that needs this library, you can leverage Xcode 8 beta to convert the code for you, if you are using the Source code. If you use framework, you can build the framework on Swift 3.0 branch by yourself. If you needs Realm, then you have to wait.

Currently, because swift 3 is under beta, and keeps changing the syntax, we don't want to put too much effort on swift 3 and pods modification, so some work(mostly convert and rebuild) needs done by you. We just provide a branch that can help test the app, but only until swift 3 is released will we provide the support for swift 3.

@bagexito
Copy link

xcode 8 is released what can i do to make it work?

@bagexito
Copy link

bagexito commented Sep 15, 2016

conversion to swift 2.3 and 3.0 fails. Enable legacy version used is not working as well

@ericjsalazar
Copy link

I am also having issues getting Charts to work with the new Xcode 8. Are there any recommendations or answers on how to get it to work?

“Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.

Converting it to swift 2.3 or swift 3.0 through Xcode leads to over 500 issues.

Thanks in advance.

@edwardconcertcare
Copy link
Author

I have tried to convert charts like that. But, that was not a successful one. It threw more than hundred errors. I was not able to fix it. That's why, I mailed you. May be, we need to take each and everything manually and convert it.

That would be a better idea.

-----Original Message-----
From: "ericjsalazar" notifications@github.com
Sent: Friday, September 16, 2016 11:47pm
To: "danielgindi/Charts" Charts@noreply.github.com
Cc: "edwardconcertcare" esagayaraj@concertcare.com, "Author" author@noreply.github.com
Subject: Re: [danielgindi/Charts] Unable to convert charts to Swift3 (#1277)

I am also having issues getting Charts to work with the new Xcode 8. Are there any recommendations or answers on how to get it to work?
“Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.
Converting it to swift 2.3 or swift 3.0 through Xcode leads to over 500 issues.
Thanks in advance.

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub , or mute the thread .

@liuxuan30
Copy link
Member

why don't you check out working branches?

@bagexito
Copy link

swift 3.0 branch worked for me

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