LoginSignup
8
7

More than 5 years have passed since last update.

Xcode7 で UIWebView の loadData に Passing a null to a callee that requires a non_null argument が出た時の解消法

Last updated at Posted at 2015-09-20

警告の内容

解消方法を探すのに少し時間がかかったので、メモしておく。
Xcode7とiOS9にアップデートしてビルドすると、以下のような警告が出る。

SettingViewController_m.png

警告文を訳すと「Nullじゃない呼び出し元にNullを渡している」みたいな感じか。

解消方法

とりあえず、baseURL:nilを、[NSURL URLWithString:@"http://"]に変更すればOK。

SettingViewController_m.png

警告の原因

baseURL:の引数の型を確認すると、NSURLNonnullが指定されている。

SettingViewController_m.png

なので、適当なURLを指定してあげればいいのかなと。
Xcode6.4とiOS8では出なかった警告だったので、ちょっと調べてみました。

参考資料

8
7
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
8
7