Skip to content

Undefined Symbol Swift #196

@logannathanson

Description

@logannathanson

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions