IPhoneアプリ用に外部APIとの連携を試してみたので、メモ。 twitterクライアントや簡易ゲームの得点一覧(保存、読み込み)などに利用できる。 httpリクエスト stringWithContentsOfURL:encoding:error:メソッド ○簡単にネットワーク上のテキスト情報を取得可能。 ×データの取得が終わるまで処理が止まってしまう (例)test.comのhtmlソースを取得する -(void)viewDidLoad{ NSURL *url = [NSULR URLWithString:@"http://test.com"]; NSString *html = [NSString stringWithContentsOfURL:url encoding:エンコード error:nill]; } NSURLRequestメソッド ○非同期にネットワークの情報を取得する