【发布时间】:2014-03-19 04:43:44
【问题描述】:
很惊讶得到以下错误:
undefined method `[]' for #<CLLocation:0x9a95cd0> (NoMethodError)
在尝试重现给出的最简单示例时:
BW::Location.get_once do |result|
p "From Lat #{result[:from].latitude}, Long #{result[:from].longitude}"
p "To Lat #{result[:to].latitude}, Long #{result[:to].longitude}"
end
CLLocation 是使用以下方法导入的(即使不确定在使用 bubbblewrap 时是否需要它):
app.frameworks += ["CoreLocation"]
因为气泡包装的位置是:
require 'bubble-wrap/location'
感谢任何显而易见的事情(:
【问题讨论】: