LoginSignup
8
7

More than 5 years have passed since last update.

概要

以前Xcode8でXVimを使うというのを書きまして、Xcode8でXVimを使う際の注意点をメモしたのですが、最近になり再度やろうとしたらこれだけではダメだったのでさらにメモを残しておきます。。

前回の問題

  • XVimを入れてXcode8を起動しようとすると「Xcodeが壊れているため..」と表示されXcodeが起動できない
    • → Macを再起動して解決

今回の問題

  • 前回同様の手順を試したところうまくいかず。。
  • 今回はXcodeは起動できるのですがプラグインを入れたときに最初に出る「Unexpected code bundle "XVim.xcplugin"」で「Load Bundle」を押すとうまくXcodeが起動しないという問題が発生
  • その後再度Xcodeは起動できるものの、XVimは有効になっておらず、、という状況です。

スクリーンショット 2016-10-02 14.49.39.png

エラー内容

  • Xcode起動時にログを見てみると以下エラーを吐いていました
$ tail -f /var/log/system.log

WARNING: Failed to load plugin at path: "/Users/hikaru/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XVim.xcplugin", skipping. Error: Error Domain=NSCocoaErrorDomain Code=3587 "dlopen_preflight(/Users/hikaru/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XVim.xcplugin/Contents/MacOS/XVim): no suitable image found.  Did find:
        /Users/hikaru/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XVim.xcplugin/Contents/MacOS/XVim: mmap() error 1 at address=0x11C36E000, size=0x00108000 segment=__TEXT in Segment::map() mapping /Users/hikaru/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XVim.xcplugin/Contents/MacOS/XVim" UserInfo={NSLocalizedFailureReason=The bundle is damaged or missing necessary resources., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Users/hikaru/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XVim.xcplugin/Contents/MacOS/XVim, NSDebugDescription=dlopen_preflight(/Users/hikaru/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XVim.xcplugin/Contents/MacOS/XVim): no suitable image found.  Did find:
        /Users/hikaru/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XVim.xcplugin/Contents/MacOS/XVim: mmap() error 1 at address=0x11C36E000, size=0x00108000 segment=__TEXT in Segment::map() mapping /Users/hikaru/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XVim.xcplugin/Contents/MacOS/XVim, NSBundlePath=/Users/hikaru/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XVim.xcplugin, NSLocalizedDescription=The bundle “XVim” couldn’t be loaded because it is damaged or missing necessary resources.}

解決方法

  • 本家のREADMEをみると最近新しい手順が1つ追加されておりそちらを試すとうまくいきました。
  • 内容はXVimのプラグイン用の証明書を作成するとの事でした。
  • どうもどこかのタイミングでXcode8からはサードパーティーのプラグインが使えなくなったようで、使うためには証明書を作成する必要があるみたいです。
  • XVimのREADMEをみるとこの手順が追加されたのが2016/09/21のようで、前回のXVimの記事を書いたのが2016/09/16だったので、その後追加されたみたいでした。。
  • 証明書を作って改めてREADMEの通りにインストールしたらうまく使えました!
  • 前やった時はこんなことしなかったしなぁと思って色々調べて時間を費やしてしまいました。。。
8
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
7