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

Undefined Symbol Swift #196

Open
logannathanson opened this issue Aug 16, 2019 · 1 comment
Open

Undefined Symbol Swift #196

logannathanson opened this issue Aug 16, 2019 · 1 comment

Comments

@logannathanson
Copy link

Hello,

In my class I have import MapboxGeocoder

When I try to do `let geocoder = Geocoder(accessToken: "" I'm getting the follow errors:

image

And clicking into them, seeing

ld: warning: Could not find auto-linked framework 'MapboxGeocoder'
Undefined symbols for architecture x86_64:
  "type metadata accessor for MapboxGeocoder.Geocoder", referenced from:
      variable initialization expression of Project.MyViewController.geocoder : MapboxGeocoder.Geocoder in MyViewController.o
      Project.MyViewController.init(nibName: Swift.String?, bundle: __C.NSBundle?) -> Project.MyViewController in MyViewController.o
      Project.MyViewController.init(coder: __C.NSCoder) -> Project.MyViewController? in MyViewController.o
  "MapboxGeocoder.Geocoder.__allocating_init(accessToken: Swift.String?) -> MapboxGeocoder.Geocoder", referenced from:
      variable initialization expression of Project.MyViewController.geocoder : MapboxGeocoder.Geocoder in MyViewController.o
      Project.MyViewController.init(nibName: Swift.String?, bundle: __C.NSBundle?) -> Project.MyViewController in MyViewController.o
      Project.MyViewController.init(coder: __C.NSCoder) -> Project.MyViewController? in MyViewController.o

Without the init line of the geocoder, it all works.

I also tried adding the access token to my Plist instead, and get similar issues

@frederoni
Copy link
Contributor

How are you integrating the framework? Are you using CocoaPods or Carthage? Do you have a minimal sample project to reproduce the error? It looks like a linking error. What do you have in your FRAMEWORK_SEARCH_PATHS in build settings?

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

No branches or pull requests

2 participants