Skip to content

Instantly share code, notes, and snippets.

@1ec5
Created March 10, 2021 02:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1ec5/4356da6b9d596732d5a5174d74257821 to your computer and use it in GitHub Desktop.
Save 1ec5/4356da6b9d596732d5a5174d74257821 to your computer and use it in GitHub Desktop.
Installing mapbox/mapbox-navigation-ios#2834 using CocoaPods
Pod::Spec.new do |s|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.name = "MapboxCoreNavigation"
s.version = '2.0.0-alpha.3.1'
s.summary = "Core components for turn-by-turn navigation on iOS."
s.description = <<-DESC
Mapbox Core Navigation provides the core spatial and timing logic for turn-by-turn navigation along a route. For a complete turn-by-turn navigation interface, use the Mapbox Navigation SDK for iOS (MapboxNavigation).
DESC
s.homepage = "https://docs.mapbox.com/ios/navigation/"
s.documentation_url = "https://docs.mapbox.com/ios/api/navigation/"
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.license = { :type => "Mapbox Terms of Service", :file => "LICENSE.md" }
# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.author = { "Mapbox" => "mobile@mapbox.com" }
s.social_media_url = "https://twitter.com/mapbox"
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.ios.deployment_target = "11.0"
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.source = { :git => "https://github.com/mapbox/mapbox-navigation-ios.git", :branch => "pad-ehorizon" }
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.source_files = "Sources/{MapboxCoreNavigation,CMapboxCoreNavigation/include}/**/*.{h,m,swift}"
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.requires_arc = true
s.module_name = "MapboxCoreNavigation"
s.dependency "MapboxNavigationNative", "~> 45.0.1"
s.dependency "MapboxDirections-pre", "2.0.0-alpha.2"
s.dependency "MapboxMobileEvents", "~> 0.10.2" # Always specify a patch release if pre-v1.0
s.dependency "Turf", "2.0.0-alpha.3"
s.swift_version = "5.0"
end
Pod::Spec.new do |s|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.name = "MapboxNavigation"
s.version = '2.0.0-alpha.3.1'
s.summary = "Complete turn-by-turn navigation interface for iOS."
s.description = <<-DESC
The Mapbox Navigation SDK for iOS is a drop-in interface for turn-by-turn navigation along a route, complete with a well-designed map and easy-to-understand spoken directions. Routes are powered by Mapbox Directions.
DESC
s.homepage = "https://docs.mapbox.com/ios/navigation/"
s.documentation_url = "https://docs.mapbox.com/ios/api/navigation/"
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.license = { :type => "Mapbox Terms of Service", :file => "LICENSE.md" }
# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.author = { "Mapbox" => "mobile@mapbox.com" }
s.social_media_url = "https://twitter.com/mapbox"
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.ios.deployment_target = "11.0"
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.source = { :git => "https://github.com/mapbox/mapbox-navigation-ios.git", :branch => "pad-ehorizon" }
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.source_files = "Sources/MapboxNavigation/**/*.{h,m,swift}"
# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.resources = ['Sources/MapboxNavigation/Resources/*/*', 'Sources/MapboxNavigation/Resources/*']
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.requires_arc = true
s.module_name = "MapboxNavigation"
s.dependency "MapboxCoreNavigation", "#{s.version.to_s}"
s.dependency "MapboxMaps", "10.0.0-beta.15"
s.dependency "Solar", "~> 2.1"
s.dependency "MapboxSpeech-pre", "2.0.0-alpha.1"
s.dependency "MapboxMobileEvents", "~> 0.10.2" # Always specify a patch release if pre-v1.0
s.swift_version = "5.0"
# https://github.com/mapbox/mapbox-navigation-ios/issues/2665
s.user_target_xcconfig = {
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => '$(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))',
'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200' => 'arm64 arm64e armv7 armv7s armv6 armv8'
}
s.pod_target_xcconfig = {
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => '$(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))',
'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200' => 'arm64 arm64e armv7 armv7s armv6 armv8'
}
end
platform :ios, '11.0'
use_frameworks!
target 'MyApp' do
pod 'MapboxCoreNavigation', :path => '/path/to/MapboxCoreNavigation.podspec'
pod 'MapboxNavigation', :path => '/path/to/MapboxNavigation.podspec'
end
@1ec5
Copy link
Author

1ec5 commented Mar 10, 2021

Replace /path/to/ to the absolute or relative path to the folder where you downloaded the podspecs above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment