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

Set legacy swift version #16

Merged
merged 1 commit into from
Oct 7, 2016
Merged

Set legacy swift version #16

merged 1 commit into from
Oct 7, 2016

Conversation

NiklasMerz
Copy link
Contributor

I had the issue that i could not build via CLI because the swift version was not set in build settings. close #15 .

I resolved this for by setting the project to swift version 3 for Xcode 8. Do you think this could be relevant for this plugin or is there a better approach to this?

@bugnano
Copy link
Contributor

bugnano commented Oct 1, 2016

I was about to make the same patch.
As of now the CLI compilation is broken in XCode version 8.

If someone is still using XCode version 7, or a Swift version lower than 3, he can always use version 1.3.2 of this plugin.

Can this pull request be merged and a new version of the plugin be made, please?

@bitjson
Copy link

bitjson commented Oct 5, 2016

I needed this immediately across quite a few machines, so I set up a fork here: https://github.com/bitjson/cordova-plugin-swift-support

It's available via:

cordova plugin add cordova-plugin-swift-support --save

I also cleaned up the repo a bit, added "tests" that lint with xo, and added a small release process which generates a changelog.

@akofman – this is a fantastic project, thanks for getting it started! If you're still interested in actively maintaining it, I'd be happy to submit a pull request and direct my fork here. (Includes squashing @NiklasMerz's commits down into a single one here: bitjson@0994f93)

Copy link

@bitjson bitjson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to squash this all into a single commit, since several commits cancel each other out.

@NiklasMerz
Copy link
Contributor Author

@bitjson I could doch that. But the merge will be one commit anyway. I had to try some stuff. Is there an easy option to conclude this in one commit?

@bitjson
Copy link

bitjson commented Oct 6, 2016

@NiklasMerz you can checkout the branch you made the changes on (looks like master), and step back through your commits one at a time:

git reset --soft HEAD~1

Until git log show that the last commit was not yours. Then just commit your changes again, and force push to your PR branch to update the PR:

git commit add .
git commit -m "feat(hook): Swift 3 support"
git push origin HEAD --force

@NiklasMerz
Copy link
Contributor Author

I have changed this to one commit like suggested

@bitjson Thank you for this advice. Your suggested approach is faster than mine

@akofman
Copy link
Owner

akofman commented Oct 7, 2016

Guys it looks perfect ! Thanks for this work.
@bitjson : FYI you can add a plugin from a github url, you don't have to publish it in order to install it. And of course PR are more than welcome ! Your fork looks interesting :)

@akofman akofman closed this Oct 7, 2016
@akofman akofman reopened this Oct 7, 2016
@akofman akofman merged commit 3ad027b into akofman:master Oct 7, 2016
@NiklasMerz
Copy link
Contributor Author

I did this with my cordova plugin. I added my fork via the github url. After the next release I will change it to this npm package again
On Freitag, 7. Oktober 2016 Alexis Kofman notifications@github.com wrote:

Merged #16.


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

@akofman
Copy link
Owner

akofman commented Oct 7, 2016

It is released and published on npm, you can use the version 1.4.0.

@akofman
Copy link
Owner

akofman commented Oct 14, 2016

Hello guys, fyi I just added the availability to still use a legacy Swift codebase with the following preference :
<preference name="UseLegacySwiftLanguageVersion" value="true" />

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

Successfully merging this pull request may close these issues.

Set "Legacy Swift Language Version"
4 participants