その後のその後

iOSエンジニア 堤 修一のブログ github.com/shu223

CoreTelephonyやAVCaptureSessionのサンプルコード

iPhone Developer Centerを確認してみたところ、いくつかFirst Versionのも含め新しいサンプルコードがアップされていました。

  • PhotoPicker
    • UIKit
    • Content Update
  • CoreTelephonyDemo
    • CoreTelephony
    • First Version
  • ThreadedCoreData
    • CoreData
    • First Version
  • Regions
    • MapKit
    • First Version
  • ExternalDisplay
    • UIKit
    • First Version
  • AVCam
    • AVFoundation
    • Content Update


以下一通り試してみた所感/メモ。

PhotoPicker

起動してみたら普通のUIImagePickerControllerのサンプルっぽい。
今回の変更点をみると

Upgraded to iOS 4.3 SDK, fixed issue with camera overlay placement.

とあるので、使いづらかったoverlayまわりがついに変更された?


http://developer.apple.com/library/ios/#releasenotes/General/WhatsNewIniPhoneOS/Articles/iOS4_3.html%23//apple_ref/doc/uid/TP40010567-SW1
と思って調べてみたらそういう変更はなさそうでした。

CoreTelephonyDemo

CoreTelephonyなるフレームワークで、現在の通話情報、コールセンター情報、キャリア情報を取得するサンプル。



電話代がもったいないので通話してみてCurrent Callの欄やCall Centerの欄がどうなるかってのは試してません。


ソース見ると、こんな感じで通話情報を取得しているようです。

// Instantiate CTTelephonyNetworkInfo and CTCallCenter objects.
tni = [[CTTelephonyNetworkInfo alloc] init];
callCenter = [[CTCallCenter alloc] init];
crtCarrierName = tni.subscriberCellularProvider.carrierName;

// Get the set of current calls from call center.	
crtCalls = [[callCenter.currentCalls allObjects] retain];

ThreadedCoreData

CoreData使ってないのでパス。

Regions

Important: This document has been removed from the ADC Developer Library. It contained information that had been obsoleted by more recent documents, or which was longer relevant for modern Mac OS X development.

と出てダウンロードできないようです。(3/13現在)

ExternalDisplay

外部ディスプレイなしでとりあえず実行してみた結果。



うちモニタとかないし、まーやらないかな、と思いかけましたが、そこをぐっとこらえ「そもそもiphoneと外部ディスプレイの接続ってどうやるんだろう」ってのを調べてみました。
http://store.apple.com/jp/browse/home/shop_iphone/iphone_accessories/cables_docks?mco=MTM4NTk1MTU


iPhone用のVGAアダプタってないのか・・・
「AppleコンポジットAVケーブル」ってのを使うのかな。

AVCam

AVCapture系クラスを使用した動画撮影、キャプチャのサンプル。
今回の変更点は

Significant changes throughout the entire project.

とあるので、どのへんが新しいのかはよくわかりませんが、動画編集系アプリを作る最初の一歩の参考になりそうです。