0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

react-nativeでプロジェクトを作成したとき、iosのディレクトリ名がtempになっているので変えたい。

かといって、ios直下の変えたいディレクトリ名(temp)を変えればいいというわけではなく、他にもファイル内記述や.xcodeprojなども変えなければいけないので手動は面倒&危険。

なのでライブラリに頼るが吉。以下を使用。

導入はいつもの如く、npm installで。

npm install react-native-rename

使い方は至ってシンプルですが、念の為チェックアウトしておくことと、ステージされた変更はない状態にしておいてください。自分はコミットしていないことでエラーが出ました。

git checkout -b rename-app
npx react-native-rename <新しいアプリ名>

または

git add .
git commit -m "コミットメッセージ"
git push

このアプリ名はXcodeでビルドするときにも関係するので、意外と重要な点になります。
特にフォルダの名前を直書きするとファイルの参照や人為的ミスにつながるので、ぜひこのライブラリを使用して安全にアプリ名を書き換えてください。

参考

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?