1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Reachabilityを利用するまでの流れ

1
Posted at

Reachabilityを利用する時は以下のような雰囲気だった。

http://developer.apple.com/library/ios/#samplecode/Reachability/Introduction/Intro.html#//apple_ref/doc/uid/DTS40007324-Intro-DontLinkElementID_2
よりサンプルコードをダウンロード。

Reachbility.h
Reachbility.m
をコピーしてプロジェクトに追加。

この時点ではARCを利用しているプロジェクトだとエラーが出ているので、
TARGETS→Build Phases→Compile SourcesでReachbility.mに-fno-objc-arcを設定。エラーが無くなる。

このままコンパイルするとリンカエラーなので
TARGETS→Summary→Linked Frameworks and LibrariesにSystemConfiguration.frameworkを追加。
ここは下記のアドバイスに従った。※ただフレームワーク名まではエラーに含まれていなかった。
http://stackoverflow.com/questions/2408388/scnetworkreachability-compiling-error

これでうまくいった。

参考:
http://labs.torques.jp/2012/03/19/2583/

1
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?