Created
January 2, 2021 23:39
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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