mapbox / mapbox/MapboxGeocoder.swift

Undefined Symbol Swift

Open
#196 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
133
Forks
46
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin with the MapboxGeocoder import and Geocoder(accessToken:) call shown in the report, then inspect how the framework is linked for the x86_64 target. Reproduce the undefined-symbol and auto-linked-framework messages in the reported MyViewController context; done means the initializer links successfully, including when the token is supplied through the plist.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.