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

Errors when adding swift package via xcode #3

Closed
Andrewpk opened this issue Aug 30, 2020 · 2 comments
Closed

Errors when adding swift package via xcode #3

Andrewpk opened this issue Aug 30, 2020 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@Andrewpk
Copy link

Andrewpk commented Aug 30, 2020

When adding the package as a dependency from xcode's add swift package dependency, I keep getting errors of this sort like it's not actually linking against the package properly:
Cannot convert value of type 'Example_App_Name.SafariView' to closure result type 'BetterSafariView.SafariView'

I've done the old derived data dance and still no luck, yet the demo project works fine.

Update:
I had been developing an app with xcode 12 beta, switched to xcode 11 & iOS 13 so I could get a testflight build uploaded, and that's when I started seeing breakage.
I just opened the demo app in xcode 11 and changed the deployment target to ios 13 and I see that there are quite a few errors, so now it makes a lot more sense.

I originally thought it was maybe a problem with the way I included the dep, or the SafariView.Configuration convenience init, but it looks like there are other issues.

@stleamist
Copy link
Owner

Hi @Andrewpk,

It seems like you have defined another SafariView symbol in your project namespace. That error means you may have passed your own SafariView type to the .safariView() modifier, instead of BetterSafariView's.

To resolve this naming conflict, you could try one of the following:

  1. Rename your own SafariView definition, or remove it.
  2. Pass it to the .safariView() modifier including its module name: BetterSafariView.SafariView.

Also, as it says on README, the demo wouldn't work on iOS 13, since it uses new features introduced in iOS 14 such as ColorPicker.

I would appreciate it if you keep me updated on this issue. 😃

@stleamist stleamist added the help wanted Extra attention is needed label Aug 30, 2020
@Andrewpk
Copy link
Author

I forgot I had a previous extension and some other nonsense due to me working too late on this project. I apologize - wholly my mistake, works great in Xcode 11!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants