RastislavMirek / FlexColorPicker

Modern color picker library written in Swift 5 that can be easily extended and customized. It aims to provide great UX and performance with stable, quality code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Import with XCode 11 SwiftPackageManager doesn´t compile

Chrichton opened this issue · comments

Hi Rastislav,
thank you so much for updating Package.Swift
The import via XCode 11/Swift Packages/Add Package Dependency now works. :-)

But unfortunately, I get 104 Compiler Errors.

The first one is:
//
// LimitedGestureViewDelegate.swift
// FlexColorPicker
//
// Created by Rastislav Mirek on 29/9/19.
//
// MIT License
// Copyright (c) 2018 Rastislav Mirek
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:

// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//

public protocol LimitedGestureViewDelegate {
func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool
}
Use of undeclared type 'UIGestureRecognizer'

Am I doing something wrong?

Hi Heiko, I am working on it. Give me 1 hour and try again. Let me know if it does not work after 1 hour. And sorry for the trouble. This is my bad. I will release 1.3.1. that should finally work.

Ok, I might need more than 1 hour but you should have it fix by this evening

Finally it's pushed, please try it now and let me know if it works. It's new version 1.3.1

Hi,

I got another error with 1.3.1

/var/folders/03/1cwvdlhj0kl0rgytrf0r2s4r0000gn/T/TemporaryFile.uvjtFa.swift:38:5: error: argument 'platforms' must precede argument 'products'
    platforms: [
~~~~^~~~~~~~~~~~

Never ending story... Ok, fix comming right now.

Thanks. Please tag it such that the update can be picked up by SPM

Sorry for the trouble... I have never dealt with SPM before, I am all old school Cocoapods guy. How does it look now? I expect couple of compile errors now but at least that would be step forward.

Much better. SPM trouble seems to be over now. Thanks.
But indeed there are compile errors:
import UIKit in LimitedGestureViewDelegate.swift, ColorPaleteControl.swift

I can add the explicit UIKit import to LimitedGestureViewDelegate.swift but it is already in ColorPaleteControl... By any chance did you mean some other class?

No I see the use of undeclared type error in LimitedGestureViewDelegate.swift
Screenshot 2019-10-09 at 19 50 02

If that's the only compile error you see it should be fixed now. Please try again. And your help is very apreciated.

Unfortunately it is not the only compile error: I think this should help
In RectangularHSBPaletteDelegate.swift, CGPointExtension.swift and CGRectExtension.swift replace import Foundation by import UIKit

I do not understand why SPM would need that but it's done. Please try now, finger crossed that it finally works.

Just 6 issues left. All of them should be done by replacing import Foundation by import UIKit in CGRectExtension.swift

Changed the import. Are we there yet? Anybody else sees more errors?

It works now. No more error!! Migration to SPM is completed.
Thanks a lot @RastislavMirek

Superb! Thanks a lot. Rastislav, if you like would you like to tell me, what you do professionally and how it you comes, you support such a nice Module for free. Best regards from Heiko

Professionally, I develop made to order iOS and React apps. FlexColorPicker is spin-off from one of my personal projects (EasyType Keyboard). I support it because it is used and because there seems to be no alternative "hackable" color picker for Swift.