mapbox / mapbox/mapbox-navigation-ios

Linker error with Xcode 12 and CocoaPods 1.9.3 — building for iOS, but linking in dylib file

Open
#2,674 35 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

build jira-sync-complete
Dominant language
Swift
Stars
918
Forks
326
Avg merge
1h 16m
Merged PRs (30d)
3

Description

Progress. I can now install v1.0.0 with cocoapods without error. However I cannot build for any iOS target other than simulator. I get the error:

`ld: building for iOS, but linking in dylib file (/Users/mjc/Library/Developer/Xcode/DerivedData/test-eogwsxynjracdvgsbxwkmhvsrfzy/Build/Products/Debug-iphoneos/MapboxCommon.framework/MapboxCommon) built for iOS Simulator, file '/Users/mjc/Library/Developer/Xcode/DerivedData/test-eogwsxynjracdvgsbxwkmhvsrfzy/Build/Products/Debug-iphoneos/MapboxCommon.framework/MapboxCommon' for architecture arm64
`

I tested this by creating a new empty Xcode project and a new Podfile:

```
source 'https://github.com/CocoaPods/Specs.git'

# Uncomment the next line to define a global platform for your project
platform :ios, '12.0'

inhibit_all_warnings!

target 'test' do
use_frameworks!
pod 'MapboxNavigation', '~> 1.0'
end

```

Using Xcode 12.0.1
pod version 1.9.3

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

Start with the provided Podfile, the empty Xcode project, and the stated Xcode 12.0.1 and CocoaPods 1.9.3 versions. Reproduce the device build and compare it with the simulator build; done means the MapboxNavigation pod builds for an iOS target without linking a simulator-only MapboxCommon binary.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.