Quantcast
Channel: shin3tky blog
Viewing all articles
Browse latest Browse all 25

Lion + Xcode 4.3.1 で Codesign operation failed

$
0
0

iOS 5.1 のリリースに合わせて、Snow Leopard から Lion にようやく乗り換えました。ディスクユーティリティでディスクのアクセス権を修復してからはきわめて快適な環境です。

Xcode 4.3.1 を入れたのですが、最終的には Xcode 4.2.1 と共存させることになりました。


Xcode 4.3.1 で Archive したあと、Ad-hoc 版を作成しようとしたところで、Codesign operation failed (Check that the identity you selected is valid)と言われ、署名まわりをチェックし直しても解決できず。


Console.app で Organizer が IPA ファイルを作る際のログを確認すると、

12/03/10 4:51:57.238 [0x0-0x2a02a].com.apple.dt.Xcode: /Users/morita/Library/Developer/Xcode/Archives/2012-03-10/Hoge 12-03-10 4.50.xcarchive/Products/Applications/Hoge.app/Hoge: replacing existing signature
12/03/10 4:51:58.078 [0x0-0x2a02a].com.apple.dt.Xcode: /Users/morita/Library/Developer/Xcode/Archives/2012-03-10/Hoge 12-03-10 4.50.xcarchive/Products/Applications/Hoge.app/help: Is a directory

まず、署名のやり直しを行い、次にアプリケーションのヘルプ関係のリソースを格納しているディレクトリを処理しようとして Is a directoryと曰って Codesign operation failedになっていました。

Xcode 4.2.1 ですと、署名のやり直しを行わない選択肢 (Don't re-sign) も採れるのですが、Xcode 4.3.1 ではその選択肢は UI から無くなっていました。


フラットに配置したプロジェクトでは Xcode 4.3.1 でも署名は行えますので、ディレクトリを含む場合の問題のようです。




15 Mar 2012 追記


StackOverflow の XCode 4.3.1 breaks validation of apps with directories added by reference. Any workaround?より回避策。Apple が直してくれるのを待つべきですが・・・。


Maybe I've found a workaround:


  1. Open Organizer;
  2. Right click on the archive you want to export and select "Reveal in Finder";
  3. Right click on the xcarchive file and select "Show package content";
  4. Go to Products/Applications;
  5. Create a folder and name it Payload;
  6. Drag the .app file into the folder (don't copy it, since it would invalidate the signing);
  7. Zip the folder;
  8. Rename the .zip file to .ipa

It worked for me.

Let me know if it's ok even for you.




22 Mar 2012 追記


Xcode 4.3.2 に Update するが、依然として Is a directoryと言われる。


Viewing all articles
Browse latest Browse all 25

Trending Articles