ios - How can I rename my .xcodeproj without it crashing? -


i've looked on internet , tried possibly think of change .xcodeproj name - example: http://prntscr.com/6xrms6

but crashes xcode , when reopen it, app breaks completely.

how can fix this?

use bash , regular expressions change occurrences of old project name new project name.

srcroot='path/to/repo' # 1 find "$srcroot" -type f -not -regex '.*/\.git/.*' -not -name '.ds_store' -print0 | xargs -0 -i {} bash -c 'file="{}"; sed -e -i "" "s/oldprojectname/newprojectname/g" "$file"' # 2 find -e "$srcroot" -type f -regex '.*oldprojectname.*' -print0 | xargs -0 -i {} bash -c 'src="{}"; dst=$(echo "$src" | sed -e "s/oldprojectname/newprojectname/g"); mkdir -p "$(dirname "$dst")"; mv "$src" "$dst"' # 3 

explanation:

  1. path containing oldprojectname.xcodeproj
  2. change occurrences of "oldprojectname" "newprojectname" in contents of desired files
  3. rename files replace occurrences of "oldprojectname" "newprojectname" in file paths

note: need edit these regex's fit specific needs. if want rename project not targets and/or class names, need crafty regex's use.

also, assume tried clicking rename project , didn't work reason...

click rename project


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -