...
|
...
|
@@ -11,7 +11,8 @@ Pod::Spec.new do |m| |
|
|
|
|
|
m.source = { :git => 'https://github.com/mapbox/mapbox-ios-sdk.git', :branch => 'develop' }
|
|
|
|
|
|
m.platform = :ios, '5.0'
|
|
|
m.platform = :ios
|
|
|
m.ios.deployment_target = '5.0'
|
|
|
|
|
|
m.source_files = 'Proj4/*.h', 'MapView/Map/*.{h,c,m}'
|
|
|
|
...
|
...
|
@@ -19,21 +20,14 @@ Pod::Spec.new do |m| |
|
|
|
|
|
m.prefix_header_file = 'MapView/MapView_Prefix.pch'
|
|
|
|
|
|
def m.post_install(target_installer)
|
|
|
puts "\nGenerating MapBox resources bundle\n".yellow if config.verbose?
|
|
|
Dir.chdir File.join(config.project_pods_root, 'MapBox') do
|
|
|
m.post_install do |library|
|
|
|
Dir.chdir File.join(library.sandbox_dir, 'MapBox') do
|
|
|
command = "xcodebuild -project MapView/MapView.xcodeproj -target Resources CONFIGURATION_BUILD_DIR=../../Resources"
|
|
|
command << " 2>&1 > /dev/null" unless config.verbose?
|
|
|
unless system(command)
|
|
|
raise ::Pod::Informative, "Failed to generate MapBox resources bundle"
|
|
|
end
|
|
|
end
|
|
|
if Version.new(Pod::VERSION) >= Version.new('0.17.0')
|
|
|
script_path = target_installer.copy_resources_script_path
|
|
|
else
|
|
|
script_path = File.join(config.project_pods_root, target_installer.target_definition.copy_resources_script_name)
|
|
|
end
|
|
|
File.open(script_path, 'a') do |file|
|
|
|
File.open(library.copy_resources_script_path, 'a') do |file|
|
|
|
file.puts "install_resource 'Resources/MapBox.bundle'"
|
|
|
end
|
|
|
end
|
...
|
...
|
@@ -74,15 +68,9 @@ Pod::Spec.new do |m| |
|
|
]
|
|
|
}
|
|
|
|
|
|
m.framework = 'CoreGraphics'
|
|
|
m.framework = 'CoreLocation'
|
|
|
m.framework = 'Foundation'
|
|
|
m.framework = 'QuartzCore'
|
|
|
m.framework = 'UIKit'
|
|
|
m.frameworks = 'CoreGraphics', 'CoreLocation', 'Foundation', 'QuartzCore', 'UIKit'
|
|
|
|
|
|
m.library = 'Proj4'
|
|
|
m.library = 'sqlite3'
|
|
|
m.library = 'z'
|
|
|
m.libraries = 'Proj4', 'sqlite3', 'z'
|
|
|
|
|
|
m.xcconfig = { 'OTHER_LDFLAGS' => '-ObjC', 'LIBRARY_SEARCH_PATHS' => '"${PODS_ROOT}/MapBox/Proj4"' }
|
|
|
|
...
|
...
|
|