Skip to content

Instantly share code, notes, and snippets.

@software-mariodiana
Created January 2, 2021 23:39
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 software-mariodiana/1bc573c1cba3630dbabecdcbe041d348 to your computer and use it in GitHub Desktop.
Save software-mariodiana/1bc573c1cba3630dbabecdcbe041d348 to your computer and use it in GitHub Desktop.
Integrating a CocoaPod downloaded locally to the same parent directory as its client project. Here, the pod incorporates a 3rd-party library which must be accounted for.
# Uncomment the next line to define a global platform for your project
platform :ios, '10.2'
target 'MapboxPodClient' do
# Comment the next line if you don't want to use dynamic frameworks
#use_frameworks!
# Pods for MapboxPodClient
pod 'Mapbox-iOS-SDK', :path => '../mapbox-ios-sdk-legacy', :share_schemes_for_development_pods => true
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
# Modify the library path to account for custom path for the pod.
xcconfig_path = config.base_configuration_reference.real_path
xcconfig = File.read(xcconfig_path)
xcconfig_mod = xcconfig.gsub(
"\${PODS_ROOT}\/Mapbox-iOS-SDK\/Proj4",
"\${PODS_ROOT}\/\.\.\/\.\.\/mapbox-ios-sdk-legacy\/Proj4")
File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment