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

2.5.3 SPM Won't compile #423

Open
tristangrichard opened this issue Jul 17, 2020 · 10 comments
Open

2.5.3 SPM Won't compile #423

tristangrichard opened this issue Jul 17, 2020 · 10 comments
Assignees

Comments

@tristangrichard
Copy link
Contributor

tristangrichard commented Jul 17, 2020

Describe the bug
2.5.3 with SPM won't build
Xcode 11.6
To Reproduce
Steps to reproduce the behavior:
Remove 2.5.2 from carthage folder
Add 2.5.3 to SPM

Expected behavior
Projects builds

Behaviour
CropViewController.swift

Use of undeclared type 'TOCropViewControllerAspectRatioPreset'
Use of undeclared type 'TOCropViewControllerToolbarPosition'
Use of undeclared type 'TOCropViewCroppingStyle'
@objc attribute used without importing module 'Foundation'
.....
@tristangrichard tristangrichard changed the title 2.5.3 SPM U 2.5.3 SPM Won't compile Jul 17, 2020
@waldo9
Copy link

waldo9 commented Jul 18, 2020

Same happens here

@TimOliver
Copy link
Owner

Thanks for the feedback folks! I just merged in a new PR by @jeffreybergier and cut a new release of v2.5.4.

Jeff did uncover one specific quirk I didn't know about. Xcode 11 doesn't support SPM packages that contain resources (This project has localisation strings). The PR he submitted gets resources working in Xcode 12, but until Xcode 12 has left beta, it's worth pointing out that this library is stuck in English if you install it via SPM.

Please give v2.5.4 a shot and tell me how it goes!

@TimOliver TimOliver added the rfc label Jul 20, 2020
@jeffreybergier
Copy link
Contributor

Actually, with the merged changes it won't work via SPM in Xcode 11. It will complain about swift version. Swift 5.3 and Xcode 12 are required to include this package via SPM. Sorry. Its just a technical limitation of SPM :-/

@TimOliver
Copy link
Owner

Uhhh. Oh no. Really? There's no backwards compatibility at all?

Um, okay. I'm open to suggestions on the best way of supporting this then. 😅

@jeffreybergier
Copy link
Contributor

I think you'll need to keep an xcode11 branch alive to keep backwards compatibility. Or revert the changes, and then create an xcode12 branch that is ready to merge when Xcode 12 goes out of beta.

@jeffreybergier
Copy link
Contributor

but yeah. I almost question supporting SPM in Xcode 11 as it doesn't support localizations... which is pretty bad. Like it could be a bad mistake for a developer to make... thinking they can switch from Cocoapods to SPM and get the same functionality (which I think is a totally fair assumption). I think it makes a clearer stance to say "because of technical limitations of SPM and localizations, I can only support Xcode 12 and higher for SPM"

@Harout360
Copy link
Contributor

#425 removed localization support on this PR, building for me now on 11.6

@TimOliver
Copy link
Owner

Awesome! Thanks for that @Harout360! I just merged your changes in. Thanks for confirming it's working.

I've stored @jeffreybergier's original changes into a separate branch now, so when Xcode 12 is properly out, we can revisit this then. :)

@ethanwa
Copy link

ethanwa commented Sep 28, 2020

Xcode 12 is now out.

@TimOliver
Copy link
Owner

So it is! 😆

(Were you going somewhere with that? 😝)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants