quassum / SwiftUI-Tooltip

Easy Tooltip for your SwiftUI Project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Package unusable due to access control

avi-screenovate opened this issue · comments

Describe the bug
I added this package to my Xcode project, and I am unable to use it because the View extension methods are not public.

To Reproduce
Steps to reproduce the behavior:

  1. Add package to Xcode project
  2. Import SwiftUITooltip into ContentView.swift
  3. Attempt to invoke tooltip(...) method.
  4. See compiler error.

Expected behavior
The methods should be accessible.

commented

Will this be fixed?

Hey, I didn't have any time at all for this, but I'll try to fix it today ;)

Hey @LilaQ @avi-screenovate ! It should work now 🥸 At least it works for me 😇 Sorry for fixing this forever 😳

@bring-shrubbery

  1. I've just started using this package (v1.0.2), and I still see this error. Would you be able to fix it?
  2. Also is there an option to hide/show the tooltip? If not, would you be able to add that feature?

'DefaultTooltipConfig' initializer is inaccessible due to 'internal' protection level

image

@tobyloki Could you provide versions of xcode/macos you use?

I use XCode 12.5.1 and the Mac Mini 2020 with the M1 chip and the latest Big Sur.

Ah, my bad, somehow I missed making the initializer itself public.

Try again with v1.0.3, should be working now :)

@tobyloki Tell me if there are still any issues ;)

I tried it out and it works now. Thanks. I did just have to fix one build error in TooltipConfig.swift by simply removing all the keyword public as shown in the below image, and then it built successfully.

image

Weird that I didn't get this error, but I'll remove those in a bit. Thanks for helping me out solving this issue!