stephencelis / SQLite.swift

A type-safe, Swift-language layer over SQLite3.
MIT License
9.72k stars 1.57k forks source link

Integrate SQLite code directly into project - Did a few renames - one last issue not sure what is causing it. - Help #1235

Closed waelsaad closed 9 months ago

waelsaad commented 9 months ago

I am integrating the SQLlite code directly, I did the following renames as it was clashing with Swift stuff. I have one remaining issue

Latest Xcode Version 15.2 (15C500b) and latest SQLite

Here is what I did rename Binding to SQLBinding rename Value to SQLValue rename View to SQLView rename Number to SQLNumber rename result to SQLResult

rename Cipher.swift file to SQLCipher.swift

Now where ever I have any class that implements UIViewRepresentable it complains that

Type 'BlurView' does not conform to protocol 'UIViewRepresentable'

To replicate simply paste the following into the SQLite project in any file

import SwiftUI
@available(iOSApplicationExtension 13.0, *)
struct BlurView: UIViewRepresentable {

    init(style: UIBlurEffect.Style) {
        self.style = style
    }

    private let style: UIBlurEffect.Style

    func makeUIView(context: Context) -> UIView {
        let effect = UIBlurEffect(style: style)
        let view = UIVisualEffectView(effect: effect)
        return view
    }

    func updateUIView(_ uiView: UIView, context: Context) {}
}

Any idea what is causing this please? Thanks

waelsaad commented 9 months ago

I found the issue I had to also rename Context to SQLContext so here is what needs to be done if you want to get rid of the warnings and / or integrate the latest SQLite directly :-

rename Binding to SQLBinding
rename Value to SQLValue
rename View to SQLView 
rename Number to SQLNumber
rename result to SQLResult
rename Context to SQLContext

I prefer also to rename Cipher.swift file to SQLCipher.swift

I just have 1500 SwiftLint warnings to go thru.