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

Linking error when building for real iOS device with XCode 12 (works on simulator) #2852

Closed
samcrawford opened this issue Mar 7, 2021 · 1 comment

Comments

@samcrawford
Copy link

samcrawford commented Mar 7, 2021

Mapbox Navigation SDK version: 1.2.1
XCode version: 12.4
Cocoeapods version: 1.10.1

Issue

I'm trying to integrate Mapbox Navigation into an existing Swift app, which already uses the Mapbox iOS SDK. I added the Podfile entry, and can build it and run it on the simulator. However, when building for a real device attached to the Mac I get the following error:

Building for iOS, but linking in dylib file (/Users/sam/Library/Developer/Xcode/DerivedData/ios-cmobagmodbdjaudrzlbsisjqppwo/Build/Products/Debug-iphoneos/MapboxAccounts.framework/MapboxAccounts) built for Mac Catalyst, file '/Users/sam/Library/Developer/Xcode/DerivedData/ios-cmobagmodbdjaudrzlbsisjqppwo/Build/Products/Debug-iphoneos/MapboxAccounts.framework/MapboxAccounts' for architecture arm64

Steps to reproduce

  1. Create an XCode project using the below Podfile
  2. Build for a real iOS device, attached via USB to the Mac, observe the failure above

Podfile:

platform :ios, '13.0'

target 'ios' do
  use_frameworks!

  # Pods for ios
  pod 'Mapbox-iOS-SDK', '~> 6.3.0'
  pod 'MapboxGeocoder.swift', '~> 0.13'
  pod 'MapboxAnnotationExtension', '0.0.1-beta.2'
  pod 'MapboxStatic.swift', '~> 0.12'
  pod 'MapboxNavigation', '~> 1.2.1'
  pod 'Turf', '~> 1.1'
  pod 'Alamofire', '~> 5.2'
  pod 'OverlayContainer'
  pod 'RadioGroup'
  pod 'Charts'
  pod 'MTSlideToOpen'
  pod 'GoogleSignIn'
  pod 'Sentry', :git => 'https://github.com/getsentry/sentry-cocoa.git', :tag => '6.1.4'
end

Expected behavior

I should be able to build the project.

Actual behavior

I am unable to build the project.

@1ec5
Copy link
Contributor

1ec5 commented Mar 9, 2021

Looks like a duplicate of #2674.

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