mapbox / mapbox/MapboxGeocoder.swift

Undefined Symbol Swift

未关闭
#196 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Swift
星标
133
派生
46
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从报告中所示的 MapboxGeocoder import 和 Geocoder(accessToken:) 调用开始,然后检查 framework 如何为 x86_64 目标进行链接。在报告的 MyViewController 上下文中重现 undefined-symbol 和 auto-linked-framework 消息;当 initializer 成功链接时即表示完成,包括通过 plist 提供 token 的情况。

由索引模型根据 Issue 内容生成。

评估

技术栈
swift
领域
mobile
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。