LoginSignup
1
1

More than 5 years have passed since last update.

RubyMotion / BubbleWrap::HTTP で response.body がnilのとき

Posted at

状況

model.rb
uri = "http://www.colr.org/json/color/#{hex}"
BW::HTTP.get(uri) do |response|
  p response.body.to_str
end

というコードで、response.bodynilNoMethodErrorになることがありました。
responseのエラーメッセージにはThe network connection was lost.と出ていました。

解決策

iOS SimulatorのメニューにあるReset Content and Settings...を実行したら解決しました。
Reset Content and Settings...はMacのメニューバーのiOS Simulatorの下にあります。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1