LoginSignup
11
8

More than 3 years have passed since last update.

Xcode11でCould not hardlink copyってエラーが出る

Posted at

環境

  • Mac OS 10.15.1
  • Xcode 11.1

事象

件名の通り。
いつエラーが出るかというと、

  • コード書く
  • Run
  • iOS Simulator内にアプリをインストール
  • アプリが起動する
  • コード修正する
  • iOS Simulator内のアプリをアップデート ← ここでエラー

要は、初回のインストールはエラーが出ませんが、
2度目のRun実行でアプリを上書きしようとするとエラーが出るようです。

原因

原因はどうやら Display Name に日本語を入れてしまっていたため。
Display Name を英語にしたら事象の発生はなくなりました。

image.png

どうやらXcode11の画像の部分は、 Display Name ではなく Product Name のようですね。
ここを変更すると、 Build Settings にある Product Name が変更されます。
パッケージングされるファイル名も、 サンプル.app のように日本語になってしまってました。
日本語ファイル名だとうまくコピーする処理ができないのでしょうか・・・?
Info.plist にも CFBundleDisplayName の記述はありません。

日本語入れたい場合はどうするの

Info.plistCFBundleDisplayName を設定しましょう。

    <key>CFBundleDisplayName</key>
    <string>サンプル</string>

参考

11
8
2

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
11
8