Authored by Justin R. Miller
@@ -21,18 +21,17 @@ Pod::Spec.new do |m| @@ -21,18 +21,17 @@ Pod::Spec.new do |m|
21 21
22 m.prefix_header_file = 'MapView/MapView_Prefix.pch' 22 m.prefix_header_file = 'MapView/MapView_Prefix.pch'
23 23
24 - m.post_install do |library|  
25 - Dir.chdir File.join(library.sandbox_dir, 'MapBox') do  
26 - command = "xcodebuild -project MapView/MapView.xcodeproj -target Resources CONFIGURATION_BUILD_DIR=../../Resources 2>&1 > /dev/null" 24 + m.pre_install do |pod, target_definition|
  25 + Dir.chdir(pod.root) do
  26 + command = "xcodebuild -project MapView/MapView.xcodeproj -target Resources 2>&1 > /dev/null"
27 unless system(command) 27 unless system(command)
28 raise ::Pod::Informative, "Failed to generate MapBox resources bundle" 28 raise ::Pod::Informative, "Failed to generate MapBox resources bundle"
29 end 29 end
30 end 30 end
31 - File.open(library.copy_resources_script_path, 'a') do |file|  
32 - file.puts "install_resource 'Resources/MapBox.bundle'"  
33 - end  
34 end 31 end
35 32
  33 + m.resource = 'MapBox.bundle'
  34 +
36 m.documentation = { 35 m.documentation = {
37 :html => 'http://mapbox.com/mapbox-ios-sdk/api/', 36 :html => 'http://mapbox.com/mapbox-ios-sdk/api/',
38 :appledoc => [ 37 :appledoc => [