Xcodeで開発したアプリのiPhoneでの実機テストではまった

これで2日はまった。なんとか自力で解決したけど,同じ原因ではまっている人がネット上に見当たらなかったので,一応,記録に残しておきます。

出たエラーはこれ。

Code Sign error: a valid provisioning profile matching the application's Identifier '***' could not be found

AppleiOS Provisioning Portalにいき,CertificateをつくってDevice登録してApp IDをつくってProvisioning ProfilesをつくってXcodeに入れました。けれど上記のエラーがどうしてもとれません。Bundle Identifierをチェックして,iPhone側にプロファイルが入っているか,OS Xに証明書が登録されているかをチェックし,プロジェクトのBuild SettingのCode Signingの設定を変えてみてなどなど,何をやってもエラーが消えません。

結論は,XcodeのOrganizerにProvisioning Profilesを登録する際に,「DEVICESのProvisioning Profiles」だけに登録していて「LIBRARYのProvisioning Profiles」に登録していなかったのが原因でした・・・

iMac購入・作業記録: Perl環境の整備

標準のPerl環境にCPANでモジュールを追加していたのだが,移行前に使っていたスクリプトのいくつかが動かなくなったので,やはり独自環境を作ることにする。前の環境ではMacPortsを使っていたのだが,自力でソースから構築してみることにした。

cd ~/src
wget http://www.cpan.org/src/perl-5.12.3.tar.gz
tar xzvf perl-5.12.3.tar.gz
cd perl-5.12.3
sh Configure -Doptimize='-g -pipe -Os' -Dusethreads -Dusemultiplicity -des
make
make test
sudo make install
make clean

で,モジュールを入れていくことに。

sudo /usr/local/bin/cpan

初期設定が行われていく。

install CPAN
reload cpan
install LWP
install YAML
install Imager

順調に入っていくが,なぜかImagerでJPEGが扱えない。

sudo /usr/local/bin/cpan Imager::File::JPEG

失敗。libjpegがないと怒られる。Mac OS X用のインストールイメージは各所にあるけど,せっかくなのでwww.ijg.orgからソースを落としてきてビルドしてみる。

cd ~/src
wget http://www.ijg.org/files/jpegsrc.v8c.tar.gz
tar zxvf jpegsrc.v8c.tar.gz
cd jpeg-8c/
./configure
make
sudo make install
make clean

再挑戦。

sudo /usr/local/bin/cpan Imager::File::JPEG

うまくいった。ImagerでJPEGを扱えるようになった。

iMac購入・作業記録: 開発環境のセットアップ

Mac OS X Install DVDからXcodeをインストール

つぎにperlcpanを初期設定。

imac:~ t-tanaka$ sudo passwd root
Password:
Changing password for root.
New password:
Retype new password:
imac:~ t-tanaka$ su - 
Password:
imac:~ root# cpan


CPAN is the world-wide archive of perl resources. It consists of about
300 sites that all replicate the same contents around the globe. Many
countries have at least one CPAN site already. The resources found on
CPAN are easily accessible with the CPAN.pm module. If you want to use
CPAN.pm, lots of things have to be configured. Fortunately, most of
them can be determined automatically. If you prefer the automatic
configuration, answer 'yes' below.

If you prefer to enter a dialog instead, you can answer 'no' to this
question and I'll let you configure in small steps one thing after the
other. (Note: you can revisit this dialog anytime later by typing 'o
conf init' at the cpan prompt.)
Would you like me to configure as much as possible automatically? [yes] yes

iMac購入・作業記録: iTunes環境の移行

旧環境の~/Music/iTunesをコピーしてくる。「ライブラリ追加時にファイルを"iTunes Medis"フォルダにコピーする」のチェックを外して使用していたため,ライブラリ外にあったファイルが多数あり,移行に相当手間取る。

ディスクが120Mしかなく,あの手この手でディスク領域を節約していたMac-mini環境と違って,新しい環境のHDDは1Tあるので,とっととライブラリに統合してしまった方がいいかもしれない。