Skip to content

Instantly share code, notes, and snippets.

@adhendo
Created June 29, 2021 16:38
Show Gist options
  • Save adhendo/7a8e2674de963e8735f1cfec9f2b91cc to your computer and use it in GitHub Desktop.
Save adhendo/7a8e2674de963e8735f1cfec9f2b91cc to your computer and use it in GitHub Desktop.
Podfile for working with @homee/react-native-mapbox-navigation
plugin 'cocoapods-user-defined-build-types'
enable_user_defined_build_types!
install! 'cocoapods', :disable_input_output_paths => true
#use_frameworks!
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '11.0'
ENV['REACT_NATIVE_MAPBOX_GL_USE_FRAMEWORKS'] = '1'
$ReactNativeMapboxGLIOSVersion = '~> 6.2.1'
target 'winehop' do
use_unimodules!
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
pod 'MapboxCoreNavigation', :build_type => :dynamic_framework
pod 'MapboxNavigation', :build_type => :dynamic_framework
pod 'MapboxAccounts', :build_type => :dynamic_framework
# Uncomment the code below to enable Flipper.
#
# You should not install Flipper in CI environments when creating release
# builds, this will lead to significantly slower build times.
#
# Note that if you have use_frameworks! enabled, Flipper will not work.
#
# use_flipper!
# post_install do |installer|
# flipper_post_install(installer)
# end
pre_install do |installer|
fix_mapbox_events(installer)
end
def fix_mapbox_events(installer)
installer.pod_targets.each do |pod|
if pod.name == 'MapboxMobileEvents'
def pod.build_type;
Pod::BuildType.dynamic_framework
end
end
end
end
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment