Skip to content
This repository has been archived by the owner on May 13, 2021. It is now read-only.

Swift 3 #14

Closed
piyush9290 opened this issue Sep 20, 2016 · 9 comments
Closed

Swift 3 #14

piyush9290 opened this issue Sep 20, 2016 · 9 comments

Comments

@piyush9290
Copy link

Hello Ayush,

I have updated my code to swift 3.0 but when I try to run, it gives me an legacy swift version error.
Later when I convert the dependency code, it gives me so many errors. Could you please check if the it is working or not?

screen shot 2016-09-20 at 4 37 09 pm

@ayushn21
Copy link
Owner

Hi Piyush,

This looks like an issue with your project. Please go to the project's build settings and set the "Use Legacy Swift Language Version" setting to "No".

screen shot 2016-09-20 at 9 42 51 pm

If you would like to use Swift 3 with this library, please don't convert the code yourself as it was not a trivial migration. Version 2.0.1 of the library is Swift 3 and available through CocoaPods, please use this version and you shouldn't have any trouble.

Let me know if you have any more problems!

Thanks,
Ayush

@piyush9290
Copy link
Author

Hello,

I have changed the project settings as you said but issue is still there.

Thanks,
Piyush

@ayushn21
Copy link
Owner

Ah, strange. Could you describe your project setup a bit please? Are you using CocoaPods? If you are, is this error in the "Pods" project or your main project?

@piyush9290
Copy link
Author

I'm using CocoaPods. The error is in Pods projects.

screen shot 2016-09-20 at 5 16 44 pm
screen shot 2016-09-20 at 5 16 54 pm
screen shot 2016-09-20 at 5 17 13 pm
screen shot 2016-09-20 at 5 18 43 pm

@ayushn21
Copy link
Owner

Ah I see, thanks for the screenshots. I've integrated the library using CocoaPods (as seen in the example project) so it does work. Could you tell me which version of CocoaPods you're using please? I know there are issues with Xcode 8 on older versions. Just run pod --version on Terminal.

@ayushn21
Copy link
Owner

Also could you please verify whether the Legacy Swift build setting is correct on the AvatarImageView target on the Pods project?

screen shot 2016-09-20 at 10 24 57 pm

@piyush9290
Copy link
Author

Yeah, AvatarImageView has "Use Legacy Swift Language Version" as Unspecified. Now it's working.
Thank You Ayush

@drinkius
Copy link

drinkius commented Oct 1, 2016

Same problem here, by default the pod was installed with "Unspecified" legacy setting. I think it should be fixed in the pod specification somewhere

@ayushn21
Copy link
Owner

ayushn21 commented Oct 3, 2016

@drinkius,

A workaround can be specified in the Podfile, can't do anything in the podspec unfortunately :(

CocoaPods/CocoaPods#5521

@ayushn21 ayushn21 reopened this Oct 3, 2016
@ayushn21 ayushn21 closed this as completed Oct 3, 2016
Repository owner locked and limited conversation to collaborators Oct 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants