2011年10月22日土曜日

<備忘>証明書を設定できない?

証明書/プロファイルを更新したときに
command /usr/bin/codesign failed with exit code 1
でビルドエラーになったときの対応。
いろいろ検索して苦労したので。。。。。

 ・ビルドの設置が、期限切れの古い証明書を参照している。
     →BuildSettingで、設定し直す(Targetの同じ項目も設定し直す)

 ・古い証明書が残っていて、プロファイルと証明書の対応ができていない。
     →古い証明書を削除する。 ※本当に、ざっくり削除していいもの?
        キーチェーンで、古い証明書を削除する。
        ※見えないこともあるので、検索して残ってないかを確認する(検索窓に”iPhone"入れて検索)

http://icotfeels.blog66.fc2.com/blog-entry-3632.html
http://ynomura.blog47.fc2.com/blog-entry-665.html
http://ameblo.jp/iphone0126/theme-10021281850.html
http://technical-iphone.blogspot.com/2011/07/codesign-failed.html


 ・2台目のMacで証明書の設定しても、キーチェーンで証明書の秘密鍵が表示されない。
    →1台目のMacで設定済みの秘密鍵を書き出して、2台目のMacにインポートする。

  http://labs.karappo.net/iphone/index.php?itemid=274


2011年5月6日金曜日

iOS 備忘 音関連

音の鳴らし方。
大きく4種類あって、そのうち2つを書いておく
(I)
(1)ファイルを指定して準備
AudioServicesCreateSystemSoundID()

(2)鳴らす
- AudioServicesPlaySystemSound();
- AudioServicesPlayAlertSound()
↑バイブレーション付き

(3)後始末
AudioServicesDisposeSystemSoundID(soundFileObject);

・利点
わりと簡単に音を出せる。(でも後述の方法とさほど変わらない。。。)
・欠点
ボリュームの調整ができない。
iPhoneのボリューム設定と連動しない
(ミュートスイッチがONなら、鳴らない)

ちなみにバイブレーションのみは、
AudioServicesPlayAlertSound(kSystemSoundID_Vibrate);


(II)
(1)ファイルを指定してインスタンスを作成
AVAudioPlayer *soundPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:soundFileURL error:&error];

(2)準備
[soundPlayer prepareToPlay];

(3)鳴らす
[soundPlayer play];

(4)途中で止める
[soundPlayer stop];

stopの後にplayすると、止めたところから再生されるので、頭出しするには、
soundPlayer.currentTime = 0;

???
[soundPlayer stop];
すると、バッファがクリアされるので、
[soundPlayer prepareToPlay];
が必要?未確認。



(5)後始末
[soundPlayer release];

・利点
iPhoneのボリューム設定と連動する。
途中で音を止められる。
・欠点
(比較的)指定が面倒?

2011年1月1日土曜日

iOS 備忘 applicationDidFinishLaunching

iOS3.2以降は、

- (void) applicationDidFinishLaunching:(UIApplication *)application

の代わりに

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

が用意されているので、didFinishLaunchingWithOptionsにアプリケーション起動直後の処理を描くこと

2010年11月23日火曜日

GoogleカレンダーのAPIについての検索結果 備忘

http://www.awaresoft.jp/development.html

http://www.awaresoft.jp/development/35-iphone-app/64-gdata-api-basics.html

http://code.google.com/p/gdata-objectivec-client/wiki/GDataObjCIntroduction#Requirements

http://code.google.com/p/gdata-objectivec-client/downloads/list

http://www.awaresoft.jp/development/35-iphone-app/62-building-gdata-api-client-library-for-iphone.html

http://code.google.com/p/gdata-objectivec-client/wiki/GDataObjCIntroduction

2010年11月21日日曜日

PopoverView in iPad App 検索結果 その2

UIPopoverController に UIPickerView をいれる

http://token.sakura.ne.jp/wp/?p=742

http://d.hatena.ne.jp/shalgiel/20100708/1278567982

PopoverView in iPad App 検索結果

Using the PopoverView in iPad App Development

http://mobiforge.com/designing/story/using-popoverview-ipad-app-development



http://labs.techfirm.co.jp/ipad/cho/41


http://ayahime.jp/?p=65



ActionSheetから
http://labs.techfirm.co.jp/ipad/cho/477



popover内のボタンから自分を閉じる
http://gijishinpo.asablo.jp/blog/2010/08/17/5293413

How to dismissPopoverAnimated

http://stackoverflow.com/questions/2639350/how-to-dismisspopoveranimated-on-ipad-with-uipopovercontroller-in-mkmapview-sdk3

http://translate.googleusercontent.com/translate_c?hl=ja&sl=en&u=http://stackoverflow.com/questions/2639350/how-to-dismisspopoveranimated-on-ipad-with-uipopovercontroller-in-mkmapview-sdk3&prev=/search%3Fq%3DPopover%2BdismissPopoverAnimated%26hl%3Dja&rurl=translate.google.co.jp&twu=1&usg=ALkJrhhGh8JWl2LNcENmnedfjPcKnm_72g


http://www.answerspice.com/c119/1487341/how-to-dismisspopoveranimated-on-ipad-with-uipopovercontroller-in-mkmapview-sdk32