我使用CocoaPods在Mac OS X 10.9.1上安装了MapBox,但我遇到了链接问题,MapBox人员建议我直接从他们的存档中的标签下载。不幸的是,我无法加载该标记。
这是我的Podfile及其建议:
platform :ios, '7.0'
pod 'AFNetworking', '~> 2.0'
pod 'Mapbox', :git => 'https://github.com/mapbox/mapbox-ios-sdk', :tag => '1.1.0'
pod 'TWTSideMenuViewController', '~> 0.3'
CocoaPods在pod“Mapbox”行上出现错误(见下文)。它似乎无法找到该目录。我试过了:
为什么预安装挂钩无法找到(或创建?)该目录?
以下是“pod install”的输出:
[!] An error occurred while processing the pre-install hook of Mapbox (1.1.0).
No such file or directory - /Users/Bob/Documents/InfoBridge/projects/infobridge_aboutmywoods-ios/Pods/Mapbox
/Users/Bob/Documents/InfoBridge/projects/infobridge_aboutmywoods-ios/Pods/Local Podspecs/Mapbox.podspec:25:in `chdir'
/Users/Bob/Documents/InfoBridge/projects/infobridge_aboutmywoods-ios/Pods/Local Podspecs/Mapbox.podspec:25:in `block (2 levels) in _eval_podspec'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.29.0/lib/cocoapods-core/specification.rb:406:in `call'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.29.0/lib/cocoapods-core/specification.rb:406:in `pre_install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:489:in `run_spec_pre_install_hook'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:464:in `block (3 levels) in run_pre_install_hooks'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:462:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:462:in `block (2 levels) in run_pre_install_hooks'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:460:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:460:in `block in run_pre_install_hooks'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/user_interface.rb:113:in `message'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:459:in `run_pre_install_hooks'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:104:in `block in download_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/user_interface.rb:52:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:101:in `download_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:87:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/command/project.rb:38:in `run_install_with_update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/command/project.rb:68:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.4.0/lib/claide/command.rb:213:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/command.rb:51:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/bin/pod:24:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'
谢谢,鲍勃
答案 0 :(得分:2)
如果您以前安装了Mapbox,请先将其卸载。然后重新安装。
pod 'MapBox', '~> 1.1.0'
运行命令
pod install
这将删除Mapbox及其所有依赖项。
将Mapbox放回Podfile
pod 'Mapbox', :git => 'https://github.com/mapbox/mapbox-ios-sdk.git', :branch => 'develop'
pod install
在我的案例中它有所帮助
答案 1 :(得分:0)
删除podFile.lock,问题解决了。